/* ==========================================================================
   Fijate Tools - Maestro Chocolatero: Laboratorio Bean-to-Bar y Sommelier
   Estilos corporativos canónicos, tema claro / oscuro, controles táctiles y radar SVG
   ========================================================================== */

:root {
  /* Paleta cromática inspirada en el cacao fino de aroma y el oro artesanal */
  --cacao-950: #0c0806;
  --cacao-900: #17100b;
  --cacao-850: #201710;
  --cacao-800: #2a1f16;
  --cacao-700: #3d2c20;
  --cacao-600: #573e2e;
  --cacao-500: #7b5842;
  --cacao-400: #9e7358;
  --cacao-300: #c2957b;
  --cacao-200: #dfbda8;
  --cacao-100: #f2e1d6;
  --cacao-50:  #faf4ef;

  --gold-700: #8c6a08;
  --gold-600: #b3880b;
  --gold-500: #d4af37;
  --gold-400: #e5c558;
  --gold-300: #f3dc88;
  --gold-100: #fdf8e6;

  /* Tema claro por defecto (Velvet Chocolate) */
  --bg-page: #faf5ee;
  --card-bg: #ffffff;
  --card-border: #ebdcd0;
  --card-border-hover: #c9af9c;
  --card-shadow: 0 4px 20px -2px rgba(45, 25, 15, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 10px 25px -4px rgba(45, 25, 15, 0.1), 0 4px 10px -2px rgba(0, 0, 0, 0.04);

  --text-main: #241710;
  --text-muted: #6b5548;
  --text-subtle: #8a7366;

  --primary: #573e2e;
  --primary-hover: #3d2c20;
  --primary-light: #f5ebe3;
  --primary-text: #ffffff;

  --accent-gold: #b3880b;
  --accent-gold-bg: #fdf8e6;
  --accent-gold-border: #f0d588;

  --danger-bg: #fdf2f2;
  --danger-border: #f8b4b4;
  --danger-text: #991b1b;

  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #166534;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Tema oscuro (Midnight Cacao) */
  --bg-page: #0a0705;
  --card-bg: #140e0a;
  --card-border: #291d16;
  --card-border-hover: #473225;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 10px 28px -4px rgba(0, 0, 0, 0.7);

  --text-main: #f5ece3;
  --text-muted: #bfaea2;
  --text-subtle: #8c7a6e;

  --primary: #c2957b;
  --primary-hover: #dfbda8;
  --primary-light: #241710;
  --primary-text: #0c0806;

  --accent-gold: #d4af37;
  --accent-gold-bg: #271e06;
  --accent-gold-border: #52400f;

  --danger-bg: #2a1111;
  --danger-border: #521c1c;
  --danger-text: #fca5a5;

  --warning-bg: #281e0a;
  --warning-border: #523f13;
  --warning-text: #fcd34d;

  --success-bg: #0e2714;
  --success-border: #1a4d27;
  --success-text: #86efac;
}

/* ==========================================================================
   RESET Y BASE CANÓNICA
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  margin-top: 0;
  font-weight: 700;
  line-height: 1.25;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   LAYOUT PRINCIPAL Y ANUNCIOS
   ========================================================================== */

.main-wrapper.tool-layout {
  flex: 1 0 auto;
  max-width: 1240px;
  margin: 1.25rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Barra lateral publicitaria canónica */
.tool-ad-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: none;
}

@media (min-width: 1536px) {
  .tool-ad-sidebar {
    display: block;
  }
}

.ad-sticky-box {
  position: sticky;
  top: 80px;
}

/* ==========================================================================
   CABECERA HERO DE LA HERRAMIENTA
   ========================================================================== */

.hero-cacao-header {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--primary-light) 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.hero-cacao-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0) 70%);
  pointer-events: none;
  border-radius: 50%;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--accent-gold-bg);
  border: 1px solid var(--accent-gold-border);
  color: var(--accent-gold);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 0;
  line-height: 1.5;
}

/* ==========================================================================
   SISTEMA DE PESTAÑAS CANÓNICAS
   ========================================================================== */

.cacao-tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--card-border);
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cacao-tabs-nav::-webkit-scrollbar {
  display: none;
}

.cacao-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.35rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.cacao-tab-btn:hover {
  color: var(--text-main);
  background-color: var(--primary-light);
}

.cacao-tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
  background: var(--card-bg);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.cacao-tab-btn .tab-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  background-color: var(--accent-gold-bg);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-full);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

/* ==========================================================================
   TARJETAS Y MÓDULOS DE CONTENIDO
   ========================================================================== */

.cacao-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.cacao-card:hover {
  border-color: var(--card-border-hover);
}

.card-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background-color: var(--accent-gold-bg);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-title-main {
  font-size: 1.35rem;
  margin: 0;
  font-weight: 700;
}

/* ==========================================================================
   MÓDULO 1: LABORATORIO BEAN-TO-BAR
   ========================================================================== */

.lab-split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 1024px) {
  .lab-split-layout {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Selector de orígenes mundiales */
.origins-scroll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.origin-card-btn {
  background: var(--bg-page);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.origin-card-btn:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.origin-card-btn.selected {
  border-color: var(--accent-gold);
  background-color: var(--accent-gold-bg);
  box-shadow: 0 0 0 2px var(--accent-gold-border);
}

.origin-top-info {
  margin-bottom: 0.5rem;
}

.origin-country {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.origin-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.15rem 0 0.35rem;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
}

.origin-variety-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.origin-notes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.65rem;
}

.aroma-mini-chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  background-color: var(--primary-light);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

/* Sliders de formulación */
.controls-slider-card {
  background-color: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.slider-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.slider-label-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.slider-val-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  background-color: var(--card-bg);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.cacao-range-input {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--card-border);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  margin: 0.75rem 0 0.25rem;
}

.cacao-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 3px solid var(--card-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.cacao-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-sub-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* Opciones de proceso (Pills / Radios) */
.options-pills-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.option-pill-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.65rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px;
}

.option-pill-btn:hover {
  border-color: var(--accent-gold);
}

.option-pill-btn.active {
  background-color: var(--accent-gold-bg);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 700;
}

.option-pill-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}

.option-pill-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Inclusiones e ingredientes */
.inclusions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.inclusion-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.inclusion-chip:hover {
  border-color: var(--accent-gold);
}

.inclusion-chip.selected {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #0c0806;
  font-weight: 600;
}

/* Panel derecho: Radar Sensorial y Métricas */
.radar-container-box {
  background-color: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.radar-svg-wrapper {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

.radar-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Cuadrícula neuroquímica y de salud */
.biochem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.biochem-metric-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.biochem-metric-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.biochem-metric-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.biochem-metric-unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-gold);
}

.biochem-metric-desc {
  font-size: 0.76rem;
  color: var(--text-subtle);
  margin-top: 0.45rem;
  line-height: 1.35;
}

/* Tarjeta de Packaging Digital (Viral Bar Card) */
.packaging-luxury-wrapper {
  background: linear-gradient(145deg, #1b130e 0%, #100a07 100%);
  border: 2px solid #d4af37;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  color: #f5ece3;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.08);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.packaging-luxury-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin: 6px;
  border-radius: calc(var(--radius-lg) - 6px);
  pointer-events: none;
}

.packaging-top-seal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

.packaging-brand-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #d4af37;
}

.packaging-batch-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #bfaea2;
}

.packaging-title-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.5);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  width: 100%;
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
  outline: none;
}

.packaging-title-input:focus {
  border-bottom-color: #d4af37;
}

.packaging-pct-huge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.8rem;
  font-weight: 800;
  color: #d4af37;
  line-height: 1;
  margin: 0.5rem 0;
}

.packaging-pct-huge span {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f5ece3;
}

.packaging-details-list {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #dfbda8;
  margin-bottom: 1rem;
}

.packaging-details-list strong {
  color: #ffffff;
}

.packaging-actions-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   MÓDULO 2: AUDITOR DE ETIQUETAS Y PUREZA
   ========================================================================== */

.preset-select-group {
  margin-bottom: 1.5rem;
}

.cacao-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-page);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3880b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  transition: var(--transition);
}

.cacao-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-bg);
}

.cacao-select option {
  background-color: var(--card-bg);
  color: var(--text-main);
  padding: 0.5rem;
}

/* Visualizador de terrones de azúcar */
.sugar-visualizer-box {
  background-color: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.sugar-count-banner {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--warning-text);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.sugar-count-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.sugar-cubes-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 500px;
  margin: 0 auto 1.25rem;
}

.sugar-cube-icon {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

/* Semáforo de pureza y nota */
.audit-verdict-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1.5px solid var(--card-border);
  background-color: var(--card-bg);
}

.audit-score-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.audit-grade-badge {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.grade-s { background: linear-gradient(135deg, #16a34a, #15803d); }
.grade-a { background: linear-gradient(135deg, #22c55e, #16a34a); }
.grade-b { background: linear-gradient(135deg, #eab308, #ca8a04); }
.grade-c { background: linear-gradient(135deg, #f97316, #ea580c); }
.grade-d { background: linear-gradient(135deg, #ef4444, #dc2626); }

.audit-verdict-title {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
}

.audit-verdict-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.audit-verdict-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

/* Calculadora económica: coste del cacao vs azúcar */
.economic-calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .economic-calc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.econ-metric-box {
  background: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

/* Módulo veterinario de toxicidad por teobromina */
.vet-section-card {
  border-left: 4px solid var(--danger-border);
  background-color: var(--card-bg);
}

.vet-inputs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .vet-inputs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vet-alert-banner {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
  border: 1.5px solid transparent;
}

.vet-alert-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   MÓDULO 3: SOMMELIER Y MARIDAJES
   ========================================================================== */

.sommelier-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.sommelier-filter-btn {
  padding: 0.5rem 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.sommelier-filter-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-main);
}

.sommelier-filter-btn.active {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #0c0806;
}

.pairings-masonry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .pairings-masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.pairing-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

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

.pairing-cat-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.pairing-item-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--text-main);
}

.pairing-ideal-tag {
  background-color: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.pairing-explanation {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Guía de cata en 5 sentidos */
.tasting-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .tasting-steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.tasting-step-card {
  background: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.step-num-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  color: #0c0806;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 0.75rem;
}

.step-sense-title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.step-signs-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
}

.step-signs-list li {
  margin-bottom: 0.35rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

/* Mitos del chocolate */
.myths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .myths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.myth-card {
  background-color: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.myth-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.myth-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   BOTONES, MODALES Y COMPONENTES TÁCTILES
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  background-color: var(--accent-gold);
  color: #0c0806;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  background-color: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Modales accesibles (Sin window.alert) */
.cacao-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(12, 8, 6, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.cacao-modal-backdrop.open {
  display: flex;
}

.cacao-modal-window {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--card-shadow-hover);
  padding: 1.75rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-page);
}

/* Toast de notificación de copiado */
.cacao-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--accent-gold);
  color: #0c0806;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10001;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cacao-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   FORMULARIOS Y CONTROLES MÓVILES CANÓNICOS
   ========================================================================== */

.cacao-form-group {
  margin-bottom: 1.25rem;
}

.cacao-form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.cacao-input-text {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-page);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.cacao-input-text:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-bg);
}

.flex-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flex-input-wrapper input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
}

.input-suffix-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: var(--text-muted);
  background-color: var(--bg-page);
  border: 1px solid var(--card-border);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   RESPONSIVIDAD Y AJUSTES DE PANTALLA
   ========================================================================== */

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.65rem;
  }
  
  .cacao-tabs-nav {
    gap: 0.25rem;
  }

  .cacao-tab-btn {
    padding: 0.75rem 0.85rem;
    font-size: 0.92rem;
  }

  .packaging-title-input {
    font-size: 1.2rem;
  }

  .packaging-pct-huge {
    font-size: 2.2rem;
  }

  .biochem-grid {
    grid-template-columns: 1fr;
  }
}
