/* ============================================================================
   Deals Today — Premium Design System
   Dark glassmorphism with vibrant accent gradients
   ============================================================================ */

/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Surface colors */
  --bg-primary:    hsl(230, 25%, 7%);
  --bg-secondary:  hsl(230, 20%, 11%);
  --bg-card:       hsla(230, 20%, 14%, 0.65);
  --bg-card-hover: hsla(230, 20%, 18%, 0.75);
  --bg-glass:      hsla(230, 20%, 14%, 0.45);

  /* Text colors */
  --text-primary:    hsl(220, 20%, 95%);
  --text-secondary:  hsl(220, 15%, 68%);
  --text-tertiary:   hsl(220, 10%, 48%);
  --text-muted:      hsl(220, 10%, 38%);

  /* Accent gradients */
  --accent-gradient: linear-gradient(135deg, hsl(265, 90%, 65%), hsl(340, 85%, 60%), hsl(25, 95%, 55%));
  --accent-purple:   hsl(265, 90%, 65%);
  --accent-pink:     hsl(340, 85%, 60%);
  --accent-orange:   hsl(25, 95%, 55%);
  --accent-green:    hsl(155, 70%, 45%);
  --accent-blue:     hsl(210, 85%, 55%);

  /* Pricing colors */
  --price-color:     hsl(155, 80%, 50%);
  --discount-color:  hsl(340, 90%, 60%);

  /* Borders */
  --border-subtle:   hsla(220, 20%, 30%, 0.35);
  --border-glass:    hsla(220, 50%, 80%, 0.08);

  /* Shadows */
  --shadow-card:     0 4px 24px hsla(0, 0%, 0%, 0.35), 0 1px 4px hsla(0, 0%, 0%, 0.2);
  --shadow-card-hover: 0 12px 40px hsla(265, 60%, 40%, 0.2), 0 4px 16px hsla(0, 0%, 0%, 0.3);
  --shadow-glow:     0 0 30px hsla(265, 90%, 65%, 0.15);

  /* Layout */
  --header-height:   72px;
  --max-width:       1360px;
  --content-padding: 20px;
  --radius-sm:       8px;
  --radius-md:       14px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --radius-pill:     100px;

  /* Transitions */
  --ease-spring:     cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration-fast:   150ms;
  --duration-normal: 280ms;
  --duration-slow:   450ms;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Ambient Background ────────────────────────────────────────────────────── */
.ambient-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: float 20s ease-in-out infinite;
}

.ambient-orb--1 {
  width: 500px;
  height: 500px;
  background: hsla(265, 80%, 50%, 0.3);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.ambient-orb--2 {
  width: 400px;
  height: 400px;
  background: hsla(340, 70%, 45%, 0.2);
  top: 40%;
  right: -8%;
  animation-delay: -7s;
  animation-duration: 25s;
}

.ambient-orb--3 {
  width: 350px;
  height: 350px;
  background: hsla(25, 80%, 45%, 0.2);
  bottom: -5%;
  left: 30%;
  animation-delay: -14s;
  animation-duration: 22s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(30px, -40px) scale(1.05); }
  50%      { transform: translate(-20px, 20px) scale(0.95); }
  75%      { transform: translate(15px, 35px) scale(1.02); }
}

/* ─── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: hsla(230, 25%, 7%, 0.8);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-glass);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

.stat-value {
  color: var(--text-primary);
  font-weight: 700;
}

.stat-pill--live {
  color: var(--accent-green);
}

.stat-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 hsla(155, 70%, 45%, 0.5); }
  50%      { opacity: 0.7; box-shadow: 0 0 0 6px hsla(155, 70%, 45%, 0); }
}

/* ─── Main Content ──────────────────────────────────────────────────────────── */
.main-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  padding-bottom: 80px;
}

/* ─── Search ────────────────────────────────────────────────────────────────── */
.search-container {
  padding: 28px 0 16px;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  background: linear-gradient(to bottom, hsla(230, 25%, 7%, 0.95) 60%, transparent);
  backdrop-filter: blur(8px);
}

.search-bar {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color var(--duration-normal) var(--ease-smooth);
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 48px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all var(--duration-normal) var(--ease-smooth);
  backdrop-filter: blur(12px);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px hsla(265, 90%, 65%, 0.15), var(--shadow-glow);
}

.search-input:focus ~ .search-icon {
  color: var(--accent-purple);
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: hsla(220, 20%, 30%, 0.4);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.search-clear:hover {
  background: hsla(220, 20%, 40%, 0.5);
  color: var(--text-primary);
}

.search-clear svg {
  width: 14px;
  height: 14px;
}

/* ─── Filter Pills ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 8px 0 28px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  backdrop-filter: blur(8px);
  user-select: none;
}

.filter-pill:hover {
  background: var(--bg-card-hover);
  border-color: hsla(220, 30%, 50%, 0.3);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.filter-pill--active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px hsla(265, 60%, 50%, 0.3);
}

.filter-pill--active:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px hsla(265, 60%, 50%, 0.35);
}

.filter-icon {
  font-size: 0.95rem;
  line-height: 1;
}

/* ─── Deals Grid ────────────────────────────────────────────────────────────── */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ─── Deal Card ─────────────────────────────────────────────────────────────── */
.deal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-smooth);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  animation: cardEnter 0.5s var(--ease-spring) backwards;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}

.deal-card:hover {
  transform: translateY(-4px);
  border-color: hsla(265, 40%, 50%, 0.25);
  box-shadow: var(--shadow-card-hover);
}

/* Card image */
.deal-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.deal-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

.deal-card:hover .deal-card__image {
  transform: scale(1.04);
}

/* Placeholder when no image */
.deal-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, hsla(265, 30%, 15%, 0.8), hsla(230, 20%, 12%, 0.8));
}

.deal-card__placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.deal-card__placeholder-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Source badge (overlays image) */
.deal-card__source {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.deal-card__source--amazon {
  background: hsla(35, 100%, 50%, 0.2);
  color: hsl(35, 100%, 60%);
  border: 1px solid hsla(35, 100%, 50%, 0.25);
}

.deal-card__source--flipkart {
  background: hsla(210, 100%, 50%, 0.2);
  color: hsl(210, 100%, 65%);
  border: 1px solid hsla(210, 100%, 50%, 0.25);
}

.deal-card__source--myntra {
  background: hsla(340, 80%, 50%, 0.2);
  color: hsl(340, 80%, 65%);
  border: 1px solid hsla(340, 80%, 50%, 0.25);
}

.deal-card__source--meesho {
  background: hsla(300, 60%, 50%, 0.2);
  color: hsl(300, 60%, 65%);
  border: 1px solid hsla(300, 60%, 50%, 0.25);
}

.deal-card__source--ajio {
  background: hsla(45, 90%, 50%, 0.2);
  color: hsl(45, 90%, 60%);
  border: 1px solid hsla(45, 90%, 50%, 0.25);
}

.deal-card__source--nykaa {
  background: hsla(330, 70%, 50%, 0.2);
  color: hsl(330, 70%, 65%);
  border: 1px solid hsla(330, 70%, 50%, 0.25);
}

.deal-card__source--croma {
  background: hsla(160, 80%, 40%, 0.2);
  color: hsl(160, 80%, 55%);
  border: 1px solid hsla(160, 80%, 40%, 0.25);
}

.deal-card__source--other,
.deal-card__source--unknown {
  background: hsla(220, 20%, 50%, 0.2);
  color: var(--text-secondary);
  border: 1px solid hsla(220, 20%, 50%, 0.25);
}

/* Deal Tags (parsed from #hashtags) */
.deal-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.deal-tag {
  display: inline-block;
  padding: 3px 9px;
  background: hsla(265, 60%, 50%, 0.1);
  border: 1px solid hsla(265, 60%, 50%, 0.18);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-purple);
  text-transform: capitalize;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.deal-tag:hover {
  background: hsla(265, 70%, 55%, 0.22);
  border-color: var(--accent-purple);
  color: #fff;
  transform: translateY(-1px);
}

.deal-tag:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 1px;
}

/* Discount badge */
.deal-card__discount {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: var(--discount-color);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px hsla(340, 90%, 50%, 0.35);
}

/* Card body */
.deal-card__body {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deal-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.deal-card__description {
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

/* Price row */
.deal-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 16px;
}

.deal-card__price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--price-color);
  letter-spacing: -0.02em;
}

.deal-card__time {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* CTA button */
.deal-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  margin: 0 18px 18px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-smooth);
  box-shadow: 0 4px 16px hsla(265, 60%, 50%, 0.25);
}

.deal-card__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px hsla(265, 60%, 50%, 0.35);
}

.deal-card__cta-arrow {
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.deal-card__cta:hover .deal-card__cta-arrow {
  transform: translateX(3px);
}

/* ─── Skeleton Loading ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    hsla(230, 20%, 18%, 0.5) 25%,
    hsla(230, 20%, 24%, 0.5) 50%,
    hsla(230, 20%, 18%, 0.5) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.deal-card--skeleton .deal-card__image-wrap {
  background: none;
}

.deal-card--skeleton .skeleton-image {
  width: 100%;
  height: 100%;
}

.deal-card--skeleton .skeleton-title {
  height: 18px;
  width: 85%;
}

.deal-card--skeleton .skeleton-desc {
  height: 14px;
  width: 65%;
}

.deal-card--skeleton .skeleton-price {
  height: 22px;
  width: 90px;
}

.deal-card--skeleton .skeleton-time {
  height: 12px;
  width: 60px;
}

.deal-card--skeleton .skeleton-cta {
  height: 40px;
  width: calc(100% - 36px);
  margin: 0 18px 18px;
  border-radius: var(--radius-md);
}

/* ─── Loading Spinner ───────────────────────────────────────────────────────── */
.loading-container {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

.loading-container[hidden] {
  display: none;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-ring {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

/* ─── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

/* ─── End of Feed ───────────────────────────────────────────────────────────── */
.end-of-feed {
  text-align: center;
  padding: 40px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.end-of-feed[hidden] {
  display: none;
}

/* ─── Back to Top ───────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--duration-normal) var(--ease-smooth);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.back-to-top[hidden] {
  display: grid; /* Override hidden to let transition work */
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ─── Scroll Sentinel ───────────────────────────────────────────────────────── */
.scroll-sentinel {
  height: 1px;
  width: 100%;
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --content-padding: 16px;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .header-stats {
    gap: 6px;
  }

  .stat-pill {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  .deals-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .search-input {
    height: 46px;
    font-size: 0.9rem;
  }

  .filter-bar {
    padding: 6px 0 20px;
    gap: 6px;
  }

  .filter-pill {
    padding: 6px 14px;
    font-size: 0.78rem;
  }

  .deal-card__body {
    padding: 14px 14px 12px;
  }

  .deal-card__footer {
    padding: 0 14px 14px;
  }

  .deal-card__cta {
    margin: 0 14px 14px;
  }

  .ambient-orb {
    opacity: 0.2;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1101px) {
  .deals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Reduced Motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .deal-card {
    animation: none;
  }
}

/* ─── Selection ─────────────────────────────────────────────────────────────── */
::selection {
  background: hsla(265, 90%, 65%, 0.3);
  color: var(--text-primary);
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: hsla(220, 15%, 30%, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsla(220, 15%, 40%, 0.6);
}

/* ─── Affiliate Tag (per-link disclosure) ──────────────────────────────────── */
.deal-card__affiliate-tag {
  display: block;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 0 16px 12px;
  opacity: 0.6;
}

/* ─── Site Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 10;
  margin-top: 60px;
  padding: 40px var(--content-padding) 30px;
  border-top: 1px solid var(--border-subtle);
  background: hsla(220, 25%, 6%, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-disclosure {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 20px 24px;
  background: hsla(220, 20%, 12%, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.disclosure-text {
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-tertiary);
}

.disclosure-text strong {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-smooth);
}

.footer-link:hover {
  color: var(--accent-purple);
}

.footer-divider {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── Legal Pages (Privacy / Terms) ────────────────────────────────────────── */
.legal-page {
  position: relative;
  z-index: 10;
  max-width: 780px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 40px) var(--content-padding) 60px;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-page p {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-page ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.legal-page li {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  margin-bottom: 4px;
}

.legal-page li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent-purple);
  font-weight: 700;
}

.legal-page a {
  color: var(--accent-purple);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-smooth);
}

.legal-page a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.legal-page section {
  padding-bottom: 4px;
  border-bottom: 1px solid hsla(220, 15%, 20%, 0.3);
}

.legal-page section:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .legal-page {
    padding-top: calc(var(--header-height) + 24px);
  }

  .legal-page h1 {
    font-size: 1.5rem;
  }

  .footer-disclosure {
    padding: 16px;
  }

  .deal-card__affiliate-tag {
    font-size: 0.6rem;
  }
}

/* ─── Light Theme ──────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-primary:    hsl(220, 20%, 96%);
  --bg-secondary:  hsl(220, 15%, 92%);
  --bg-card:       hsla(220, 20%, 100%, 0.85);
  --bg-card-hover: hsla(220, 20%, 98%, 0.95);
  --bg-glass:      hsla(220, 20%, 100%, 0.7);

  --text-primary:    hsl(220, 25%, 12%);
  --text-secondary:  hsl(220, 15%, 38%);
  --text-tertiary:   hsl(220, 10%, 55%);
  --text-muted:      hsl(220, 10%, 70%);

  --border-subtle:   hsla(220, 20%, 80%, 0.5);
  --border-glass:    hsla(220, 50%, 80%, 0.2);

  --shadow-card:     0 2px 16px hsla(220, 20%, 0%, 0.08), 0 1px 4px hsla(220, 20%, 0%, 0.05);
  --shadow-card-hover: 0 8px 32px hsla(265, 60%, 40%, 0.1), 0 4px 12px hsla(220, 20%, 0%, 0.08);
  --shadow-glow:     0 0 20px hsla(265, 90%, 65%, 0.1);
}

[data-theme="light"] .ambient-orb {
  opacity: 0.12;
}

[data-theme="light"] .site-header {
  background: hsla(220, 20%, 100%, 0.8);
}

[data-theme="light"] .site-footer {
  background: hsla(220, 15%, 94%, 0.9);
}

[data-theme="light"] .footer-disclosure {
  background: hsla(220, 15%, 90%, 0.7);
}

[data-theme="light"] .logo-img {
  filter: none;
}

/* ─── Theme Toggle Button ──────────────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--accent-purple);
  border-color: var(--accent-purple);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-icon--light { display: none; }
.theme-icon--dark { display: block; }
[data-theme="light"] .theme-icon--light { display: block; }
[data-theme="light"] .theme-icon--dark { display: none; }

/* ─── Telegram CTA Banner ──────────────────────────────────────────────────── */
.telegram-cta {
  position: relative;
  z-index: 50;
  background: linear-gradient(135deg, hsl(200, 80%, 50%), hsl(210, 90%, 45%));
  padding: 10px var(--content-padding);
}

.telegram-cta[hidden] {
  display: none;
}

.telegram-cta__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.telegram-cta__icon {
  font-size: 1.2rem;
}

.telegram-cta__text {
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
}

.telegram-cta__btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: hsla(0, 0%, 100%, 0.2);
  border-radius: var(--radius-pill);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-smooth);
}

.telegram-cta__btn:hover {
  background: hsla(0, 0%, 100%, 0.35);
}

.telegram-cta__close {
  background: none;
  border: none;
  color: hsla(0, 0%, 100%, 0.7);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  margin-left: 8px;
}

.telegram-cta__close:hover {
  color: white;
}

/* ─── Sort Bar ─────────────────────────────────────────────────────────────── */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sort-bar {
  display: flex;
  gap: 8px;
  padding: 0 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sort-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: inherit;
}

.sort-pill:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.sort-pill--active {
  background: hsla(265, 90%, 65%, 0.12);
  border-color: hsla(265, 90%, 65%, 0.3);
  color: var(--accent-purple);
}

/* ─── Hero Section ─────────────────────────────────────────────────────────── */
.hero-section {
  padding: 0 0 24px;
}

.hero-section[hidden] {
  display: none;
}

.hero-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.hero-scroll::-webkit-scrollbar {
  height: 4px;
}

.hero-scroll::-webkit-scrollbar-thumb {
  background: hsla(265, 90%, 65%, 0.3);
  border-radius: 2px;
}

.hero-card {
  flex-shrink: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  scroll-snap-align: start;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent-purple);
}

.hero-card__img {
  height: 140px;
  display: grid;
  place-items: center;
  background: var(--bg-secondary);
  overflow: hidden;
}

.hero-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card__icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.hero-card__info {
  padding: 12px;
}

.hero-card__discount {
  display: inline-block;
  background: hsla(340, 90%, 60%, 0.15);
  color: var(--discount-color);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
}

.hero-card__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Share Buttons ────────────────────────────────────────────────────────── */
.deal-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
}

.deal-card__actions .deal-card__cta {
  margin: 0;
  flex: 1;
}

.deal-card__share {
  display: flex;
  gap: 4px;
}

.share-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--bg-glass);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  text-decoration: none;
  font-family: inherit;
  padding: 0;
}

.share-btn svg {
  width: 15px;
  height: 15px;
}

.share-btn--whatsapp:hover {
  background: hsl(142, 70%, 45%);
  color: white;
  border-color: hsl(142, 70%, 45%);
}

.share-btn--telegram:hover {
  background: hsl(200, 80%, 50%);
  color: white;
  border-color: hsl(200, 80%, 50%);
}

.share-btn--copy:hover {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
}

/* ─── Deal Detail Modal ────────────────────────────────────────────────────── */
.deal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.deal-modal-overlay[hidden] {
  display: none;
}

.deal-modal {
  position: relative;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px hsla(0, 0%, 0%, 0.5);
  animation: modalIn 0.3s var(--ease-spring);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
}

.deal-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: hsla(0, 0%, 0%, 0.4);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.deal-modal__close:hover {
  background: hsla(0, 0%, 0%, 0.7);
}

.deal-modal__image img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.deal-modal__details {
  padding: 24px;
}

.deal-modal__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.deal-modal__price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--price-color);
  margin-bottom: 16px;
}

.deal-modal__raw {
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-tertiary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.deal-modal__time {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.deal-modal__cta {
  margin: 0 !important;
}

.deal-modal__share {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.deal-modal__share-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  display: block;
}

.deal-modal__share-btns {
  display: flex;
  gap: 8px;
}

.deal-modal__share-btns .share-btn {
  width: 40px;
  height: 40px;
}

.deal-modal__share-btns .share-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── Toast Notifications ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  background: var(--accent-purple);
  color: white;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 32px hsla(265, 90%, 40%, 0.3);
  opacity: 0;
  transition: all 0.3s var(--ease-smooth);
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Mobile Responsive Additions ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-card {
    width: 220px;
  }

  .hero-card__img {
    height: 110px;
  }

  .deal-card__actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .deal-card__actions .deal-card__cta {
    flex-basis: 100%;
    margin: 0;
  }

  .deal-card__share {
    width: 100%;
    justify-content: center;
  }

  .deal-modal {
    max-height: 95vh;
  }

  .deal-modal__title {
    font-size: 1.1rem;
  }

  .telegram-cta__inner {
    font-size: 0.8rem;
  }

  .sort-bar {
    padding: 0 0 8px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .controls-bar {
    gap: 4px;
  }
}

/* ─── Status Filter Tabs & Badges ─────────────────────────────────────────── */
.status-bar {
  display: flex;
  gap: 8px;
  padding: 4px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.status-bar::-webkit-scrollbar {
  display: none;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  backdrop-filter: blur(8px);
  user-select: none;
}
.status-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.status-pill--active {
  background: hsla(220, 20%, 30%, 0.4);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 0 2px 10px hsla(265, 60%, 50%, 0.2);
}
.status-pill--active[data-status="live"] {
  border-color: #10b981;
  background: hsla(150, 70%, 45%, 0.15);
  color: #34d399;
}
.status-pill--active[data-status="price_drop"] {
  border-color: #f59e0b;
  background: hsla(38, 92%, 50%, 0.15);
  color: #fbbf24;
}
.status-pill--active[data-status="expired"] {
  border-color: #ef4444;
  background: hsla(0, 84%, 60%, 0.15);
  color: #f87171;
}

/* Expired deal card styling */
.deal-card--expired {
  opacity: 0.72;
}
.deal-card--expired .deal-card__image {
  filter: grayscale(35%);
}
.deal-card--expired .deal-card__price:not(.deal-card__price--hiked) {
  text-decoration: line-through;
  opacity: 0.6;
}
.deal-card--expired .deal-card__cta {
  background: hsla(0, 0%, 50%, 0.2);
  border-color: hsla(0, 0%, 50%, 0.3);
  color: var(--text-secondary);
}

/* Status Badges on Image */
.deal-card__status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  z-index: 2;
}
.deal-card__status-badge--unavailable {
  background: hsla(0, 82%, 42%, 0.94);
  color: #fff;
  border: 1px solid hsla(0, 100%, 75%, 0.35);
  box-shadow: 0 2px 10px hsla(0, 82%, 40%, 0.5);
}
.deal-card__status-badge--expired {
  background: hsla(25, 88%, 46%, 0.92);
  color: #fff;
  box-shadow: 0 2px 8px hsla(25, 88%, 46%, 0.4);
}
.deal-card__status-badge--hiked {
  background: hsla(25, 92%, 46%, 0.95);
  color: #fff;
  border: 1px solid hsla(25, 100%, 70%, 0.35);
  box-shadow: 0 2px 10px hsla(25, 90%, 45%, 0.4);
}
.deal-card__status-badge--drop {
  background: hsla(38, 95%, 48%, 0.95);
  color: #000;
  font-weight: 800;
  box-shadow: 0 2px 8px hsla(38, 95%, 48%, 0.4);
}
.deal-card__stock-note {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: hsl(0, 85%, 68%);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: hsla(0, 85%, 50%, 0.12);
  border: 1px solid hsla(0, 85%, 50%, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.deal-card__stock-note--expired {
  color: hsl(25, 90%, 75%);
  background: hsla(25, 90%, 50%, 0.12);
  border-color: hsla(25, 90%, 50%, 0.3);
}

/* Price Hiked Card Styles */
.deal-card--price-hiked .deal-card__price--original-striked {
  text-decoration: line-through;
  opacity: 0.55;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.deal-card__price--hiked {
  font-size: 1.15rem;
  font-weight: 800;
  color: hsl(25, 95%, 62%) !important;
  text-decoration: none !important;
  opacity: 1 !important;
}
.deal-card__hiked-note {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: hsl(25, 100%, 75%);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: hsla(25, 90%, 50%, 0.15);
  border: 1px solid hsla(25, 90%, 50%, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Bank Offer Badge */
.deal-card__bank-offer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: hsla(210, 90%, 50%, 0.12);
  border: 1px solid hsla(210, 90%, 50%, 0.28);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: hsl(210, 100%, 75%);
  margin-top: 4px;
}
.deal-card__price-sub {
  font-size: 0.70rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
