/* ═══════════════════════════════════════════════════════
   Marais 大特價 — Premium Redesign
   Warm stone palette · Outfit typeface · Asymmetric hero
   Tinted shadows · Grain texture · Micro-interactions
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────── */
:root {
  /* Canvas & Surface — warm stone family */
  --canvas: #fafaf9;
  --canvas-pure: #ffffff;
  --canvas-warm: #f5f0eb;
  --surface: #f5f5f4;
  --surface-warm: rgba(245, 240, 235, 0.8);
  --surface-elevated: #ffffff;

  /* Text — stone scale */
  --text-primary: #1c1917;
  --text-body: #292524;
  --text-secondary: #57534e;
  --text-muted: #a8a29e;

  /* Accent — deep teal (deals) */
  --accent: #134e4a;
  --accent-soft: rgba(19, 78, 74, 0.08);
  --accent-medium: rgba(19, 78, 74, 0.15);

  /* Interactive */
  --border-light: #e7e5e4;
  --border-subtle: rgba(28, 25, 23, 0.06);
  --border-hover: rgba(28, 25, 23, 0.12);

  /* Sale Colors */
  --price-down: #134e4a;
  --price-down-bg: rgba(19, 78, 74, 0.08);
  --price-up: #9a3412;
  --price-up-bg: rgba(154, 52, 18, 0.08);

  /* Glass morphism */
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-light: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(16px);
  --shadow-card-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 4px 24px rgba(28, 25, 23, 0.05),
    0 1px 3px rgba(28, 25, 23, 0.03);
  --shadow-card-hover-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 12px 40px rgba(28, 25, 23, 0.08);
  --shadow-filter-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 12px rgba(28, 25, 23, 0.04);
  --badge-glow: 0 2px 8px rgba(19, 78, 74, 0.2);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-pill: 9999px;

  /* Shadows — warm-tinted, multi-layer */
  --shadow-inset: inset 0 0 0 0.5px rgba(28, 25, 23, 0.06);
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm:
    0 1px 2px rgba(28, 25, 23, 0.05),
    0 2px 4px rgba(28, 25, 23, 0.03);
  --shadow-card:
    0 1px 3px rgba(28, 25, 23, 0.04),
    0 4px 16px rgba(28, 25, 23, 0.04);
  --shadow-hover:
    0 4px 12px rgba(28, 25, 23, 0.07),
    0 16px 40px rgba(28, 25, 23, 0.08);
  --shadow-modal:
    0 8px 30px rgba(28, 25, 23, 0.1),
    0 24px 64px rgba(28, 25, 23, 0.14);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Noto Serif TC', 'Times New Roman', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

  /* Spacing — 4px base */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.2s;
  --duration-md: 0.35s;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--canvas);
  line-height: 1.6;
  letter-spacing: 0.01em;
  min-height: 100vh;
  position: relative;
}

/* Grain / noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Typography ─────────────────────────────────────── */
.type-hero {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}

.type-heading {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.type-subheading {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-primary);
}

.type-body-lg {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.type-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.type-caption {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.type-tiny {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Navigation ─────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.82);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--sp-8);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease-out);
  cursor: pointer;
  position: relative;
}

.nav-link:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--text-primary);
  color: var(--canvas);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-primary);
  margin: 4px 0;
  border-radius: 1px;
  transition: all var(--duration) var(--ease-out);
}

/* ── Hero Section — Split Layout ────────────────────── */
.hero {
  padding: 36px 40px 28px;
  background: var(--canvas);
  border-bottom: 1px solid rgba(231, 229, 228, 0.4);
  position: relative;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-12);
}

.hero-left {
  flex: 1;
}

.hero-right {
  display: flex;
  gap: 32px;
  align-items: flex-end;
}

.hero-title {
  margin-top: var(--sp-2);
  line-height: 1.1;
}

.hero-title-marais {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: -1.5px;
}

.hero-title-aubaine {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  font-style: italic;
  background: linear-gradient(
    90deg,
    #134e4a 0%,
    #0f766e 25%,
    #134e4a 50%,
    #115e59 75%,
    #134e4a 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite, fadeSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0s, 0.3s;
}

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

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-meta {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--price-down-bg);
  color: var(--price-down);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}

.hero-timestamp {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-count-block {
  text-align: right;
}

.hero-count {
  font-size: 72px;
  font-weight: 200;
  font-family: var(--font-mono);
  letter-spacing: -4px;
  line-height: 1;
}

.hero-count-drop {
  color: var(--price-down);
}

.hero-count-up {
  color: var(--price-up);
}

.hero-count-label {
  font-size: 13px;
  font-weight: 500;
  color: #78716c;
  margin-top: 4px;
  text-align: right;
}

.hero-count-divider {
  width: 1px;
  height: 60px;
  background: rgba(231, 229, 228, 0.6);
}

/* Micro label utility */
.micro-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

/* Legacy stat classes (used by history/watchlist pages) */
.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: var(--sp-1);
  font-weight: 500;
}

/* ── Filter Bar — glass morphism ───────────────────── */
.filter-bar {
  max-width: 1280px;
  margin: var(--sp-2) auto var(--sp-2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface-glass-light);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-filter-glass);
  position: relative;
  z-index: 10;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.filter-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 3px;
  background: var(--border-light);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.filter-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.2);
  transition: transform var(--duration) var(--ease-spring);
}

.filter-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.filter-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.2);
}

.filter-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  min-width: 90px;
  color: var(--text-primary);
}

.filter-select {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 30px 7px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--text-body);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23a8a29e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter-search {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--text-body);
  outline: none;
  min-width: 200px;
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.filter-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter-search::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  white-space: nowrap;
  position: relative;
  user-select: none;
}

.btn:active {
  transform: scale(0.97) translateY(1px);
  transition-duration: 0.08s;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--canvas);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(28, 25, 23, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active {
  box-shadow: none;
  transform: scale(0.97) translateY(1px);
}

.btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-body);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-warm {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.btn-warm:hover {
  background: var(--accent-medium);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 13px;
  padding: 5px 14px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-subtle);
}

.btn-icon:hover {
  box-shadow: var(--shadow-sm);
}

/* ── Product Grid ───────────────────────────────────── */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-8);
}

.section-header {
  margin-bottom: var(--sp-8);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ── Product Card — Glass Morphism ──────────────────── */
.product-card {
  background: var(--surface-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card-glass);
  opacity: 0;
  transform: translateY(24px);
}

.product-card.card-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card.card-visible:hover {
  box-shadow: var(--shadow-card-hover-glass);
  transform: translateY(-4px);
}

.product-card.card-fade-out {
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  transition: opacity 0.25s ease-in, transform 0.25s ease-in;
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.product-card:hover .card-image {
  transform: scale(1.05);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--canvas-warm);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(19, 78, 74, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: -0.3px;
  z-index: 2;
  box-shadow: var(--badge-glow);
}

.card-track-btn {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--duration) var(--ease-out);
  box-shadow: var(--shadow-xs);
  opacity: 0;
  transform: scale(0.8);
}

.product-card:hover .card-track-btn {
  opacity: 1;
  transform: scale(1);
}

.card-track-btn:hover {
  background: var(--surface-elevated);
  box-shadow: var(--shadow-sm);
  transform: scale(1.1);
}

.card-track-btn.tracked {
  background: var(--price-down);
  color: var(--canvas);
  opacity: 1;
  transform: scale(1);
  border-color: transparent;
}

.card-track-btn:active {
  transform: scale(0.95);
}

.card-body {
  padding: 14px 16px 16px;
}

.card-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-brand {
  font-size: 11px;
  font-weight: 600;
  color: var(--price-down);
}

.card-time {
  font-size: 10px;
  color: var(--text-muted);
}

.card-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-body);
  margin-bottom: var(--sp-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-prices {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.price-current {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.card-savings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--price-down);
  background: rgba(19, 78, 74, 0.06);
  border: 1px solid rgba(19, 78, 74, 0.12);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.card-savings.card-savings-up {
  color: var(--price-up);
  background: rgba(154, 52, 18, 0.06);
  border-color: rgba(154, 52, 18, 0.12);
}

/* ── Load More ──────────────────────────────────────── */
.load-more-wrap {
  text-align: center;
  padding: var(--sp-10) 0 var(--sp-16);
}

/* ── Modal — Product Detail ─────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 25, 23, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface-elevated);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-modal);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.4s var(--ease-out);
  position: relative;
  border: 1px solid var(--border-subtle);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(250, 250, 249, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease-out);
}

.modal-close:hover {
  background: var(--surface);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Left-image right-text layout */
.modal-layout {
  display: flex;
  align-items: stretch;
}

.modal-image-wrap {
  width: 320px;
  flex-shrink: 0;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.modal-body {
  flex: 1;
  padding: var(--sp-8);
  padding-top: calc(var(--sp-8) + 36px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.modal-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.modal-discount-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--price-down-bg);
  color: var(--price-down);
  letter-spacing: 0;
}

.modal-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: var(--sp-5);
}

.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}

.modal-price-current {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal-price-original {
  font-size: 17px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.modal-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.tag-discount {
  background: var(--price-down-bg);
  color: var(--price-down);
  border-color: transparent;
  font-weight: 600;
}

.modal-chart-section {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  flex: 1;
}

.modal-chart-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.chart-container {
  position: relative;
  height: 160px;
  width: 100%;
}

.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
}

.modal-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

/* ── History Page ───────────────────────────────────── */

/* Stats row */
.hist-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  margin-top: var(--sp-6);
}

.hist-stat {
  text-align: center;
}

.hist-stat-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
}

.hist-stat-num.hist-stat-down { color: var(--price-down); }
.hist-stat-num.hist-stat-up { color: var(--price-up); }

.hist-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: var(--sp-1);
  font-weight: 600;
}

.hist-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-light);
}

/* History list */
.hist-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* History Card */
.hist-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: var(--sp-5) var(--sp-6);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}

.hist-card.hcard-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s;
}

.hist-card.hcard-visible:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

/* Card inner layout */
.hist-card-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.hist-card-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.hist-card-thumb-ph {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--canvas-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.hist-card-body {
  flex: 1;
  min-width: 0;
}

.hist-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}

.hist-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hist-card-right {
  flex-shrink: 0;
  text-align: right;
}

/* Price row */
.hist-card-prices {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

.hist-price-old {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.hist-price-arrow {
  color: var(--border-light);
  font-size: 12px;
}

.hist-price-new {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.hist-price-new.down { color: var(--price-down); }
.hist-price-new.up { color: var(--price-up); }

/* Direction badge */
.hist-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.01em;
}

.hist-badge.down {
  background: var(--price-down-bg);
  color: var(--price-down);
}

.hist-badge.up {
  background: var(--price-up-bg);
  color: var(--price-up);
}

/* Expand chevron */
.hist-card-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.3s var(--ease-out), background 0.2s;
  margin-top: var(--sp-1);
}

.hist-card.expanded .hist-card-chevron {
  transform: rotate(180deg);
  background: var(--border-light);
}

/* Chart expand area */
.hist-chart-wrap {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s var(--ease-out), opacity 0.35s var(--ease-out), margin-top 0.3s var(--ease-out), padding-top 0.3s var(--ease-out);
}

.hist-card.expanded .hist-chart-wrap {
  max-height: 280px;
  opacity: 1;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
}

.hist-chart-container {
  height: 180px;
  position: relative;
}

.hist-card-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* ── History Filter Bar ─────────────────────────────── */
.hist-filter-bar {
  margin-top: calc(-1 * var(--sp-4));
}

/* Direction tabs */
.hist-tabs {
  display: flex;
  gap: var(--sp-1);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.hist-tab {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  white-space: nowrap;
}

.hist-tab:hover {
  color: var(--text-primary);
}

.hist-tab.active {
  background: var(--text-primary);
  color: var(--canvas);
  box-shadow: var(--shadow-xs);
}

.hist-tab:active {
  transform: scale(0.96);
}

/* Date group header */
.hist-date-header {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: var(--sp-2) 0 var(--sp-1);
  margin-top: var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

.hist-date-header:first-child {
  margin-top: 0;
}

/* ── Watchlist Page ──────────────────────────────────── */
.watchlist-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.watchlist-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--duration-md) var(--ease-out);
}

.watchlist-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

.watchlist-card-top {
  display: flex;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
}

.watchlist-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.watchlist-info {
  flex: 1;
  min-width: 0;
}

.watchlist-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.watchlist-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-body);
  margin-top: 2px;
}

.watchlist-prices {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.watchlist-actions {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.watchlist-chart-wrap {
  padding: 0 var(--sp-6) var(--sp-5);
}

.watchlist-chart-container {
  height: 160px;
  position: relative;
}

/* ── Empty State ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-20) var(--sp-8);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: var(--sp-4);
  opacity: 0.2;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.empty-text {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: var(--sp-6);
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Skeleton Loading ───────────────────────────────── */
.skeleton {
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--canvas-warm) 50%,
    var(--surface) 70%
  );
  background-size: 250% 100%;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
  0% { background-position: 250% 0; }
  100% { background-position: -250% 0; }
}

.skeleton-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.skeleton-image {
  aspect-ratio: 3 / 4;
  background: var(--surface);
}

.skeleton-body {
  padding: var(--sp-4) var(--sp-5);
}

.skeleton-line {
  height: 14px;
  margin-bottom: var(--sp-2);
  border-radius: 4px;
}

.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-full { width: 100%; }

/* ── Loading Banner ────────────────────────────────── */
.loading-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface-glass);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin: 0 auto var(--sp-6);
  max-width: 480px;
  box-shadow: var(--shadow-filter-glass);
}

.loading-banner-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-top-color: var(--price-down);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-banner-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.loading-banner-dot {
  display: inline-block;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-banner-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-banner-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* ── Hero Skeleton ─────────────────────────────────── */
.hero-count-skeleton {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--canvas-warm) 50%,
    var(--surface) 70%
  );
  background-size: 250% 100%;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

.hero-badge-skeleton {
  width: 100px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--canvas-warm) 50%,
    var(--surface) 70%
  );
  background-size: 250% 100%;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

/* ── Top Deals Skeleton ────────────────────────────── */
.skeleton-top-deal {
  min-width: 200px;
  height: 240px;
  border-radius: var(--radius-xl);
  flex-shrink: 0;
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--canvas-warm) 50%,
    var(--surface) 70%
  );
  background-size: 250% 100%;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
  border: 1px solid var(--border-subtle);
}

/* ── Brand Bento Skeleton ──────────────────────────── */
.skeleton-bento-main {
  grid-row: span 2;
  border-radius: var(--radius-xl);
  min-height: 200px;
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--canvas-warm) 50%,
    var(--surface) 70%
  );
  background-size: 250% 100%;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
  border: 1px solid var(--border-subtle);
}

.skeleton-bento-sm {
  border-radius: var(--radius-lg);
  min-height: 90px;
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--canvas-warm) 50%,
    var(--surface) 70%
  );
  background-size: 250% 100%;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
  border: 1px solid var(--border-subtle);
}

/* ── Tab Badge Skeleton ────────────────────────────── */
.tab-badge-skeleton {
  display: inline-block;
  width: 24px;
  height: 16px;
  border-radius: 8px;
  vertical-align: middle;
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--canvas-warm) 50%,
    var(--surface) 70%
  );
  background-size: 250% 100%;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

/* ── Pagination ─────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
}

.pagination-info {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 var(--sp-4);
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: var(--sp-10) var(--sp-8);
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--sp-16);
}

/* ── Hero Big Stat ─────────────────────────────────── */
.stat-item-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-elevated);
  padding: var(--sp-8) var(--sp-10);
  border-radius: var(--radius-3xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  min-width: 200px;
}

.stat-value-big {
  font-size: 72px;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  color: var(--text-primary);
  transition: transform 0.3s var(--ease-out);
  letter-spacing: -0.03em;
}

.stat-value-big.counting {
  transform: scale(1.06);
}

/* ── Card Staggered Reveal ──────────────────────────── */
/* (base opacity/transform is on .product-card above) */

/* ── Infinite Scroll Sentinel ───────────────────────── */
.scroll-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--sp-10) 0 var(--sp-12);
  min-height: 80px;
}

.scroll-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-light);
  border-top-color: var(--price-down);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.scroll-end {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── Hero Stats Grid (4-column) ────────────────────── */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  width: 100%;
  max-width: 600px;
}

.hero-stats-grid .stat-item-hero {
  padding: var(--sp-5) var(--sp-4);
  min-width: 0;
}

.hero-stats-grid .stat-value {
  font-size: 24px;
  font-family: var(--font-display);
  font-weight: 400;
  white-space: nowrap;
}

.hero-stats-grid .stat-value-big {
  font-size: 32px;
}

.hero-stats-grid .stat-label {
  font-size: 11px;
}

/* ── Product Tabs ──────────────────────────────────── */
.product-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(231, 229, 228, 0.5);
}

.product-tab {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--duration) var(--ease-out);
}

.product-tab:hover {
  color: var(--text-body);
}

.product-tab.active[data-direction="drop"] {
  color: var(--price-down);
  border-bottom-color: var(--price-down);
  font-weight: 600;
}

.product-tab.active[data-direction="up"] {
  color: var(--price-up);
  border-bottom-color: var(--price-up);
  font-weight: 600;
}

.tab-badge {
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 2px;
}

.tab-badge-drop {
  background: var(--price-down-bg);
  color: var(--price-down);
}

.tab-badge-up {
  background: var(--price-up-bg);
  color: var(--price-up);
}

/* ── Products Section ──────────────────────────────── */
.products-section {
  padding: 24px 40px 40px;
}

/* ── Brand Bento Grid ──────────────────────────────── */
.brand-bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 8px;
}

.brand-bento-main {
  grid-row: span 2;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
}

.brand-bento-main:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover-glass);
}

.brand-bento-main-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-body);
  letter-spacing: -0.5px;
}

.brand-bento-main-count {
  font-size: 12px;
  color: #78716c;
  margin-top: 3px;
}

.brand-bento-sm {
  background: var(--surface-glass-light);
  border: 1px solid rgba(231, 229, 228, 0.4);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
}

.brand-bento-sm:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.brand-bento-sm-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
}

.brand-bento-sm-count {
  font-size: 11px;
  color: #78716c;
  margin-top: 2px;
}

/* ── Nav Brand Logo (Playfair) ─────────────────────── */
.nav-brand-logo {
  font-family: var(--font-display) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -0.5px !important;
}

/* ── Alert Banner ─────────────────────────────────── */
.alert-banner {
  max-width: 1280px;
  margin: var(--sp-4) auto;
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-body);
  animation: slideDown 0.3s var(--ease-out);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.alert-text {
  flex: 1;
  font-weight: 500;
}

.alert-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
}

.alert-link:hover {
  text-decoration: underline;
}

.alert-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--sp-1);
  line-height: 1;
}

.alert-close:hover {
  color: var(--text-body);
}

/* ── Quick Filter Chips ──────────────────────────────── */
.quick-filters {
  max-width: 1280px;
  margin: var(--sp-4) auto var(--sp-2);
  padding: 0 var(--sp-6);
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quick-filters::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border: 1px solid rgba(231, 229, 228, 0.5);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #57534e;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration) var(--ease-out);
}

.quick-chip:hover {
  border-color: var(--price-down);
  color: var(--price-down);
}

.quick-chip.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--canvas);
}

/* ── Filter Toggle (Mobile) ──────────────────────────── */
.filter-toggle {
  display: none; /* shown in responsive */
  max-width: 1280px;
  margin: var(--sp-2) auto;
  padding: var(--sp-3) var(--sp-6);
  width: calc(100% - var(--sp-6));
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-body);
  cursor: pointer;
}

.filter-toggle-icon {
  transition: transform var(--duration) var(--ease-out);
  font-size: 12px;
}

.filter-toggle.open .filter-toggle-icon {
  transform: rotate(180deg);
}

/* ── View Toggle ─────────────────────────────────────── */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex-shrink: 0;
}

.view-btn {
  font-size: 16px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
}

.view-btn:hover {
  color: var(--text-body);
}

.view-btn.active {
  background: var(--text-primary);
  color: var(--canvas);
  box-shadow: var(--shadow-xs);
}

/* ── List View Mode ──────────────────────────────────── */
.product-grid.list-view {
  grid-template-columns: 1fr !important;
  gap: var(--sp-3);
}

.product-grid.list-view .product-card {
  display: flex;
  flex-direction: row;
  border-radius: var(--radius-lg);
}

.product-grid.list-view .card-image-wrap {
  width: 140px;
  min-width: 140px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.product-grid.list-view .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Top Deals Section ───────────────────────────────── */
.top-deals-section,
.brand-summary-section,
.recent-section {
  max-width: 1280px;
  margin: var(--sp-6) auto;
  padding: 0 var(--sp-6);
}

.section-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
  letter-spacing: 0.01em;
}

.top-deals-scroll {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
}

.top-deals-scroll::-webkit-scrollbar {
  display: none;
}

.top-deal-card {
  min-width: 200px;
  max-width: 260px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card-glass);
}

.top-deal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.06);
}

.top-deal-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--surface);
}

.top-deal-card-img-ph {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 28px;
}

.top-deal-card-body {
  padding: var(--sp-4);
}

.top-deal-card-brand {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-1);
}

.top-deal-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.top-deal-card-prices {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.top-deal-price-new {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--price-down);
}

.top-deal-price-old {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.top-deal-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--price-down-bg);
  color: var(--price-down);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  margin-top: var(--sp-2);
}

/* ── Brand Summary Chips ─────────────────────────────── */
.brand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.brand-chip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: var(--surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  white-space: nowrap;
}

.brand-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.brand-chip-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: var(--sp-1);
}

.brand-chip-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--price-down);
  margin-left: var(--sp-1);
}

/* ── Recently Viewed ─────────────────────────────────── */
.recent-scroll {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
}

.recent-scroll::-webkit-scrollbar {
  display: none;
}

.recent-card {
  min-width: 130px;
  max-width: 150px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.recent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.recent-card-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  background: var(--surface);
}

.recent-card-img-ph {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 20px;
}

.recent-card-body {
  padding: var(--sp-2) var(--sp-3);
}

.recent-card-brand {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recent-card-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 2px;
}

/* ── Card Trend Indicator ────────────────────────────── */
.card-trend {
  font-size: 11px;
  font-weight: 600;
  margin-left: var(--sp-2);
}

.card-trend.trend-down {
  color: var(--price-down);
}

.card-trend.trend-up {
  color: var(--price-up);
}

/* ── Utilities ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-4 { margin-bottom: var(--sp-4); }
.hidden { display: none !important; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: var(--sp-8) var(--sp-6) var(--sp-6);
  }

  .hero-inner {
    flex-direction: column;
    gap: var(--sp-6);
  }

  .hero-left {
    text-align: center;
  }

  .hero-meta {
    justify-content: center;
  }

  .hero-right {
    justify-content: center;
  }

  .hero-count {
    font-size: 56px;
  }

  .hero-count-block {
    text-align: center;
  }

  .hero-count-label {
    text-align: center;
  }

  .filter-bar {
    margin: 0 var(--sp-4);
    padding: var(--sp-4);
  }

  .section {
    padding: var(--sp-6);
  }

  .products-section {
    padding: var(--sp-6);
  }

  .brand-bento-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .card-image-wrap {
    aspect-ratio: 4 / 3;
  }

  .nav {
    padding: 0 var(--sp-4);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--sp-4);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--sp-1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .type-hero {
    font-size: 28px;
  }

  .type-heading {
    font-size: 24px;
  }

  .stat-value {
    font-size: 28px;
  }

  .hist-stats {
    gap: var(--sp-5);
  }

  .hist-stat-num {
    font-size: 28px;
  }

  .hist-card-thumb,
  .hist-card-thumb-ph {
    width: 40px;
    height: 40px;
  }

  .hist-card-name {
    font-size: 13px;
  }

  .hist-tabs {
    width: 100%;
    justify-content: center;
  }

  .hist-filter-bar {
    margin-top: 0;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
    margin: 0 var(--sp-3);
    border-radius: var(--radius-xl);
  }

  .filter-group {
    width: 100%;
  }

  .filter-search {
    min-width: auto;
    width: 100%;
  }

  .filter-slider {
    flex: 1;
  }

  .modal {
    border-radius: var(--radius-xl);
  }

  .modal-overlay {
    padding: var(--sp-3);
    align-items: flex-end;
  }

  .modal-layout {
    flex-direction: column;
  }

  .modal-image-wrap {
    width: 100%;
    height: 220px;
  }

  .modal-body {
    padding: var(--sp-5);
    padding-top: var(--sp-5);
  }

  .modal-price-current {
    font-size: 24px;
  }

  .watchlist-card-top {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .watchlist-image {
    width: 60px;
    height: 60px;
  }

  .section {
    padding: var(--sp-4);
  }

  .hero {
    padding: var(--sp-6) var(--sp-4) var(--sp-4);
  }

  .hero-count {
    font-size: 48px;
    letter-spacing: -2px;
  }

  .hero-title-marais,
  .hero-title-aubaine {
    font-size: 28px;
  }

  .hero-count-divider {
    height: 40px;
  }

  .brand-bento-grid {
    grid-template-columns: 1fr;
  }

  .brand-bento-main {
    grid-row: span 1;
  }

  .products-section {
    padding: var(--sp-4);
  }

  .card-track-btn {
    opacity: 1;
    transform: scale(1);
  }

  /* Mobile filter toggle */
  .filter-toggle {
    display: flex;
  }

  .filter-bar {
    transition: max-height 0.3s var(--ease-out), opacity 0.3s var(--ease-out), padding 0.3s var(--ease-out);
    overflow: hidden;
  }

  .filter-bar.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Quick filters mobile */
  .quick-filters {
    padding: 0 var(--sp-4);
  }

  /* Alert banner mobile */
  .alert-banner {
    margin: var(--sp-3) var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    flex-wrap: wrap;
    font-size: 13px;
  }

  /* List view adjustments */
  .product-grid.list-view .card-image-wrap {
    width: 100px;
    min-width: 100px;
  }

  /* Top deals / brand / recent sections */
  .top-deals-section,
  .brand-summary-section,
  .recent-section {
    padding: 0 var(--sp-4);
  }

  .top-deal-card {
    min-width: 220px;
  }
}

/* ── Selection color ────────────────────────────────── */
::selection {
  background: var(--accent-medium);
  color: var(--text-primary);
}

/* ── Focus ring for accessibility ───────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
