/* ============================================================
   INWINE — SOMMELIER IA
   Light (default): Ivory warm · Deep wine red · Amber gold
   Dark: Deep plum · Vivid wine red · Warm gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

/* ── Light Mode (default) ──────────────────────────────────── */
:root {
  --bg:           #F5EFE6;
  --bg-elevated:  #E8DECE;
  --bg-card:      #FDFAF5;
  --bg-surface:   #DDD0BC;

  --border:       #C8B89E;
  --border-light: #B0A080;

  --vino:         #7C1A2A;
  --vino-hover:   #9A2038;
  --vino-dim:     rgba(124, 26, 42, 0.10);

  --gold:         #8A6008;
  --gold-light:   #A87820;
  --gold-dim:     #C8A050;

  --cream:        #1A0C06;
  --cream-muted:  #524030;
  --cream-dim:    #8A7060;

  --on-vino:      #F5EEE6;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Lato', system-ui, sans-serif;
  --t:      0.28s ease;
  --t-slow: 0.5s ease;

  --navbar-scrolled-bg: rgba(245, 239, 230, 0.97);
  --mobile-nav-bg:      rgba(245, 239, 230, 0.98);
  --card-hover-shadow:  0 12px 32px rgba(60, 30, 10, 0.14);
  --card-big-shadow:    0 20px 48px rgba(60, 30, 10, 0.18);
  --pill-bg:            rgba(253, 250, 245, 0.92);
  --pill-border:        #C8B89E;
}

/* ── Dark Mode — Burgundy & Copper ─────────────────────────── */
[data-theme="dark"] {
  --bg:           #160A0D;
  --bg-elevated:  #221318;
  --bg-card:      #2E1A22;
  --bg-surface:   #3C242C;

  --border:       #583040;
  --border-light: #7A4858;

  --vino:         #B03050;
  --vino-hover:   #C84060;
  --vino-dim:     rgba(176, 48, 80, 0.20);

  --gold:         #C89838;
  --gold-light:   #DEAC50;
  --gold-dim:     #7A5A18;

  --cream:        #E8D4B4;
  --cream-muted:  #BC9C6C;
  --cream-dim:    #8C6840;

  --on-vino:      #F0E4CC;

  --navbar-scrolled-bg: rgba(22, 10, 13, 0.97);
  --mobile-nav-bg:      rgba(22, 10, 13, 0.99);
  --card-hover-shadow:  0 16px 40px rgba(0, 0, 0, 0.50);
  --card-big-shadow:    0 20px 50px rgba(0, 0, 0, 0.60);
  --pill-bg:            rgba(46, 26, 34, 0.85);
  --pill-border:        #583040;
}

/* ── Google Fonts: add Cormorant Garamond for luxury serif ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { background: var(--bg); color: var(--cream); font-family: var(--font-sans); line-height: 1.7; overflow-x: hidden; }
img   { max-width: 100%; display: block; }
a     { color: var(--gold); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--gold-light); }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; color: var(--cream); }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
p  { color: var(--cream-muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-gold   { color: var(--gold) !important; }
.text-vino   { color: var(--vino-hover) !important; }
.text-muted  { color: var(--cream-muted) !important; }
.text-center { text-align: center; }
.italic      { font-style: italic; }

/* ── Layout ────────────────────────────────────────────────── */
.container   { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section     { padding: 5.5rem 0; }

.section-header        { text-align: center; margin-bottom: 3.5rem; }
.section-header h2     { margin-bottom: 0.6rem; }
.section-header p      { max-width: 560px; margin: 0 auto; }

.gold-line {
  display: block; width: 56px; height: 2px;
  background: linear-gradient(90deg, var(--vino), var(--gold));
  margin: 0.8rem auto 1.2rem;
}

/* Ornamental dividers between major page sections. */
.section,
.form-section,
.results-section,
.wine-detail-section {
  position: relative;
}

.section:not(:last-child)::after,
.form-section:not(:last-child)::after,
.results-section::after,
.wine-detail-section::after {
  content: "❦";
  display: block;
  width: min(74%, 560px);
  margin: 4.5rem auto 0;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.7rem;
  line-height: 1;
  text-align: center;
  background:
    linear-gradient(var(--gold), var(--gold)) left center / calc(50% - 1.5rem) 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right center / calc(50% - 1.5rem) 1px no-repeat;
  opacity: 0.9;
}

[data-theme="dark"] .section::after,
[data-theme="dark"] .form-section::after,
[data-theme="dark"] .results-section::after,
[data-theme="dark"] .wine-detail-section::after {
  color: var(--gold-light);
}

@media (max-width: 600px) {
  .section:not(:last-child)::after,
  .form-section:not(:last-child)::after,
  .results-section::after,
  .wine-detail-section::after {
    width: 82%;
    margin-top: 3rem;
  }
}

/* ── Utilities ─────────────────────────────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }


/* ════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════ */

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1.1rem 2rem;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: all var(--t-slow);
}

.navbar.scrolled {
  background: var(--navbar-scrolled-bg);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(60, 30, 10, 0.08);
}
[data-theme="dark"] .navbar.scrolled { box-shadow: none; }

.navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.55rem; font-weight: 700;
  color: var(--cream); text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.navbar-brand .accent { color: var(--gold); }

.navbar-logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-links {
  display: flex; align-items: center; gap: 1.8rem; list-style: none;
}
.nav-links a {
  color: var(--cream-muted);
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  position: relative; transition: color var(--t);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width var(--t);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--vino) !important; color: var(--on-vino) !important;
  padding: 0.45rem 1.1rem; border-radius: 4px;
}
.nav-cta:hover { background: var(--vino-hover) !important; }
.nav-cta::after { display: none !important; }

/* Navbar controls group (right side) */
.navbar-controls {
  display: flex; align-items: center; gap: 0.5rem; justify-self: end;
}

/* Language toggle button */
.lang-toggle {
  background: none; border: 1px solid var(--border-light);
  border-radius: 20px; padding: 0.28rem 0.75rem;
  cursor: pointer; color: var(--cream-muted);
  font-size: 0.72rem; font-family: var(--ff-sans); letter-spacing: 0.08em; font-weight: 700;
  line-height: 1; transition: all var(--t); display: flex; align-items: center; gap: 0.25rem;
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
.lang-sep { color: var(--cream-muted); opacity: 0.45; }
.lang-es, .lang-en { transition: color var(--t); }
.lang-toggle .lang-active { color: var(--gold); }
html[data-lang="en"] .lang-toggle .lang-es { color: var(--cream-muted); }
html[data-lang="en"] .lang-toggle .lang-en { color: var(--gold); }
html:not([data-lang="en"]) .lang-toggle .lang-es { color: var(--gold); }
html:not([data-lang="en"]) .lang-toggle .lang-en { color: var(--cream-muted); }

/* i18n visibility helpers — works for both block and inline elements */
.i18n-en-only { display: none; }
html[data-lang="en"] .i18n-es-only { display: none; }
html[data-lang="en"] .i18n-en-only { display: revert; }

/* Theme toggle button */
.theme-toggle {
  background: none; border: 1px solid var(--border-light);
  border-radius: 20px; padding: 0.28rem 0.7rem;
  cursor: pointer; color: var(--cream-muted);
  font-size: 1rem; line-height: 1;
  transition: all var(--t); display: flex; align-items: center;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); transform: scale(1.08); }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: inline; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--cream); transition: all var(--t); }


/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-sans); font-size: 0.92rem; font-weight: 700;
  letter-spacing: 0.03em; border-radius: 4px;
  border: 2px solid transparent; cursor: pointer;
  transition: all var(--t); text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: var(--gold); color: var(--bg); border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light); border-color: var(--gold-light);
  color: var(--bg); box-shadow: 0 8px 24px rgba(155, 112, 16, 0.28);
}
[data-theme="dark"] .btn-gold:hover {
  box-shadow: 0 8px 24px rgba(201, 160, 80, 0.28);
}

.btn-vino {
  background: var(--vino); color: var(--on-vino); border-color: var(--vino);
}
.btn-vino:hover {
  background: var(--vino-hover); border-color: var(--vino-hover);
  color: var(--on-vino); box-shadow: 0 8px 24px rgba(139, 26, 46, 0.35);
}

.btn-outline {
  background: transparent; color: var(--cream); border-color: var(--border-light);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-sm  { padding: 0.48rem 1.1rem; font-size: 0.82rem; }
.btn-lg  { padding: 1rem 2.3rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }


/* ════════════════════════════════════════════════════════════
   GENERIC CARDS
   ════════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.75rem;
  transition: all var(--t); position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, var(--vino), var(--gold));
  opacity: 0; transition: opacity var(--t);
}
.card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--card-hover-shadow); }
.card:hover::before { opacity: 1; }


/* ════════════════════════════════════════════════════════════
   WINE CARD
   ════════════════════════════════════════════════════════════ */

.wine-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  transition: all var(--t); display: block; text-decoration: none;
  color: inherit;
}
.wine-card:hover {
  border-color: var(--gold-dim); transform: translateY(-5px);
  box-shadow: var(--card-big-shadow);
}

.wine-card-body { padding: 1.4rem; }

/* Wine type badges — light defaults */
.wine-badge {
  display: inline-block; padding: 0.22rem 0.7rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 0.7rem;
}
.badge-tinto    { background: rgba(139,26,46,0.08);  color: #8B1A2E; border: 1px solid rgba(139,26,46,0.22); }
.badge-blanco   { background: rgba(155,112,16,0.09); color: #7A5800; border: 1px solid rgba(155,112,16,0.25); }
.badge-rosado   { background: rgba(190,70,70,0.08);  color: #903030; border: 1px solid rgba(190,70,70,0.22); }
.badge-espumoso { background: rgba(50,90,150,0.08);  color: #2A4E80; border: 1px solid rgba(50,90,150,0.22); }
.badge-generoso { background: rgba(150,90,20,0.09);  color: #784E10; border: 1px solid rgba(150,90,20,0.25); }

/* Wine type badges — dark overrides */
[data-theme="dark"] .badge-tinto    { background: rgba(107,21,41,0.25);  color: #E88090; border-color: rgba(107,21,41,0.5); }
[data-theme="dark"] .badge-blanco   { background: rgba(201,160,80,0.18); color: var(--gold-light); border-color: rgba(201,160,80,0.35); }
[data-theme="dark"] .badge-rosado   { background: rgba(210,110,110,0.2); color: #F0A0A0; border-color: rgba(210,110,110,0.35); }
[data-theme="dark"] .badge-espumoso { background: rgba(100,160,200,0.18);color: #90C0E0; border-color: rgba(100,160,200,0.35); }
[data-theme="dark"] .badge-generoso { background: rgba(180,120,50,0.22); color: #D4A060; border-color: rgba(180,120,50,0.4); }

.wine-name    { font-family: var(--font-serif); font-size: 1.1rem; color: var(--cream); margin-bottom: 0.2rem; }
.wine-winery  { font-size: 0.83rem; color: var(--gold); margin-bottom: 0.7rem; }

.wine-meta    { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 0.8rem; }
.wine-meta-item { font-size: 0.78rem; color: var(--cream-muted); display: flex; align-items: center; gap: 0.3rem; }
.wine-meta-item .ico { color: var(--gold); }

.flavor-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.flavor-tag  {
  padding: 0.18rem 0.55rem; border-radius: 20px; font-size: 0.7rem;
  background: rgba(155,112,16,0.08); border: 1px solid rgba(155,112,16,0.18);
  color: var(--gold); text-transform: capitalize;
}
[data-theme="dark"] .flavor-tag {
  background: rgba(201,160,80,0.10); border-color: rgba(201,160,80,0.20);
}

.wine-card-footer {
  padding: 0.9rem 1.4rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.wine-price  { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--gold); }
.wine-rating { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--cream-muted); }
.stars       { display: flex; gap: 1px; }
.star        { color: var(--gold); font-size: 0.85rem; }
.star.empty  { color: var(--cream-dim); }


/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */

.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 75% 30%, rgba(139,26,46,0.06) 0%, transparent 60%),
    linear-gradient(160deg, #FAF7F2 0%, #F4EDE3 60%, #EDE0CC 100%);
}

[data-theme="dark"] .hero {
  background: radial-gradient(ellipse at 30% 55%, rgba(90,15,40,0.55) 0%, #130810 58%, #130810 100%);
}

.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(155,112,16,0.07) 1px, transparent 1px),
    radial-gradient(circle, rgba(139,26,46,0.05) 1px, transparent 1px);
  background-size: 48px 48px, 24px 24px;
  background-position: 0 0, 12px 12px;
}
[data-theme="dark"] .hero::before {
  background-image:
    radial-gradient(circle, rgba(201,160,80,0.05) 1px, transparent 1px),
    radial-gradient(circle, rgba(140,25,50,0.06) 1px, transparent 1px);
}

.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 8rem 2rem 5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center; position: relative; z-index: 1;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.9rem; border-radius: 30px; margin-bottom: 1.4rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(139,26,46,0.07); border: 1px solid rgba(139,26,46,0.22);
  color: var(--vino);
}
[data-theme="dark"] .hero-badge {
  background: rgba(107,21,41,0.2); border-color: rgba(107,21,41,0.5);
  color: var(--gold);
}

.hero-title { font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: 1.08; margin-bottom: 1.4rem; }
.hero-title .highlight {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-subtitle { font-size: 1.08rem; color: var(--cream-muted); max-width: 460px; margin-bottom: 2rem; line-height: 1.8; }

.hero-stats { display: flex; gap: 2.5rem; margin-bottom: 2.2rem; }
.hero-stat-num   { display: block; font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--gold); }
.hero-stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cream-muted); }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-pills {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}

.hero-logo-wrap { margin-bottom: 0.5rem; }

.hero-logo-main {
  width: 200px; height: 200px;
  object-fit: contain; border-radius: 50%;
  filter: drop-shadow(0 8px 28px rgba(139, 26, 46, 0.18));
  transition: filter var(--t-slow), transform var(--t-slow);
}
.hero-logo-main:hover { transform: scale(1.04); }
[data-theme="dark"] .hero-logo-main {
  filter: drop-shadow(0 8px 28px rgba(192, 51, 80, 0.28));
}

.feature-pill {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.3rem;
  background: var(--pill-bg); border: 1px solid var(--pill-border);
  border-radius: 10px; backdrop-filter: blur(8px);
  transition: all var(--t);
  box-shadow: 0 2px 12px rgba(60,30,10,0.07);
}
[data-theme="dark"] .feature-pill { box-shadow: none; }
.feature-pill:hover { border-color: var(--gold-dim); transform: translateX(6px); }
.feature-pill-icon { font-size: 1.45rem; flex-shrink: 0; }
.feature-pill-text strong { display: block; font-size: 0.9rem; color: var(--cream); margin-bottom: 0.05rem; }
.feature-pill-text span   { font-size: 0.78rem; color: var(--cream-muted); }


/* ── Centered hero variant ─────────────────────────────────── */
.hero-inner.hero-centered {
  grid-template-columns: 1fr;
  max-width: 880px;
  text-align: center;
}
.hero-inner.hero-centered .hero-subtitle { margin-left: auto; margin-right: auto; }
.hero-inner.hero-centered .hero-stats    { justify-content: center; }
.hero-inner.hero-centered .hero-actions  { justify-content: center; }

/* ── Hero cards (3 feature tiles inside hero) ─────────────── */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 2.4rem 0;
  text-align: left;
}

.hero-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.5rem;
  transition: all var(--t);
}
[data-theme="dark"] .hero-card {
  background: rgba(50,12,32,0.55);
  border-color: rgba(80,34,56,0.7);
}
.hero-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}
.hero-card-icon  { font-size: 1.9rem; margin-bottom: 0.8rem; display: block; }
.hero-card-title {
  font-family: var(--font-serif);
  font-size: 1rem; font-weight: 600;
  color: var(--cream); margin-bottom: 0.45rem;
}
.hero-card p { font-size: 0.82rem; line-height: 1.65; margin: 0; }


/* ════════════════════════════════════════════════════════════
   FEATURES SECTION
   ════════════════════════════════════════════════════════════ */

.features-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.3rem;
}

.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.8rem;
  display: block; text-decoration: none; position: relative;
  overflow: hidden; transition: all var(--t);
}
.feature-card::after {
  content: '→'; position: absolute; bottom: 1.4rem; right: 1.4rem;
  color: var(--gold); font-size: 1.1rem; opacity: 0;
  transform: translateX(-5px); transition: all var(--t);
}
.feature-card:hover { border-color: var(--gold-dim); transform: translateY(-4px); box-shadow: var(--card-hover-shadow); }
.feature-card:hover::after { opacity: 1; transform: translateX(0); }

.feature-card-icon  { font-size: 2.3rem; margin-bottom: 1.1rem; }
.feature-card-title { font-family: var(--font-serif); font-size: 1.1rem; color: var(--cream); margin-bottom: 0.4rem; }
.feature-card-desc  { font-size: 0.85rem; color: var(--cream-muted); line-height: 1.65; }


/* ════════════════════════════════════════════════════════════
   STORYTELLING / TIMELINE
   ════════════════════════════════════════════════════════════ */

.storytelling-section { background: var(--bg); }

.timeline { position: relative; max-width: 780px; margin: 0 auto; }

.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--vino) 10%, var(--gold) 50%, var(--vino) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  display: grid; grid-template-columns: 1fr 60px 1fr;
  align-items: start; margin-bottom: 3.5rem; position: relative;
}

.timeline-item:nth-child(odd)  .tl-content { grid-column: 1; text-align: right; padding-right: 2rem; }
.timeline-item:nth-child(odd)  .tl-label   { grid-column: 3; padding-left: 2rem; text-align: left; }
.timeline-item:nth-child(even) .tl-content { grid-column: 3; padding-left: 2rem; text-align: left; }
.timeline-item:nth-child(even) .tl-label   { grid-column: 1; padding-right: 2rem; text-align: right; }

.tl-node {
  grid-column: 2; display: flex; align-items: center; justify-content: center;
  padding-top: 0.3rem;
}
.tl-node-inner {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: 0 0 20px rgba(155,112,16,0.15);
  transition: all var(--t);
}
[data-theme="dark"] .tl-node-inner { box-shadow: 0 0 20px rgba(201,160,80,0.18); }
.timeline-item:hover .tl-node-inner { box-shadow: 0 0 30px rgba(155,112,16,0.35); transform: scale(1.1); }
[data-theme="dark"] .timeline-item:hover .tl-node-inner { box-shadow: 0 0 30px rgba(201,160,80,0.4); }

.tl-content h3 { font-size: 1.05rem; color: var(--cream); margin-bottom: 0.4rem; }
.tl-content p  { font-size: 0.86rem; line-height: 1.7; }

.tl-step-label {
  display: inline-block; padding: 0.2rem 0.7rem;
  background: rgba(155,112,16,0.08); border: 1px solid var(--gold-dim);
  border-radius: 20px; font-size: 0.72rem; color: var(--gold);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: 0.4rem;
}
[data-theme="dark"] .tl-step-label { background: rgba(201,160,80,0.10); }


/* ════════════════════════════════════════════════════════════
   INNER PAGE HERO
   ════════════════════════════════════════════════════════════ */

.page-hero {
  background: var(--bg-elevated); border-bottom: 1px solid var(--border);
  padding: 5rem 0 3.5rem; text-align: center;
}
.page-hero-icon { font-size: 2.8rem; display: block; margin-bottom: 0.8rem; }
.page-hero h1   { margin-bottom: 0.6rem; }
.page-hero p    { max-width: 540px; margin: 0 auto; }

.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.84rem; color: var(--cream-muted);
  transition: color var(--t); margin-bottom: 2rem;
}
.back-link:hover { color: var(--gold); }


/* ════════════════════════════════════════════════════════════
   MULTI-STEP FORM
   ════════════════════════════════════════════════════════════ */

.form-section { background: var(--bg-elevated); padding: 5rem 0; min-height: calc(100vh - 80px); }
.form-wrap    { max-width: 680px; margin: 0 auto; }

.step-bar { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 3rem; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--cream-muted);
  transition: all var(--t);
}
.step-dot.active { border-color: var(--gold); background: var(--gold); color: var(--bg); }
.step-dot.done   { border-color: var(--vino);  background: var(--vino); color: var(--on-vino); }
.step-line { flex: 1; max-width: 80px; height: 1px; background: var(--border-light); transition: background var(--t); }
.step-line.done  { background: var(--gold-dim); }

.form-step          { display: none; }
.form-step.active   { display: block; }

.form-group   { margin-bottom: 1.4rem; }
.form-label   { display: block; font-size: 0.88rem; font-weight: 700; color: var(--cream); margin-bottom: 0.45rem; letter-spacing: 0.02em; }
.form-control {
  width: 100%; padding: 0.8rem 1.1rem;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 8px; color: var(--cream);
  font-family: var(--font-sans); font-size: 0.93rem; outline: none;
  transition: all var(--t); appearance: none;
}
.form-control:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(155,112,16,0.10); }
[data-theme="dark"] .form-control:focus { box-shadow: 0 0 0 3px rgba(201,160,80,0.10); }
.form-control::placeholder { color: var(--cream-dim); }

.options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.7rem; margin-top: 0.5rem; }
.opt-item     { display: none; }
.opt-label {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 0.9rem 0.6rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; text-align: center; transition: all var(--t);
}
.opt-label:hover               { border-color: var(--gold-dim); }
.opt-item:checked + .opt-label { border-color: var(--gold); background: rgba(155,112,16,0.07); }
[data-theme="dark"] .opt-item:checked + .opt-label { background: rgba(201,160,80,0.08); }
.opt-icon { font-size: 1.7rem; }
.opt-text { font-size: 0.78rem; color: var(--cream-muted); transition: color var(--t); }
.opt-item:checked + .opt-label .opt-text { color: var(--gold); }

.range-wrap  { padding: 0.5rem 0; }
.form-range  { width: 100%; appearance: none; height: 4px; background: var(--border-light); border-radius: 2px; outline: none; cursor: pointer; }
.form-range::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); cursor: pointer; box-shadow: 0 0 10px rgba(155,112,16,0.35);
}
[data-theme="dark"] .form-range::-webkit-slider-thumb { box-shadow: 0 0 10px rgba(201,160,80,0.4); }
.range-display {
  text-align: center; font-family: var(--font-serif);
  font-size: 2rem; color: var(--gold); margin-top: 0.4rem;
}
.range-hints { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--cream-dim); margin-top: 0.25rem; }


/* ════════════════════════════════════════════════════════════
   RECOMMENDATION RESULT
   ════════════════════════════════════════════════════════════ */

.result-card {
  background: var(--bg-card); border: 1px solid var(--gold-dim);
  border-radius: 16px; padding: 2.2rem; position: relative; overflow: hidden;
}
.result-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--vino), var(--gold), var(--vino));
}

.result-label {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem;
  padding: 0.3rem 0.8rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(139,26,46,0.08); border: 1px solid rgba(139,26,46,0.22);
  color: var(--vino);
}
[data-theme="dark"] .result-label {
  background: rgba(107,21,41,0.25); border-color: rgba(107,21,41,0.5);
  color: #E88090;
}

.result-wine-name { font-family: var(--font-serif); font-size: 1.9rem; color: var(--cream); margin-bottom: 0.2rem; }
.result-winery    { color: var(--gold); font-size: 0.95rem; margin-bottom: 1.4rem; }

.result-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.3rem; }
.result-detail  { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.85rem; text-align: center; }
.rd-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-dim); margin-bottom: 0.3rem; }
.rd-value { font-family: var(--font-serif); font-size: 1rem; color: var(--cream); }

.ai-box {
  background: rgba(155,112,16,0.05); border: 1px solid rgba(155,112,16,0.15);
  border-radius: 10px; padding: 1.1rem; margin-top: 1.3rem;
}
[data-theme="dark"] .ai-box {
  background: rgba(201,160,80,0.05); border-color: rgba(201,160,80,0.15);
}
.ai-box-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.ai-box p     { font-size: 0.9rem; font-style: italic; }


/* ════════════════════════════════════════════════════════════
   SEARCH PAGE
   ════════════════════════════════════════════════════════════ */

.search-hero { background: var(--bg-elevated); padding: 5rem 0 3.5rem; border-bottom: 1px solid var(--border); }

.search-box-wrap { position: relative; max-width: 620px; margin: 0 auto; }
.search-icon-el  { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--cream-dim); pointer-events: none; font-size: 1.1rem; }

.search-input {
  width: 100%; padding: 1rem 1.3rem 1rem 3.2rem;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 50px; color: var(--cream);
  font-family: var(--font-sans); font-size: 1rem; outline: none;
  transition: all var(--t);
}
.search-input:focus  { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(155,112,16,0.10); }
[data-theme="dark"] .search-input:focus { box-shadow: 0 0 0 3px rgba(201,160,80,0.10); }
.search-input::placeholder { color: var(--cream-dim); }

.search-submit {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: var(--gold); color: var(--bg); border: none;
  border-radius: 50px; padding: 0.65rem 1.4rem; font-weight: 700;
  cursor: pointer; transition: all var(--t);
}
.search-submit:hover { background: var(--gold-light); }

.results-section { padding: 3rem 0; }
.results-count   { font-size: 0.88rem; color: var(--cream-muted); margin-bottom: 1.3rem; }
.wines-grid      { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.2rem; }


/* ════════════════════════════════════════════════════════════
   CLUSTERS / EXPLORE
   ════════════════════════════════════════════════════════════ */

.clusters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.3rem; }

.cluster-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: all var(--t); text-decoration: none; display: block; color: inherit;
}
.cluster-card:hover { border-color: var(--gold-dim); transform: translateY(-4px); box-shadow: var(--card-big-shadow); }

.cluster-card-header { padding: 1.4rem 1.4rem 0.8rem; display: flex; align-items: center; gap: 0.9rem; }
.cluster-icon-box    { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.cluster-name  { font-family: var(--font-serif); font-size: 1.15rem; color: var(--cream); }
.cluster-count { font-size: 0.78rem; color: var(--cream-muted); }

.cluster-card-body  { padding: 0 1.4rem 1.4rem; }
.cluster-desc       { font-size: 0.85rem; color: var(--cream-muted); line-height: 1.65; margin-bottom: 0.9rem; }
.cluster-tags       { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.9rem; }
.cluster-tag        { padding: 0.18rem 0.6rem; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }

.cluster-card-footer{ padding: 0.9rem 1.4rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.temp-badge         { font-size: 0.78rem; color: var(--cream-muted); display: flex; align-items: center; gap: 0.3rem; }

.cluster-detail-header {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.8rem; margin-bottom: 2rem;
  display: flex; align-items: center; gap: 1.2rem;
}
.cluster-detail-icon { font-size: 3rem; }


/* ════════════════════════════════════════════════════════════
   PROFILE QUIZ
   ════════════════════════════════════════════════════════════ */

.quiz-wrap     { max-width: 680px; margin: 0 auto; padding: 5rem 2rem; }

.quiz-progress      { margin-bottom: 2.5rem; }
.quiz-progress-bar  { height: 3px; background: var(--border-light); border-radius: 2px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--vino), var(--gold)); border-radius: 2px; transition: width 0.4s ease; }
.quiz-counter       { font-size: 0.78rem; color: var(--cream-dim); margin-top: 0.4rem; text-align: right; }

.quiz-step     { display: none; }
.quiz-step.active { display: block; }
.quiz-q        { font-family: var(--font-serif); font-size: 1.5rem; color: var(--cream); margin-bottom: 0.4rem; }
.quiz-hint     { font-size: 0.88rem; color: var(--cream-muted); margin-bottom: 1.8rem; }

.quiz-options  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; margin-bottom: 1.8rem; }
.quiz-option   {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 12px; cursor: pointer;
  font-size: 0.9rem; color: var(--cream-muted);
  transition: all var(--t);
}
.quiz-option:hover                        { border-color: var(--gold-dim); color: var(--cream); }
.quiz-option.selected                     { border-color: var(--gold); background: rgba(155,112,16,0.07); color: var(--gold); }
[data-theme="dark"] .quiz-option.selected { background: rgba(201,160,80,0.08); }
.quiz-option--disabled                    { opacity: 0.28; pointer-events: none; filter: grayscale(0.5); }
.quiz-option-icon { font-size: 1.4rem; flex-shrink: 0; }

.quiz-legend {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}
.quiz-legend-title {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold-dim);
  margin-bottom: 0.55rem;
}
.quiz-legend-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.quiz-legend-list li {
  font-size: 0.79rem; color: var(--cream-muted); line-height: 1.45;
}
.quiz-legend-list li strong { color: var(--cream); }

.profile-result     { background: var(--bg-card); border: 1px solid var(--gold-dim); border-radius: 16px; padding: 2.5rem; text-align: center; display: none; }
.profile-result.show { display: block; }
.profile-big-icon   { font-size: 3.5rem; margin-bottom: 0.8rem; }
.profile-big-name   { font-family: var(--font-serif); font-size: 2rem; color: var(--gold); margin-bottom: 0.6rem; }


/* ════════════════════════════════════════════════════════════
   FOOD PAIRING
   ════════════════════════════════════════════════════════════ */

.food-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.9rem; margin-bottom: 3rem; }

.food-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 14px; padding: 1.4rem 0.8rem;
  text-align: center; cursor: pointer;
  transition: all var(--t); text-decoration: none; display: block;
}
.food-card:hover, .food-card.active {
  border-color: var(--gold); background: rgba(155,112,16,0.05);
  transform: translateY(-3px);
}
[data-theme="dark"] .food-card:hover,
[data-theme="dark"] .food-card.active { background: rgba(201,160,80,0.05); }
.food-icon { font-size: 2.2rem; display: block; margin-bottom: 0.4rem; }
.food-name { font-size: 0.82rem; font-weight: 700; color: var(--cream); }
.food-desc { font-size: 0.72rem; color: var(--cream-muted); margin-top: 0.2rem; }


/* ════════════════════════════════════════════════════════════
   CHAT MARIDAJE
   ════════════════════════════════════════════════════════════ */

/* Layout: chat centrado + imagen bot a la derecha */
.chat-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: end;
  max-width: 1160px;
  margin: 0 auto;
}

.chat-bot-panel {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  order: 2;
}

.chat-bot-img {
  width: 100%;
  max-width: 340px;
  height: auto;
  object-fit: contain;
  object-position: bottom;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(60,30,10,0.16));
}
[data-theme="dark"] .chat-bot-img {
  filter:
    brightness(0) invert(1) sepia(0.25)
    drop-shadow(0 0 6px rgba(240, 215, 165, 0.95))
    drop-shadow(0 0 18px rgba(240, 210, 140, 0.7))
    drop-shadow(0 0 40px rgba(235, 200, 120, 0.4));
}

/* Ventana de chat */
.chat-window {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
  background: var(--bg-elevated);
  box-shadow: 0 4px 32px rgba(60,30,10,0.08);
  min-width: 0;
}
[data-theme="dark"] .chat-window {
  border-color: var(--border-light);
  box-shadow: 0 4px 40px rgba(0,0,0,0.55);
}

/* Header */
.chat-header {
  padding: 0.85rem 1.3rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.chat-header-avatar-img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
}
.chat-header-name   { font-family: var(--font-serif); font-size: 0.92rem; font-weight: 600; color: var(--cream); }
.chat-header-status {
  font-size: 0.7rem; color: var(--gold);
  display: flex; align-items: center; gap: 0.3rem;
}
.chat-header-status::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold); display: inline-block;
}

/* Área de mensajes */
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 1.3rem; display: flex;
  flex-direction: column; gap: 1rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Fila de mensaje */
.chat-row {
  display: flex; gap: 0.5rem; align-items: flex-end;
  animation: chatRowIn 0.32s cubic-bezier(0.34, 1.15, 0.64, 1);
}
.chat-row--user { flex-direction: row-reverse; }

@keyframes chatRowIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Avatar pequeño en mensajes */
.chat-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border-light);
}
.chat-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* Burbuja */
.chat-bubble {
  max-width: 74%;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--cream);
}
.chat-row--bot  .chat-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.chat-row--user .chat-bubble {
  background: var(--vino);
  border: 1px solid var(--vino);
  color: #fff;
  border-bottom-right-radius: 5px;
}

/* Chips de respuesta rápida */
.chat-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

.chat-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.32rem 0.75rem; border-radius: 20px;
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  font-size: 0.77rem; font-weight: 600;
  cursor: pointer; color: var(--cream-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
  font-family: var(--font-sans);
}
.chat-chip:hover:not(:disabled) {
  border-color: var(--gold); color: var(--gold);
  background: rgba(155,112,16,0.06); transform: translateY(-1px);
}
[data-theme="dark"] .chat-chip:hover:not(:disabled) {
  background: rgba(212,168,67,0.12);
}
.chat-chip:disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* Typing indicator */
.chat-typing {
  display: flex; gap: 5px; align-items: center;
  padding: 0.8rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; border-bottom-left-radius: 5px;
  width: fit-content;
}
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cream-dim);
  animation: typingPulse 1.3s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingPulse {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Mini tarjetas de vino en el chat */
.chat-wines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.5rem; margin-top: 0.7rem;
}
.chat-wine-card {
  display: block;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.75rem 0.85rem;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.chat-wine-card:hover {
  border-color: var(--gold-dim); transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(60,30,10,0.1);
}
[data-theme="dark"] .chat-wine-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.chat-wine-type   { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gold); margin-bottom: 0.25rem; }
.chat-wine-name   { font-size: 0.79rem; font-weight: 700; color: var(--cream); line-height: 1.3; margin-bottom: 0.15rem; }
.chat-wine-winery { font-size: 0.7rem; color: var(--cream-muted); margin-bottom: 0.4rem; }
.chat-wine-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.68rem; color: var(--cream-dim);
  border-top: 1px solid var(--border); padding-top: 0.35rem; margin-top: 0.35rem;
}
.chat-wine-stars  { color: var(--gold); letter-spacing: 0.02em; }
.chat-wine-price  { font-weight: 700; color: var(--gold); }

/* Icono dentro de chips */
.chat-chip .chip-icon { display: inline-flex; align-items: center; }
.chat-chip .ico-svg   { width: 14px; height: 14px; flex-shrink: 0; }

/* Grupos de maridaje (destacados / calidad-precio) */
.chat-pairing-group {
  margin-top: 0.85rem;
}
.chat-pairing-group-label {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--gold); margin-bottom: 0.45rem;
}
.chat-pairing-group-label .ico-svg { width: 12px; height: 12px; }

/* Maridaje de vino — lista elegante */
.chat-pairing-foods {
  display: flex; flex-direction: column;
  margin-top: 0.9rem;
  border-top: 1px solid var(--border);
}
.chat-food-item {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.chat-food-icon {
  display: flex; align-items: center;
  flex-shrink: 0; margin-top: 0.1rem;
  color: var(--gold);
}
.chat-food-icon .ico-svg { width: 16px; height: 16px; }
.chat-food-info {
  display: flex; flex-direction: column; gap: 0.2rem;
}
.chat-food-info strong {
  display: block; font-size: 0.9rem; color: var(--cream); font-weight: 600;
}
.chat-food-info span {
  display: block; font-size: 0.78rem; color: var(--cream-muted); font-style: italic;
}

/* Texto de continuación dentro de burbujas del bot */
.chat-followup {
  margin-top: 0.85rem;
  font-size: 0.84rem;
  color: var(--cream-muted);
}

/* Burbuja de usuario con icono (respuesta a un chip) */
.chat-bubble--user-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.chat-bubble--user-chip .chip-icon { display: inline-flex; }
.chat-bubble--user-chip .ico-svg   { width: 15px; height: 15px; }

/* Tarjeta de recomendación personalizada */
.chat-rec-card {
  display: block;
  background: var(--bg-elevated);
  border: 1.5px solid var(--vino);
  border-radius: 14px; padding: 1rem 1.1rem;
  text-decoration: none; color: inherit;
  margin-top: 0.7rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.chat-rec-card:hover {
  border-color: var(--gold); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(60,30,10,0.14);
}
[data-theme="dark"] .chat-rec-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.chat-rec-label {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--gold); margin-bottom: 0.5rem;
}
.chat-rec-label .ico-svg { width: 12px; height: 12px; }
.chat-rec-meta {
  font-size: 0.75rem; color: var(--cream-dim);
  margin: 0.25rem 0 0.1rem; letter-spacing: 0.02em;
}
.chat-rec-explanation {
  font-size: 0.78rem; color: var(--cream-muted);
  line-height: 1.6; margin-top: 0.55rem;
  padding-top: 0.5rem; border-top: 1px solid var(--border);
}

/* Placeholder cuando no hay datos ML */
.chat-placeholder {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-light);
  border-radius: 12px; padding: 1rem 1.1rem;
  font-size: 0.82rem; color: var(--cream-muted);
  margin-top: 0.7rem; display: flex; flex-direction: column;
  align-items: flex-start; gap: 0.35rem;
}
.chat-placeholder .ico-svg { width: 1.3rem; height: 1.3rem; opacity: 0.45; }

/* Responsive */
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-bot-panel {
    order: -1;
    justify-content: center;
    max-height: 200px;
    overflow: hidden;
  }
  .chat-bot-img { max-width: 160px; }
  .chat-window  { height: 520px; }
}
@media (max-width: 520px) {
  .chat-bot-panel { display: none; }
  .chat-window    { height: 500px; border-radius: 14px; }
  .chat-bubble    { max-width: 88%; }
  .chat-wines     { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════
   VALUE PAGE
   ════════════════════════════════════════════════════════════ */

.value-filters { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1.5rem; }
.value-filters--form { gap: 0.65rem; }
.value-range  { width: 140px; }
.value-select { width: 145px; }
.value-filters--form .ms-btn { min-width: 150px; }
.filter-group  { display: flex; flex-direction: column; gap: 0.4rem; }
.filter-label  { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cream-muted); }

@media (max-width: 640px) {
  .value-filters--form { flex-direction: column; align-items: stretch; }
  .value-filters--form .filter-group { width: 100%; }
  .value-range  { width: 100% !important; }
  .value-select { width: 100% !important; box-sizing: border-box; }
  .value-filters--form .ms-wrap { width: 100%; }
  .value-filters--form .ms-btn { width: 100%; min-width: unset !important; }
  .value-filters--form + * { margin-top: 0.5rem; }

  .col-hide-sm { display: none; }
  .value-table th { padding: 0.6rem 0.5rem; font-size: 0.65rem; }
  .value-table td { padding: 0.75rem 0.5rem; font-size: 0.82rem; }
}


.value-table    { width: 100%; border-collapse: collapse; margin-top: 2rem; }
.value-table th { text-align: left; padding: 0.7rem 1rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-muted); border-bottom: 1px solid var(--border); }
.value-table td { padding: 1rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; color: var(--cream-muted); transition: background var(--t); }
.value-table tr:hover td { background: var(--bg-elevated); color: var(--cream); }

.qpr-badge {
  display: inline-block; padding: 0.18rem 0.6rem;
  background: rgba(50,120,56,0.09); border: 1px solid rgba(50,120,56,0.25);
  border-radius: 20px; font-size: 0.72rem; font-weight: 700; color: #2E7A34;
}
[data-theme="dark"] .qpr-badge {
  background: rgba(90,140,96,0.2); border-color: rgba(90,140,96,0.4); color: #7DC08A;
}

.rank-num { font-family: var(--font-serif); font-size: 1.2rem; color: var(--gold); font-weight: 700; }


/* ════════════════════════════════════════════════════════════
   WINE DETAIL
   ════════════════════════════════════════════════════════════ */

.wine-detail-section { padding: 4.5rem 0; }

.wine-detail-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 3rem;
  align-items: start; margin-top: 2rem;
}

.wine-visual-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem 1.5rem;
  text-align: center; position: sticky; top: 100px;
}
.wine-bottle    { font-size: 7rem; display: block; margin-bottom: 1.2rem; opacity: 0.85; }
.wine-score     { font-family: var(--font-serif); font-size: 4rem; font-weight: 700; color: var(--gold); line-height: 1; }
.wine-score-lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cream-dim); }

.wine-detail-title  { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 0.2rem; }
.wine-detail-winery { font-size: 1rem; color: var(--gold); margin-bottom: 1.3rem; }

.specs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1.8rem; }
.spec       { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem; }
.spec-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-dim); margin-bottom: 0.25rem; }
.spec-value { font-family: var(--font-serif); font-size: 0.95rem; color: var(--cream); }

.info-section       { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.4rem; margin-bottom: 1.1rem; }
.info-section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); font-weight: 700; margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }


/* ════════════════════════════════════════════════════════════
   PLACEHOLDERS
   ════════════════════════════════════════════════════════════ */

.placeholder-box {
  background: var(--bg-card); border: 1px dashed var(--border-light);
  border-radius: 12px; padding: 2.5rem; text-align: center;
}
.placeholder-icon  { font-size: 2rem; opacity: 0.35; margin-bottom: 0.5rem; }
.placeholder-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-dim); }

.empty-state       { text-align: center; padding: 4rem 2rem; }
.empty-state-icon  { font-size: 3rem; opacity: 0.3; margin-bottom: 0.8rem; }


/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */

.footer { background: var(--bg-elevated); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-center { text-align: center; margin-bottom: 2rem; }

.footer-brand {
  font-family: var(--font-serif); font-size: 1.4rem; color: var(--cream);
  margin-bottom: 0.6rem; display: flex; align-items: center; justify-content: center; gap: 0.55rem;
}
.footer-brand span { color: var(--gold); }

.footer-logo-img {
  height: 46px; width: 46px;
  object-fit: contain; border-radius: 50%; flex-shrink: 0;
}
.footer-tagline   { font-size: 0.78rem; color: var(--cream-dim); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.75rem; }
.footer-desc      { font-size: 0.84rem; color: var(--cream-muted); line-height: 1.7; }

.footer-col h4    { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 1rem; font-family: var(--font-sans); }
.footer-links     { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a   { font-size: 0.84rem; color: var(--cream-muted); transition: color var(--t); }
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; color: var(--cream-dim);
}

.footer-gold-line {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem;
}
.footer-gold-line::before, .footer-gold-line::after {
  content: ''; flex: 1; height: 1px; background: var(--gold-dim);
}
.footer-dot { color: var(--gold); font-size: 0.5rem; }


/* ════════════════════════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════════════════════════ */

::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-pills  { display: none; }
  .hero-cards  { grid-template-columns: repeat(3, 1fr); }
  .wine-detail-grid { grid-template-columns: 1fr; }
  .wine-visual-panel { position: static; }
}

@media (max-width: 768px) {
  .navbar { grid-template-columns: 1fr auto; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--mobile-nav-bg); padding: 1.5rem 2rem;
    flex-direction: column; align-items: flex-start; gap: 1.2rem;
    border-bottom: 1px solid var(--border); backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(60,30,10,0.08);
  }
  [data-theme="dark"] .nav-links { box-shadow: none; }
  .nav-links.open { display: flex; }
  .hamburger     { display: flex; }

  .timeline::before   { left: 20px; }
  .timeline-item      { grid-template-columns: 40px 1fr; }
  .timeline-item:nth-child(odd)  .tl-content,
  .timeline-item:nth-child(even) .tl-content { grid-column: 2; grid-row: 1; text-align: left; padding: 0 0 0 1.5rem; }
  .timeline-item:nth-child(odd)  .tl-label,
  .timeline-item:nth-child(even) .tl-label   { grid-column: 2; grid-row: 2; text-align: left; padding: 0.4rem 0 0 1.5rem; }
  .tl-node { grid-column: 1; grid-row: 1; width: 40px; padding: 0; }
  .tl-node-inner { width: 32px; height: 32px; font-size: 0.9rem; }

  .hero-cards     { grid-template-columns: 1fr; }
  .result-details { grid-template-columns: 1fr 1fr; }
  .specs-grid     { grid-template-columns: 1fr 1fr; }
  .quiz-options   { grid-template-columns: 1fr; }
  .footer-bottom  { flex-direction: column; gap: 0.4rem; text-align: center; }
}


/* ════════════════════════════════════════════════════════════
   CHATBOT FLOTANTE / FLOATING CHAT WIDGET
   ════════════════════════════════════════════════════════════ */

/* ── Cómo funciona (index) ── */
.how-section { background: var(--bg-elevated); }
.how-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  max-width: 960px;
  margin: 0 auto 3rem;
}
.how-step {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
}
.how-step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--vino);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem;
}
.how-step h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 0.6rem;
}
.how-step p {
  font-size: 0.88rem;
  color: var(--cream-muted);
  line-height: 1.65;
  margin: 0;
}
.how-step-arrow {
  font-size: 1.8rem;
  color: var(--gold);
  font-weight: 700;
  text-align: center;
  padding: 0 0.25rem;
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .how-steps {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .how-step-arrow { transform: rotate(90deg); }
}

/* ── Sobre Nosotros ── */
.about-intro {
  max-width: 780px;
  margin: 0 auto 4rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--cream-muted);
  line-height: 1.8;
}

.study-phases { display: flex; flex-direction: column; gap: 2.5rem; }

.study-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2.5rem;
  transition: border-color 0.2s;
}
.study-card:hover { border-color: var(--gold-dim, var(--border-light)); }

.study-card-meta {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.study-badge {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--vino);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.15rem;
}
.study-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--cream);
  margin: 0 0 0.3rem;
}
.study-card-lead {
  font-size: 0.9rem;
  color: var(--gold);
  margin: 0;
  font-style: italic;
}

.study-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.study-body--reverse { direction: rtl; }
.study-body--reverse > * { direction: ltr; }

.study-text p {
  font-size: 0.93rem;
  color: var(--cream-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.study-findings {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.study-findings li {
  font-size: 0.88rem;
  color: var(--cream-muted);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}
.study-findings li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.65rem;
  top: 0.2rem;
}

.study-chart-slot {
  border: 1.5px dashed var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.study-chart-slot img {
  width: 100%; height: auto; display: block; border-radius: 12px;
}

/* PCA 3D dark mode overrides */
[data-theme="dark"] #pca-info {
  background: var(--bg-surface) !important;
  border-color: var(--border-light) !important;
  opacity: 0.9 !important;
}
[data-theme="dark"] #pca-info-hint {
  color: var(--cream-muted) !important;
  opacity: 1;
}
[data-theme="dark"] .pca-leg {
  color: var(--cream) !important;
  border-color: rgba(220,190,140,0.2) !important;
}
[data-theme="dark"] .pca-leg:hover {
  background: rgba(220,190,140,0.1) !important;
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
}
.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}
.chart-placeholder .ico-svg {
  width: 48px; height: 48px;
  color: var(--border-light);
}
.chart-placeholder span {
  font-size: 0.82rem;
  color: var(--cream-dim);
  opacity: 0.6;
}

@media (max-width: 768px) {
  .study-body, .study-body--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .study-card { padding: 1.75rem; }
}

/* ── About — stats ── */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0 auto 3rem;
  max-width: 860px;
  text-align: center;
}
.about-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem 1rem;
}
.about-stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.about-stat-label {
  font-size: 0.78rem;
  color: var(--cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 640px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── About — equipo ── */
.about-team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.75rem 1rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.team-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}
.team-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1rem;
  border: 2px solid var(--border-light);
  transition: border-color var(--t);
}
.team-card:hover .team-avatar { border-color: var(--gold-dim); }
.team-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.3rem;
}
.team-role {
  font-size: 0.78rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
@media (max-width: 640px) {
  .about-team { grid-template-columns: repeat(2, 1fr); }
}

/* ── About — fuentes de datos ── */
.about-sources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.source-badge {
  flex-shrink: 0;
  background: var(--vino);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  margin-top: 0.2rem;
}
.source-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  margin: 0 0 0.5rem;
}
.source-body p {
  font-size: 0.88rem;
  color: var(--cream-muted);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 640px) {
  .about-sources { grid-template-columns: 1fr; }
}

/* ── About — stack ── */
.about-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 640px;
  margin: 0 auto 2rem;
}
.stack-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
}
.stack-layer {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  min-width: 100px;
}
.stack-tech {
  font-size: 0.88rem;
  color: var(--cream-muted);
}

/* ── About — Scraping: antes/después ── */
.scraping-diff {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.scraping-diff-col {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  font-size: 0.78rem;
}
.scraping-diff-header {
  padding: 0.5rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.scraping-diff-col--before .scraping-diff-header {
  background: var(--bg-elevated);
  color: var(--cream-muted);
  border-bottom: 1px solid var(--border-light);
}
.scraping-diff-col--after .scraping-diff-header {
  background: rgba(155,112,16,0.08);
  color: var(--gold);
  border-bottom: 1px solid var(--border-light);
}
[data-theme="dark"] .scraping-diff-col--after .scraping-diff-header {
  background: rgba(212,168,67,0.15);
}
.scraping-diff-row {
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border);
  gap: 0.15rem;
}
.scraping-diff-row:last-child { border-bottom: none; }
.scraping-diff-field {
  font-size: 0.68rem;
  color: var(--cream-dim);
  font-family: var(--font-mono, monospace);
}
.scraping-diff-value {
  color: var(--cream-muted);
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  word-break: break-all;
}
.scraping-diff-value--empty { color: var(--border-light); font-style: italic; }
.scraping-diff-value--gone  { color: var(--cream-dim); text-decoration: line-through; font-style: italic; }
.scraping-diff-value--new   { color: var(--gold); }
.scraping-diff-arrow {
  font-size: 1.2rem;
  color: var(--gold-dim);
  flex-shrink: 0;
}

/* ── About — Cleaning: funnel ── */
.cleaning-funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 1rem 0.5rem;
}
.funnel-step {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.9rem 1.25rem;
  text-align: center;
}
.funnel-step--raw   { border-color: var(--border-light); }
.funnel-step--final { border-color: var(--gold-dim); background: rgba(155,112,16,0.06); }
[data-theme="dark"] .funnel-step--final { background: rgba(212,168,67,0.10); }
.funnel-n {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}
.funnel-step--final .funnel-n { color: var(--gold); }
.funnel-label {
  display: block;
  font-size: 0.72rem;
  color: var(--cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}
.funnel-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0;
  gap: 0.1rem;
}
.funnel-drop-n {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--vino);
}
.funnel-drop-label {
  font-size: 0.65rem;
  color: var(--cream-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── About — EDA: donut SVG vine_type ── */
.vine-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 0.25rem;
}
.vine-donut-svg {
  width: 100%;
  max-width: 240px;
  height: auto;
  overflow: visible;
}
.donut-seg {
  cursor: pointer;
  transform-origin: 110px 110px;
  transition: transform 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
  stroke: var(--bg-card);
  stroke-width: 2;
}
.donut-seg:hover {
  transform: scale(1.06);
  filter: brightness(1.25);
}
.donut-hole-circle { pointer-events: none; }
#donut-center-n    { transition: fill 0.2s; pointer-events: none; }
#donut-center-lbl  { pointer-events: none; }
.vine-donut-legend {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}
.vine-donut-legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--cream-muted);
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: background 0.18s;
  cursor: default;
}
.vine-donut-legend li.active,
.vine-donut-legend li:hover { background: var(--bg-elevated); color: var(--cream); }
.vine-donut-legend span {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.vine-donut-legend strong { color: var(--cream); margin-left: auto; }

/* Columnas anchas para EDA y Preprocesamiento */
.study-body--wide-chart { grid-template-columns: 1fr 1.4fr; }

/* ── About — Preprocessing: SVG precio ── */
.price-svg-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.price-svg-panel {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.85rem 0.85rem 0.7rem;
  transition: border-color 0.2s, transform 0.2s;
}
.price-svg-panel:hover { border-color: var(--border-light); transform: translateY(-2px); }
.price-svg-panel--after { border-color: rgba(201,160,80,0.25); }
.price-svg-panel--after:hover { border-color: var(--gold-dim); }
.price-svg-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cream-muted);
  margin-bottom: 0.6rem;
  font-family: var(--font-mono, monospace);
}
.price-svg-title em { font-style: normal; color: var(--cream-dim); font-size: 0.65rem; }
.price-svg-panel--after .price-svg-title em { color: var(--gold); }
.price-svg {
  width: 100%;
  height: 110px;
  display: block;
  border-radius: 6px;
  overflow: visible;
}
.price-svg path {
  transition: filter 0.25s, opacity 0.25s;
}
.price-svg-panel:hover .price-svg path {
  filter: brightness(1.2) drop-shadow(0 3px 8px rgba(0,0,0,0.4));
  opacity: 1;
}
@keyframes svgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.price-svg.animated { animation: svgFadeIn 0.7s ease forwards; }
.price-svg-caption {
  font-size: 0.66rem;
  color: var(--cream-dim);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.3;
}
.price-svg-arrow {
  font-size: 0.9rem;
  color: var(--gold-dim);
  flex-shrink: 0;
  text-align: center;
  line-height: 1.5;
}
.price-svg-arrow small { font-size: 0.62rem; color: var(--gold); display: block; }
@media (max-width: 560px) {
  .price-svg-wrap { flex-direction: column; }
  .price-svg-arrow { transform: rotate(90deg); }
}

/* ── About — Scraping: familias aromáticas ── */
.flavor-families {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.flavor-family-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.9rem 0.75rem;
}
.flavor-family-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.flavor-family-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.flavor-family-tags span {
  font-size: 0.68rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--cream-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}
@media (max-width: 900px) {
  .flavor-families { grid-template-columns: repeat(3, 1fr); }
  .scraping-diff { flex-direction: column; }
  .scraping-diff-arrow { transform: rotate(90deg); }
}
@media (max-width: 560px) {
  .flavor-families { grid-template-columns: repeat(2, 1fr); }
}

/* ── About — cards pendientes ── */
.study-card--pending {
  border-style: dashed;
  opacity: 0.72;
}
.study-badge--pending {
  background: var(--bg-elevated);
  border: 1.5px dashed var(--border-light);
  color: var(--cream-dim);
}
.study-findings--pending li { color: var(--cream-dim); font-style: italic; }
.chart-placeholder--pending .ico-svg { opacity: 0.4; }

/* ── FAB ── */
.fchat-fab {
  position: fixed; bottom: -0.5rem; right: -0.5rem; z-index: 950;
  width: 220px; height: 220px;
  background: none;
  border: none;
  cursor: pointer;
  display: block;
  padding: 0;
  text-decoration: none;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.50));
  transition: transform 0.2s, filter 0.2s;
}
.fchat-fab:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.60));
}
.fchat-fab-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.fchat-fab .ico-svg { width: 28px; height: 28px; color: var(--cream); }
.fchat-fab-close    { display: none; align-items: center; justify-content: center; width: 100%; height: 100%; }
.fchat-fab.is-open .fchat-fab-open  { display: none; }
.fchat-fab.is-open .fchat-fab-close { display: flex; background: var(--vino); }

/* ── Panel ── */
.fchat-panel {
  position: fixed; bottom: 6.2rem; right: 2rem; z-index: 940;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 530px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transform: translateY(18px) scale(0.97);
  opacity: 0; pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.15, 0.64, 1), opacity 0.22s ease;
}
.fchat-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1; pointer-events: all;
}

/* ── Header del panel ── */
.fchat-header {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.fchat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border-light); flex-shrink: 0;
}
.fchat-header-info { flex: 1; min-width: 0; }
.fchat-header-name   { font-family: var(--font-serif); font-size: 0.88rem; font-weight: 600; color: var(--cream); }
.fchat-header-status {
  font-size: 0.68rem; color: var(--gold);
  display: flex; align-items: center; gap: 0.3rem;
}
.fchat-header-status::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold); display: inline-block;
}
.fchat-close-btn {
  background: none; border: none; cursor: pointer;
  color: var(--cream-muted); padding: 0.25rem;
  display: flex; align-items: center;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.fchat-close-btn:hover { color: var(--cream); background: var(--bg-elevated); }
.fchat-close-btn .ico-svg { width: 17px; height: 17px; }

/* ── Área de mensajes ── */
.fchat-messages {
  flex: 1; overflow-y: auto;
  padding: 0.9rem 0.85rem;
  display: flex; flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.fchat-messages::-webkit-scrollbar { width: 4px; }
.fchat-messages::-webkit-scrollbar-track { background: transparent; }
.fchat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Avatar del bot dentro de los mensajes */
.fchat-bot-avt { display: flex; align-items: flex-end; }
.fchat-bot-avt .chat-avatar-img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}

/* Mensajes en el panel flotante — reutiliza las clases del chat principal */
.fchat-messages .chat-bubble { max-width: 82%; font-size: 0.83rem; }
.fchat-messages .chat-wines  { grid-template-columns: 1fr; }
.fchat-messages .chat-chip   { font-size: 0.76rem; padding: 0.28rem 0.65rem; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .fchat-panel { right: 0.6rem; left: 0.6rem; width: auto; bottom: 4.8rem; }
  .fchat-fab   { bottom: -0.5rem; right: -0.5rem; width: 110px; height: 110px; }
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║   EL FLUJO CURADO — LUXURY REDESIGN                         ║
   ║   Paleta: Burdeos profundo · Cobre cálido · Oro cepillado   ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── Navbar: siempre burdeos con navegación de cobre ────────── */

.navbar {
  background: #1E0810 !important;
  border-bottom: 1px solid rgba(180, 95, 35, 0.28) !important;
  box-shadow: 0 1px 0 rgba(100, 38, 12, 0.5);
}
.navbar.scrolled {
  background: rgba(18, 5, 10, 0.97) !important;
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(180, 95, 35, 0.35) !important;
}
.navbar-brand { color: #F0E4CC !important; }
.navbar-brand .accent { color: #C9882A !important; }

.nav-links a {
  color: #B8703A !important;
  transition: color var(--t);
}
.nav-links a:hover,
.nav-links a.active { color: #D4A050 !important; }
.nav-links a::after { background: #C07A3A !important; }

.nav-cta {
  background: rgba(160, 45, 30, 0.85) !important;
  color: #F0E4CC !important;
  border: 1px solid rgba(200, 80, 40, 0.4) !important;
}
.nav-cta:hover { background: rgba(180, 55, 35, 0.95) !important; }

.theme-toggle {
  border-color: rgba(180, 95, 35, 0.45) !important;
  color: #B8703A !important;
}
.theme-toggle:hover { border-color: #D4A050 !important; color: #D4A050 !important; }

.lang-toggle {
  border-color: rgba(180, 95, 35, 0.45) !important;
  color: #B8703A !important;
}
.lang-toggle:hover { border-color: #D4A050 !important; }

.hamburger span { background: #C07A3A !important; }

/* Mobile nav overlay always dark burgundy */
.nav-links {
  background: rgba(18, 5, 10, 0.98) !important;
  border-bottom-color: rgba(180, 95, 35, 0.3) !important;
}

/* ── Hero Curado: Fondo burdeos profundo ────────────────────── */

.hero-curated {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(120, 22, 40, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(90, 15, 28, 0.4) 0%, transparent 55%),
    linear-gradient(168deg, #130508 0%, #1C0810 55%, #130508 100%);
}

/* Fondo: puntos sutiles de textura */
.hero-curated::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(180, 90, 30, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

/* Orbs de ambiente */
.hc-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.hc-orb-l {
  width: 560px; height: 560px;
  top: -120px; left: -160px;
  background: radial-gradient(circle, rgba(110, 28, 14, 0.4) 0%, transparent 65%);
}
.hc-orb-r {
  width: 420px; height: 420px;
  bottom: -60px; right: -110px;
  background: radial-gradient(circle, rgba(160, 75, 18, 0.22) 0%, transparent 65%);
}

/* ── Panel envolvente ────────────────────────────────────────── */

.hc-panel-wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hc-panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  /* Cobre cálido cepillado */
  background:
    linear-gradient(158deg,
      #582012 0%,
      #7A3A1A 22%,
      #8E4B22 44%,
      #7A3A1A 66%,
      #582012 100%
    );
  border: 1px solid rgba(200, 120, 48, 0.32);
  box-shadow:
    0 45px 110px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(80, 28, 8, 0.6) inset,
    0 1px 0 rgba(228, 155, 72, 0.22) inset;
}

/* Filigrana SVG sobre el panel de cobre */
.hc-filigree {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52'%3E%3Cg fill='none' stroke='rgba(215,148,62,0.09)' stroke-width='0.55'%3E%3Cpath d='M26 3 L49 26 L26 49 L3 26 Z'/%3E%3Ccircle cx='26' cy='26' r='11'/%3E%3Ccircle cx='26' cy='26' r='3.5'/%3E%3Cline x1='26' y1='3' x2='26' y2='49'/%3E%3Cline x1='3' y1='26' x2='49' y2='26'/%3E%3Cline x1='8' y1='8' x2='44' y2='44'/%3E%3Cline x1='44' y1='8' x2='8' y2='44'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 52px 52px;
  pointer-events: none;
  opacity: 0.75;
}

/* Textura: líneas cepilladas horizontales */
.hc-filigree::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(210, 135, 55, 0.028) 2px,
    rgba(210, 135, 55, 0.028) 3px
  );
}

/* ── Contenido del panel ─────────────────────────────────────── */

.hc-body {
  position: relative;
  z-index: 1;
  padding: 3.8rem 4.2rem;
  text-align: center;
}

/* Badge */
.hc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  background: none;
  border: none;
  box-shadow:
    0 0 0 2px rgba(212, 160, 80, 0.9),
    0 0 10px 4px rgba(212, 160, 80, 0.55),
    0 0 28px 10px rgba(212, 160, 80, 0.25),
    0 0 55px 20px rgba(212, 160, 80, 0.10);
}
.hc-badge-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
}

/* Titular serif lujoso */
.hc-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  color: #F0E4CC;
  margin-bottom: 1.1rem;
}
.hc-title em {
  font-style: italic;
  background: linear-gradient(135deg, #E0B055 0%, #C07A3A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtítulo */
.hc-subtitle {
  font-size: 1.04rem;
  color: rgba(240, 228, 204, 0.92);
  max-width: 620px;
  margin: 0 auto 2.2rem;
  line-height: 1.82;
}

/* ── Panel de joya IA ────────────────────────────────────────── */

.hc-jewel-panel {
  display: inline-flex;
  align-items: center;
  gap: 1.8rem;
  margin: 0 auto 2.5rem;
  background: rgba(10, 3, 7, 0.45);
  border: 1px solid rgba(192, 110, 45, 0.24);
  border-radius: 16px;
  padding: 1.3rem 2.4rem;
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(228, 145, 60, 0.14),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

.hc-jewel-inner {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anillos orbitales animados */
.hc-jewel-inner::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(192, 120, 50, 0.28);
  border-top-color: rgba(220, 160, 72, 0.75);
  animation: hc-orbit-a 9s linear infinite;
}
.hc-jewel-inner::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px dashed rgba(192, 120, 50, 0.13);
  animation: hc-orbit-a 16s linear infinite reverse;
}

@keyframes hc-orbit-a {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

.hc-jewel-svg {
  width: 88px;
  height: 88px;
  color: #D4A050;
  filter: drop-shadow(0 0 10px rgba(212, 160, 80, 0.32));
}

.hc-jewel-text {
  text-align: left;
}
.hc-jewel-text strong {
  display: block;
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  color: #D4A050;
  margin-bottom: 0.25rem;
}
.hc-jewel-text span {
  font-size: 0.78rem;
  color: rgba(220, 200, 165, 0.90);
  line-height: 1.5;
  max-width: 160px;
  display: block;
}

/* ── Tarjetas de flujo narrativo ─────────────────────────────── */

.hc-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.8rem;
  text-align: left;
}

.hc-card {
  background: rgba(10, 3, 7, 0.52);
  border: 1px solid rgba(155, 75, 28, 0.26);
  border-radius: 14px;
  padding: 1.9rem 1.6rem;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Línea de acento superior */
.hc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(192, 120, 50, 0.55),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hc-card:hover {
  border-color: rgba(192, 120, 50, 0.48);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.hc-card:hover::before { opacity: 1; }

/* Tarjeta central: ligeramente destacada */
.hc-card-featured {
  background: rgba(14, 4, 9, 0.62);
  border-color: rgba(212, 160, 80, 0.45);
}
.hc-card-featured::before { opacity: 0.70; }

/* Icono grabado */
.hc-card-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 1.1rem;
  color: #D4A050;
  filter: drop-shadow(0 0 7px rgba(212, 160, 80, 0.30));
  transition: filter 0.3s ease, color 0.3s ease;
}
.hc-card:hover .hc-card-icon {
  color: #F0C060;
  filter: drop-shadow(0 0 12px rgba(240, 192, 96, 0.45));
}

.hc-card-num {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 185, 100, 0.90);
  margin-bottom: 0.5rem;
}

.hc-card-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: #FFF5E6;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.hc-card-tagline {
  font-size: 0.76rem;
  font-style: italic;
  color: #EDB860;
  margin-bottom: 0.7rem;
  line-height: 1.55;
}

.hc-card-desc {
  font-size: 0.82rem;
  color: rgba(230, 210, 180, 0.88);
  line-height: 1.68;
  margin: 0;
}

/* ── Franja de estadísticas ──────────────────────────────────── */

.hc-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(155, 75, 28, 0.2);
  border-radius: 10px;
  padding: 0.95rem 1.5rem;
  margin-bottom: 1.6rem;
}

.hc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2.8rem;
}

.hc-stat-sep {
  color: rgba(192, 112, 40, 0.28);
  font-size: 0.42rem;
  flex-shrink: 0;
}

.hc-stat-num {
  display: block;
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: #D4A050;
  line-height: 1;
  letter-spacing: 0.01em;
}

.hc-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(220, 195, 155, 0.88);
  margin-top: 0.22rem;
}

/* ── Panel de CTAs ───────────────────────────────────────────── */

.hc-cta-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(155, 75, 28, 0.18);
  border-radius: 12px;
  padding: 1.3rem 2rem;
  flex-wrap: wrap;
}

/* Botón primario: burdeos con acento cobre */
.hc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.92rem 2.1rem;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 7px;
  background: linear-gradient(135deg, #6E1A12 0%, #A02A18 100%);
  color: #F0E4CC;
  border: 1px solid rgba(210, 90, 48, 0.42);
  text-decoration: none;
  transition: all 0.28s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(240, 120, 60, 0.18);
}
.hc-btn-primary:hover {
  background: linear-gradient(135deg, #7E2016 0%, #C03220 100%);
  color: #F8EEE6;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(240, 130, 65, 0.22);
}

.hc-btn-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Botón secundario: cobre/dorado outline */
.hc-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.92rem 2.1rem;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 7px;
  background: transparent;
  color: #C8902A;
  border: 1px solid rgba(210, 155, 65, 0.45);
  text-decoration: none;
  transition: all 0.28s ease;
}
.hc-btn-secondary:hover {
  background: rgba(212, 160, 80, 0.1);
  border-color: rgba(212, 160, 80, 0.72);
  color: #E0B840;
  transform: translateY(-3px);
}

.hc-btn-arrow {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: transform 0.28s ease;
}
.hc-btn-secondary:hover .hc-btn-arrow { transform: translateX(4px); }

/* ── Responsive del Hero Curado ──────────────────────────────── */

@media (max-width: 1024px) {
  .hc-body { padding: 3rem 2.8rem; }
  .hc-stat  { padding: 0 1.8rem; }
}

@media (max-width: 768px) {
  .hero-curated { padding: 6rem 1rem 2.5rem; }
  .hc-body { padding: 2rem 1.4rem; }
  .hc-title { font-size: clamp(2rem, 7vw, 2.8rem); }
  .hc-cards { grid-template-columns: 1fr; gap: 1rem; }
  .hc-jewel-panel {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 1.4rem;
  }
  .hc-jewel-text { text-align: center; }
  .hc-jewel-text span { max-width: 100%; margin: 0 auto; }
  .hc-stats { flex-wrap: wrap; gap: 1rem; padding: 0.8rem 1rem; }
  .hc-stat  { padding: 0 1.2rem; }
  .hc-stat-sep { display: none; }
  .hc-cta-panel { flex-direction: column; gap: 0.75rem; padding: 1rem; }
  .hc-btn-primary,
  .hc-btn-secondary { width: 100%; justify-content: center; }
}

/* ── Footer: colores luxury ──────────────────────────────────── */
.footer {
  background: #100408 !important;
  border-top-color: rgba(155, 75, 28, 0.28) !important;
}
.footer-bottom {
  border-top-color: rgba(155, 75, 28, 0.2) !important;
}
.footer-brand { color: #F0E4CC !important; }
.footer-brand span { color: #C9882A !important; }
.footer-col h4 { color: #C07A3A !important; }
.footer-links a { color: rgba(192, 168, 136, 0.7); }
.footer-links a:hover { color: #D4A050; }


/* ════════════════════════════════════════════════════════════
   SVG ICONS — Sizing by context
   ════════════════════════════════════════════════════════════ */

.ico-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.page-hero-icon .ico-svg { width: 2.6rem; height: 2.6rem; vertical-align: 0; }
.opt-icon .ico-svg        { width: 1.6rem; height: 1.6rem; }
.quiz-option-icon .ico-svg{ width: 1.3rem; height: 1.3rem; }
.food-icon .ico-svg       { width: 2rem;   height: 2rem;   }
.feature-card-icon .ico-svg { width: 2.2rem; height: 2.2rem; }
.tl-node-inner .ico-svg   { width: 1rem;   height: 1rem;   }
.empty-state-icon .ico-svg{ width: 2.8rem; height: 2.8rem; }
.cluster-icon-box .ico-svg{ width: 1.5rem; height: 1.5rem; }
.cluster-detail-icon .ico-svg { width: 2.5rem; height: 2.5rem; }
.cluster-sidebar-icon .ico-svg { width: 1.6rem; height: 1.6rem; }
.profile-big-icon .ico-svg{ width: 3.2rem; height: 3.2rem; }
.wine-bottle .ico-svg     { width: 5rem;   height: 5rem;   }
.info-section-title .ico-svg { width: 1.1em; height: 1.1em; vertical-align: -0.125em; }
.placeholder-icon .ico-svg{ width: 2.2rem; height: 2.2rem; }
.search-icon-el .ico-svg  { width: 1rem;   height: 1rem;   }
.temp-badge .ico-svg      { width: 0.95em; height: 0.95em; vertical-align: -0.1em; }


/* ── Banner CTA: Descubre tu perfil vinícola ────────────────── */

.profile-cta-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0.5rem 0 2.8rem;
  padding: 1.4rem 2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color var(--t), box-shadow var(--t);
  flex-wrap: wrap;
}

.profile-cta-banner:hover {
  border-color: var(--gold-dim);
  box-shadow: 0 4px 20px rgba(60, 30, 10, 0.08);
}

[data-theme="dark"] .profile-cta-banner {
  background: rgba(255,255,255,0.03);
  border-color: rgba(212,160,80,0.18);
}

[data-theme="dark"] .profile-cta-banner:hover {
  border-color: rgba(212,160,80,0.42);
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
}

.profile-cta-icon {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  color: var(--vino);
  opacity: 0.85;
}

[data-theme="dark"] .profile-cta-icon { color: #C07A3A; }

.profile-cta-icon .ico-svg { width: 2.6rem; height: 2.6rem; }

.profile-cta-body { flex: 1; min-width: 200px; }

.profile-cta-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--cream);
  margin: 0 0 0.25rem;
}

.profile-cta-desc {
  font-size: 0.84rem;
  color: var(--cream-muted);
  margin: 0;
  line-height: 1.6;
}

.profile-cta-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .profile-cta-banner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .profile-cta-btn    { width: 100%; text-align: center; }
}


/* ════════════════════════════════════════════════════════════
   EXPLORAR — Rediseño impactante de tarjetas de cluster
   ════════════════════════════════════════════════════════════ */

/* Sección explore sin padding-top extra */
.explore-section { padding-top: 0; }

/* ── Resolución de colores de perfil según tema ── */
.clusters-fan .cluster-card,
.cluster-panel {
  --cc:        var(--cc-l, var(--gold));
  --cc-bg:     var(--cc-bg-l, rgba(155,112,16,0.08));
  --cc-border: var(--cc-bdr-l, var(--gold-dim));
}
[data-theme="dark"] .clusters-fan .cluster-card,
[data-theme="dark"] .cluster-panel {
  --cc:        var(--cc-d, var(--gold));
  --cc-bg:     var(--cc-bg-d, rgba(212,168,67,0.22));
  --cc-border: var(--cc-bdr-d, var(--gold-dim));
}

/* cp-icon-ring hereda --cc del padre .cluster-panel */
.cp-icon-ring {
  color: var(--cc, var(--gold));
  border-color: var(--cc-border, var(--gold-dim));
  background: var(--cc-bg, rgba(155,112,16,0.08));
}

/* explore-cta-dot usa vars directamente del inline style */
.explore-cta-dot {
  color: var(--cc-l, var(--gold));
  background: var(--cc-bg-l, rgba(155,112,16,0.08));
  border-color: var(--cc-bdr-l, var(--gold-dim));
}
[data-theme="dark"] .explore-cta-dot {
  color: var(--cc-d, var(--gold));
  background: var(--cc-bg-d, rgba(212,168,67,0.22));
  border-color: var(--cc-bdr-d, var(--gold-dim));
}

/* cluster-detail-icon color según tema */
.cluster-detail-icon { color: var(--cc-l, var(--gold)); }
[data-theme="dark"] .cluster-detail-icon { color: var(--cc-d, var(--gold)); }

/* ── Grid circular de 4 columnas (explorar) ── */
.clusters-fan {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Botón medallón — compact circle card */
.clusters-fan .cluster-card {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.4rem 0.75rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: visible;
  color: inherit;
  text-decoration: none;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  transition: border-color 0.22s, background 0.22s, box-shadow 0.22s, transform 0.22s;
}

.clusters-fan .cluster-card:hover {
  border-color: var(--cc-border, var(--border));
  background: var(--cc-bg, var(--bg-card));
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.clusters-fan .cluster-card.card-active {
  border-color: var(--cc, var(--gold-dim));
  background: var(--cc-bg, var(--bg-card));
  box-shadow: 0 0 0 2px var(--cc, var(--gold-dim));
  transform: translateY(-2px);
}

/* Medallón circular con ícono */
.cc-medallion {
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 50%;
  background: var(--cc-bg, rgba(155,112,16,0.08));
  border: 2px solid var(--cc-border, var(--gold-dim));
  color: var(--cc, var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.22s;
  flex-shrink: 0;
}
.cc-medallion .ico-svg { width: 1.55rem; height: 1.55rem; }

.clusters-fan .cluster-card:hover .cc-medallion,
.clusters-fan .cluster-card.card-active .cc-medallion {
  box-shadow: 0 0 18px var(--cc-bg, rgba(155,112,16,0.2));
}

.cc-name {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: var(--cream);
  line-height: 1.25;
}

.cc-count {
  font-size: 0.7rem;
  color: var(--cream-dim);
}

/* ════ Panel de detalle del perfil ════ */
.cluster-panels { margin-bottom: 1.5rem; }

.cluster-panel {
  display: none;
  padding: 1.8rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--cc-border, var(--border));
  border-radius: 16px;
  animation: cpFadeIn 0.28s ease;
}
.cluster-panel.active { display: block; }

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

.cp-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cp-icon-ring {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cp-icon-ring .ico-svg { width: 1.35rem; height: 1.35rem; }

.cp-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--cc, var(--gold));
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.cp-count { font-size: 0.8rem; color: var(--cream-muted); }

.cp-desc {
  color: var(--cream-muted);
  line-height: 1.75;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.cluster-panel .cluster-tag {
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--cc-bg, rgba(155,112,16,0.08));
  color: var(--cc, var(--gold));
  border: 1px solid var(--cc-border, var(--gold-dim));
}

/* Top 3 vinos en el panel */
.cp-top-wines {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cp-top-wine {
  display: block;
  text-decoration: none;
  padding: 0.45rem 0.5rem;
  border-radius: 7px;
  transition: background 0.15s;
}
.cp-top-wine:hover { background: rgba(255,255,255,0.05); }

.cp-tw-rank {
  font-size: 0.62rem; font-weight: 700;
  color: var(--cc, var(--gold)); opacity: 0.75;
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 0.1rem;
}
.cp-tw-name {
  font-family: var(--font-serif); font-size: 0.85rem;
  color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-tw-meta { font-size: 0.72rem; color: var(--cream-muted); margin-top: 0.05rem; }

/* Footer del panel */
.cp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.cp-footer .temp-badge {
  font-size: 0.82rem; color: var(--cream-dim);
  display: flex; align-items: center; gap: 0.35rem;
}
.cp-footer .temp-badge .ico-svg { width: 0.95rem; height: 0.95rem; }

/* Responsive */
@media (max-width: 768px) {
  .clusters-fan  { grid-template-columns: repeat(2, 1fr); }
  .cluster-panel { padding: 1.4rem 1.2rem; }
}
@media (max-width: 420px) {
  .clusters-fan  { gap: 0.6rem; }
  .cc-name       { font-size: 0.72rem; }
  .cc-medallion  { width: 3.2rem; height: 3.2rem; }
  .cluster-panel { padding: 1.1rem; }
}


/* ════════════════════════════════════════════════════════════
   PROFILE QUIZ CTA — Sección de descubrimiento de perfil
   ════════════════════════════════════════════════════════════ */

.profile-quiz-cta {
  margin:        0 0 0;
  padding:       3rem 2rem 3.2rem;
  border-radius: 18px;
  border:        1px solid var(--border-light);
  background:    var(--bg-elevated);
  text-align:    center;
  position:      relative;
  overflow:      hidden;
}

/* Textura sutil de fondo */
.profile-quiz-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--vino-dim) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
  pointer-events: none;
}

[data-theme="dark"] .profile-quiz-cta {
  background:    rgba(100, 25, 12, 0.13);
  border-color:  rgba(192, 120, 50, 0.25);
}

/* Fila de iconos de perfiles */
.profile-quiz-icons {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             0.75rem;
  margin-bottom:   1.5rem;
  position:        relative;
  z-index:         1;
}

.pq-dot {
  width:          2.5rem;
  height:         2.5rem;
  border-radius:  50%;
  border:         1px solid;
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  flex-shrink:    0;
  transition:     transform 0.25s ease, box-shadow 0.25s ease;
}

.pq-dot:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 14px rgba(60,30,10,0.18);
}

.pq-dot .ico-svg { width: 1.2rem; height: 1.2rem; }

.profile-quiz-title {
  font-family:   var(--font-serif);
  font-size:     clamp(1.4rem, 3vw, 2rem);
  color:         var(--cream);
  margin-bottom: 0.7rem;
  position:      relative;
  z-index:       1;
}

.profile-quiz-desc {
  max-width:     480px;
  margin:        0 auto 1.8rem;
  color:         var(--cream-muted);
  font-size:     0.9rem;
  line-height:   1.72;
  position:      relative;
  z-index:       1;
}

.profile-quiz-cta .btn {
  position: relative;
  z-index: 1;
  padding: 0.9rem 2.4rem;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .profile-quiz-cta { padding: 2rem 1.2rem; }
  .profile-quiz-cta .btn { width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   ORNATE VINTAGE FRAME — partes claras (light mode only)
   ════════════════════════════════════════════════════════════ */

.section-featured-wines {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

/* Embroidered corner ornaments for principal sections and content cards. */
.features-section,
.storytelling-section,
.section-featured-wines,
.card,
.wine-card,
.hero-card,
.feature-card,
.result-card,
.cluster-card,
.profile-result,
.food-card,
.study-card,
.wine-visual-panel,
.info-section,
.chat-wine-card,
.chat-rec-card {
  position: relative;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' fill='none'%3E%3Cpath d='M5 0 L10 5 L5 10 L0 5 Z' stroke='%239B7010' stroke-width='.9' stroke-opacity='.55' fill='%239B7010' fill-opacity='.14'/%3E%3Cpath d='M11 42 Q11 11 42 11' stroke='%239B7010' stroke-width='.7' stroke-opacity='.22' stroke-dasharray='2 1.8' fill='none'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' fill='none'%3E%3Cpath d='M45 0 L50 5 L45 10 L40 5 Z' stroke='%239B7010' stroke-width='.9' stroke-opacity='.55' fill='%239B7010' fill-opacity='.14'/%3E%3Cpath d='M39 42 Q39 11 8 11' stroke='%239B7010' stroke-width='.7' stroke-opacity='.22' stroke-dasharray='2 1.8' fill='none'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' fill='none'%3E%3Cpath d='M5 40 L10 45 L5 50 L0 45 Z' stroke='%239B7010' stroke-width='.9' stroke-opacity='.55' fill='%239B7010' fill-opacity='.14'/%3E%3Cpath d='M11 8 Q11 39 42 39' stroke='%239B7010' stroke-width='.7' stroke-opacity='.22' stroke-dasharray='2 1.8' fill='none'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' fill='none'%3E%3Cpath d='M45 40 L50 45 L45 50 L40 45 Z' stroke='%239B7010' stroke-width='.9' stroke-opacity='.55' fill='%239B7010' fill-opacity='.14'/%3E%3Cpath d='M39 8 Q39 39 8 39' stroke='%239B7010' stroke-width='.7' stroke-opacity='.22' stroke-dasharray='2 1.8' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position:
    top 5px left 5px,
    top 5px right 5px,
    bottom 5px left 5px,
    bottom 5px right 5px;
  background-size: 50px 50px;
}

/* Outer + inner border lines via ::before */
[data-theme="light"] .features-section::before,
[data-theme="light"] .storytelling-section::before,
[data-theme="light"] .section-featured-wines::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(155, 112, 16, 0.4);
  outline: 1px solid rgba(155, 112, 16, 0.2);
  outline-offset: -6px;
  pointer-events: none;
  z-index: 1;
}

/* ════════════════════════════════════════════════════════════
   GUÍA DEL VINO / WINE GUIDE PAGE
   ════════════════════════════════════════════════════════════ */

/* ── Tipos de vino / Wine types grid ── */
.guide-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.guide-type-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.guide-type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--gold-dim);
}

/* Color bar at top of each wine type card — uses design-system palette */
.guide-type-swatch { height: 5px; }
.guide-swatch--blanco   { background: linear-gradient(90deg, #9B7010, #D4A843); }
.guide-swatch--rosado   { background: linear-gradient(90deg, #BE4646, #D47070); }
.guide-swatch--tinto    { background: linear-gradient(90deg, #8B1A2E, #C03350); }
.guide-swatch--espumoso { background: linear-gradient(90deg, #2A4E80, #5080B0); }

.guide-type-body { padding: 1.5rem 1.4rem; }

/* Icon container — mirrors badge color tokens */
.guide-type-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.guide-type-icon .ico-svg { width: 22px; height: 22px; }

.guide-icon--blanco  { background: rgba(155,112,16,0.09);  color: #7A5800; border: 1px solid rgba(155,112,16,0.25); }
.guide-icon--rosado  { background: rgba(190,70,70,0.08);   color: #903030; border: 1px solid rgba(190,70,70,0.22); }
.guide-icon--tinto   { background: rgba(139,26,46,0.08);   color: #8B1A2E; border: 1px solid rgba(139,26,46,0.22); }
.guide-icon--espumoso { background: rgba(50,90,150,0.08);  color: #2A4E80; border: 1px solid rgba(50,90,150,0.22); }

[data-theme="dark"] .guide-icon--blanco  { background: rgba(201,160,80,0.18);  color: var(--gold-light);  border-color: rgba(201,160,80,0.35); }
[data-theme="dark"] .guide-icon--rosado  { background: rgba(210,110,110,0.2);  color: #F0A0A0;            border-color: rgba(210,110,110,0.35); }
[data-theme="dark"] .guide-icon--tinto   { background: rgba(107,21,41,0.25);   color: #E88090;            border-color: rgba(107,21,41,0.5); }
[data-theme="dark"] .guide-icon--espumoso { background: rgba(100,160,200,0.18); color: #90C0E0;           border-color: rgba(100,160,200,0.35); }

.guide-type-body h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.guide-type-body p  { font-size: 0.88rem; margin-bottom: 0.75rem; }

.guide-type-pair {
  font-size: 0.82rem;
  color: var(--gold) !important;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0 !important;
}
.guide-type-pair strong { color: var(--gold); }

@media (max-width: 900px) {
  .guide-types { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .guide-types { grid-template-columns: 1fr; }
}

/* ── Uvas / Grape varieties ── */
.guide-grapes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.guide-grape-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: 1rem;
}

.guide-grape-pills {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.guide-grape-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border-color var(--t);
}
.guide-grape-pill:hover { border-color: var(--gold-dim); }

/* Left accent by grape color */
.guide-pill--tinta  { border-left: 3px solid var(--vino); }
.guide-pill--blanca { border-left: 3px solid var(--gold); }

.guide-grape-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
}
.guide-grape-note {
  font-size: 0.82rem;
  color: var(--cream-muted);
}

@media (max-width: 680px) {
  .guide-grapes { grid-template-columns: 1fr; }
}

/* ── Cata / Tasting guide ── */
.guide-tip-banner {
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.88rem;
  color: var(--cream-muted);
}
.guide-tip-banner strong { color: var(--cream); }

.guide-phase {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.guide-phase-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.4rem 2rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.guide-phase-header h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.guide-phase-header p  { font-size: 0.88rem; margin: 0; }

/* Large numbered step indicator */
.guide-phase-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  width: 3rem;
  text-align: center;
}

/* 2-column layout for visual and taste phases */
.guide-phase-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.guide-phase-col { padding: 1.75rem 2rem; }
.guide-phase-col + .guide-phase-col { border-left: 1px solid var(--border); }

.guide-col-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1rem !important;
}

.guide-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.guide-checklist li {
  font-size: 0.88rem;
  color: var(--cream-muted);
  padding-left: 1rem;
  position: relative;
}
.guide-checklist li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.guide-checklist li strong { color: var(--cream); }

/* Color swatch guide */
.guide-color-guide {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.guide-color-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.guide-color-label {
  font-size: 0.74rem;
  color: var(--cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  width: 4.5rem;
  flex-shrink: 0;
  padding-top: 0.2rem;
}
.guide-color-dots {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.guide-cdot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.guide-cdot-item span:last-child {
  font-size: 0.66rem;
  color: var(--cream-dim);
  text-align: center;
}
.guide-cdot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: block;
  flex-shrink: 0;
}

/* Single-column layout for aromas phase */
.guide-phase-aromas {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-aroma-group { }

.guide-aroma-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.6rem !important;
}
.guide-aroma-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--cream-dim);
}

.guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.guide-tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--cream-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.82rem;
  transition: border-color var(--t), color var(--t);
}
.guide-tag:hover { border-color: var(--gold-dim); color: var(--cream); }

.guide-tip-inline {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--cream-dim);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

/* Responsive tasting phases */
@media (max-width: 760px) {
  .guide-phase-body {
    grid-template-columns: 1fr;
  }
  .guide-phase-col + .guide-phase-col {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .guide-phase-header {
    padding: 1.2rem 1.4rem;
  }
  .guide-phase-aromas {
    padding: 1.4rem;
  }
}
@media (max-width: 560px) {
  .guide-phase-num  { font-size: 2rem; }
  .guide-phase-col  { padding: 1.25rem 1.2rem; }
  .guide-phase-aromas { padding: 1.2rem; }
}

/* ════════════════════════════════════════════════════════════
   RUEDA DE PERFILES VINÍCOLAS / PROFILE WHEEL
   ════════════════════════════════════════════════════════════ */

/* ── Resolución de colores de perfil según tema (profile.html) ── */
.profile-circle-btn,
.profile-panel {
  --pc:        var(--pc-l, var(--gold));
  --pc-bg:     var(--pc-bg-l, rgba(155,112,16,0.08));
  --pc-border: var(--pc-bdr-l, var(--gold-dim));
}
[data-theme="dark"] .profile-circle-btn,
[data-theme="dark"] .profile-panel {
  --pc:        var(--pc-d, var(--gold));
  --pc-bg:     var(--pc-bg-d, rgba(212,168,67,0.22));
  --pc-border: var(--pc-bdr-d, var(--gold-dim));
}

/* pp-icon-ring hereda --pc del padre .profile-panel */
.pp-icon-ring {
  color: var(--pc, var(--gold));
  border-color: var(--pc-border, var(--gold-dim));
  background: var(--pc-bg, rgba(155,112,16,0.08));
}

/* flavor-tag dentro de paneles de perfil */
.profile-panel .pp-flavor-tag {
  background: var(--pc-bg, rgba(155,112,16,0.08));
  border-color: var(--pc-border, var(--gold-dim));
  color: var(--pc, var(--gold));
}

.profiles-result-section {
  padding: 3rem 1.5rem 4rem;
}

.profiles-wheel-sub {
  text-align: center;
  font-size: 0.88rem;
  color: var(--cream-muted);
  margin-bottom: 2rem;
}

/* ── Grid de círculos ── */
.profiles-wheel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Botón de cada perfil ── */
.profile-circle-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.25rem 0.75rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.22s, background 0.22s, box-shadow 0.22s, transform 0.22s;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.profile-circle-btn:hover {
  border-color: var(--pc-border, var(--border));
  background: var(--pc-bg, var(--bg-card));
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.profile-circle-btn.active {
  border-color: var(--pc, var(--gold-dim));
  background: var(--pc-bg, var(--bg-card));
  box-shadow: 0 0 0 2px var(--pc, var(--gold-dim));
  transform: translateY(-2px);
}

/* ── Medallón circular con el ícono ── */
.pc-medallion {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: var(--pc-bg, rgba(155,112,16,0.08));
  border: 2px solid var(--pc-border, var(--gold-dim));
  color: var(--pc, var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.22s;
  flex-shrink: 0;
}
.pc-medallion .ico-svg { width: 1.45rem; height: 1.45rem; }

.profile-circle-btn:hover .pc-medallion,
.profile-circle-btn.active .pc-medallion {
  box-shadow: 0 0 18px var(--pc-bg, rgba(155,112,16,0.25));
}

/* Halo de resaltado para el perfil del usuario */
.profile-circle-btn.is-match .pc-medallion {
  box-shadow: 0 0 0 4px var(--pc, var(--gold-dim));
}

/* ── Nombre del perfil ── */
.pc-label {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--cream);
  line-height: 1.3;
}

/* ── Badge "Tu perfil" ── */
.pc-yours {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc, var(--gold));
  padding: 0.15em 0.55em;
  border: 1px solid var(--pc-border, var(--gold-dim));
  border-radius: 99px;
  background: var(--pc-bg, transparent);
}

/* ════ Panel de detalle ════ */
.profile-panels { margin-bottom: 0.5rem; }

.profile-panel {
  display: none;
  padding: 1.8rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--pc-border, var(--border));
  border-radius: 16px;
  animation: ppSlideIn 0.28s ease;
}
.profile-panel.active { display: block; }

@keyframes ppSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cabecera del panel */
.pp-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pp-icon-ring {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pp-icon-ring .ico-svg { width: 1.35rem; height: 1.35rem; }

.pp-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--pc, var(--gold));
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.pp-match-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--pc, var(--gold));
  padding: 0.2em 0.65em;
  border: 1px solid var(--pc-border, var(--gold-dim));
  border-radius: 99px;
  background: var(--pc-bg, transparent);
}

.pp-desc {
  color: var(--cream-muted);
  line-height: 1.75;
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
}

.pp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.pp-temp {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--cream-dim);
}
.pp-temp .ico-svg { width: 0.95rem; height: 0.95rem; }

/* ── Bloque de vinos recomendados ── */
.profiles-wines-block {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.profiles-wines-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .profiles-wheel { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .profile-panel  { padding: 1.4rem 1.2rem; }
}

@media (max-width: 420px) {
  .profiles-wheel { gap: 0.6rem; }
  .pc-label       { font-size: 0.72rem; }
  .pc-medallion   { width: 3rem; height: 3rem; }
  .profile-panel  { padding: 1.1rem; }
}

@media (max-width: 360px) {
  .profiles-wheel { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  .pc-medallion   { width: 2.6rem; height: 2.6rem; }
  .pc-label       { font-size: 0.65rem; }
  .pc-medallion .ico-svg { width: 1.1rem; height: 1.1rem; }
  .profiles-result-section .container { padding-inline: 0.75rem; }
}

/* ══════════════════════════════════════════════
   BAR SCENE — sommelier chatbot
══════════════════════════════════════════════ */
.bar-scene {
  position: relative;
  width: 100%;
  height: 700px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 68% 55%, rgba(110,28,8,0.18) 0%, transparent 65%),
    linear-gradient(180deg, #090204 0%, #110608 30%, #170a0d 60%, #0d0406 100%);
  border: 1px solid #3a1820;
  box-shadow: 0 24px 80px rgba(0,0,0,0.65);
}

/* ── Shelf ── */
.bar-shelf {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 135px;
  z-index: 1;
  background: linear-gradient(180deg, #070103 0%, #0e0406 100%);
}
.bar-bottles-svg {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 135px;
  display: block;
}

/* ── Ambient glows ── */
.bar-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.bar-glow--left {
  width: 320px; height: 220px;
  top: 80px; left: -60px;
  background: radial-gradient(ellipse, rgba(201,160,80,0.05) 0%, transparent 70%);
}
.bar-glow--right {
  width: 260px; height: 200px;
  top: 95px; right: 4%;
  background: radial-gradient(ellipse, rgba(180,55,18,0.07) 0%, transparent 70%);
}

/* ── Conversation bubble area ── */
.bar-chat-area {
  position: absolute;
  left: 2%;
  top: 148px;
  right: 40%;
  bottom: 118px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.65rem;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  scroll-behavior: smooth;
}
.bar-chat-area::-webkit-scrollbar { width: 3px; }
.bar-chat-area::-webkit-scrollbar-thumb { background: rgba(201,160,80,0.25); border-radius: 3px; }

/* ── Speech bubbles ── */
.bar-bubble {
  position: relative;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.65;
  animation: barBubbleIn 0.3s cubic-bezier(0.34, 1.18, 0.64, 1) both;
}
@keyframes barBubbleIn {
  from { opacity: 0; transform: scale(0.88) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);     }
}

/* Bot bubble: dark glass, tail points → right (toward bot) */
.bar-bubble--bot {
  background: rgba(20, 7, 4, 0.93);
  color: var(--cream);
  border: 1px solid rgba(201,160,80,0.28);
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,200,100,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bar-bubble--bot::after {
  content: '';
  position: absolute;
  right: -9px; bottom: 14px;
  border: 5px solid transparent;
  border-left-color: rgba(20, 7, 4, 0.93);
  border-right: 0;
}

/* User bubble: wine red, right-aligned */
.bar-bubble--user {
  background: rgba(100, 18, 32, 0.85);
  color: rgba(255,220,200,0.95);
  border: 1px solid rgba(150,48,60,0.4);
  border-radius: 20px;
  font-size: 0.78rem;
  padding: 0.38rem 0.9rem;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.bar-bubble--user .ico-svg { width: 13px; height: 13px; opacity: 0.8; }

/* Typing dots inside bot bubble */
.bar-bubble--typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0.78rem 1rem;
  width: fit-content;
}
.bar-bubble--typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cream-dim);
  animation: typingPulse 1.3s infinite;
}
.bar-bubble--typing span:nth-child(2) { animation-delay: 0.18s; }
.bar-bubble--typing span:nth-child(3) { animation-delay: 0.36s; }

/* Wine / rec cards inside dark bubbles — inherit existing card styles, just narrow grid */
.bar-bubble--bot .chat-wines {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.bar-bubble--bot .chat-followup {
  margin-top: 0.75rem;
  font-size: 0.81rem;
  color: var(--cream-muted);
}

/* ── Sommelier behind counter ── */
.bar-sommelier {
  position: absolute;
  right: 3%;
  bottom: 0;
  width: 38%;
  max-width: 340px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
}
.bar-bot-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(-10px 0 35px rgba(180,70,18,0.12));
}
[data-theme="dark"] .bar-bot-img {
  filter:
    brightness(0) invert(1) sepia(0.25)
    drop-shadow(0 0 8px rgba(240,215,165,0.9))
    drop-shadow(0 0 22px rgba(240,210,140,0.65))
    drop-shadow(0 0 55px rgba(235,200,120,0.35));
}

/* ── Bar counter ── */
.bar-counter {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 110px;
  z-index: 4;
  /* If a counter image exists, use it; else fallback to gradient */
  background-image: var(--bar-counter-img, none);
  background-size: cover;
  background-position: top center;
  background-color: transparent;
}
.bar-counter--css-only {
  background: linear-gradient(180deg, #6b3c18 0%, #4a2510 30%, #301408 65%, #1e0d04 100%);
  border-top: 3px solid #8B6030;
  box-shadow:
    inset 0 2px 0  rgba(255,215,120,0.18),
    inset 0 5px 20px rgba(255,200,80,0.05),
    0 -8px 32px rgba(0,0,0,0.55);
}
.bar-counter--css-only::before {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,220,140,0.32), transparent);
}

/* ── Options on the counter ── */
.bar-counter-chips {
  position: absolute;
  top: 16px;
  left: 2%;
  right: 40%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  align-items: flex-start;
  z-index: 5;
}
.bar-counter-chips .chat-chip {
  background: rgba(255,245,215,0.07);
  border-color: rgba(201,160,80,0.45);
  color: #e0c88a;
  font-size: 0.77rem;
  padding: 0.4rem 0.85rem;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s;
}
.bar-counter-chips .chat-chip:hover:not(:disabled) {
  background: rgba(201,160,80,0.16);
  border-color: #C9A050;
  color: #f2dc80;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.bar-counter-chips .chat-chip:disabled { opacity: 0.22; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .bar-scene       { height: 640px; }
  .bar-sommelier   { width: 34%; }
  .bar-chat-area   { right: 37%; }
  .bar-counter-chips { right: 37%; }
}
@media (max-width: 620px) {
  .bar-scene       { height: 560px; border-radius: 14px; }
  .bar-shelf       { height: 105px; }
  .bar-bottles-svg { height: 105px; }
  .bar-sommelier   { width: 32%; right: 1%; }
  .bar-chat-area   { right: 35%; top: 118px; bottom: 98px; }
  .bar-counter     { height: 90px; }
  .bar-counter-chips { right: 35%; top: 12px; }
}
@media (max-width: 480px) {
  .bar-sommelier   { width: 30%; }
  .bar-chat-area   { right: 33%; font-size: 0.8rem; }
  .bar-counter-chips { right: 33%; }
  .bar-counter-chips .chat-chip { font-size: 0.7rem; padding: 0.35rem 0.7rem; }
}

/* ── Bilingual show/hide ─────────────────────────────────── */
html:not([data-lang="en"]) .i18n-en-only { display: none; }
html[data-lang="en"] .i18n-es-only { display: none; }


