/* ==========================================================================
   Fijate Tools - Buscador de tintes de pelo por marcas y referencias
   Estilos Canónicos de Alta Fidelidad Visual (Perfección Estética & Mobile First)
   ========================================================================== */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tema oscuro por defecto (Midnight Slate) */
  --bg-app: #0b0f17;
  --bg-surface: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1e293b;
  --bg-input: #0f172a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #f59e0b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  --accent-cold: #38bdf8;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #d97706;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --accent-gold: #d97706;
  --accent-gold-glow: rgba(217, 119, 6, 0.15);
  --accent-cold: #0284c7;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
}

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Tipografía de títulos corporativa */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-top: 0;
}

/* Layout de la herramienta */
.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1;
}

.tool-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 1536px) {
  .tool-with-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.tool-main-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}

/* Sidebar publicitario AdSense sticky */
.tool-ad-sidebar {
  display: none;
}

@media (min-width: 1536px) {
  .tool-ad-sidebar {
    display: block;
  }
  .ad-sidebar-sticky {
    position: sticky;
    top: 5rem;
  }
  .ad-sidebar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    box-shadow: var(--shadow-sm);
  }
}

/* Banner superior publicitario */
.tools-ad-banner-section {
  width: 100%;
  margin-bottom: 0.5rem;
}

.ad-banner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.ad-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.ad-banner-card {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ==========================================================================
   HERO CARD
   ========================================================================== */

.card-hero-tinte {
  background: radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.12), transparent 45%),
              linear-gradient(145deg, var(--bg-surface), var(--bg-card));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-gold-glow);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.45rem;
  }
}

.hero-desc {
  font-size: 0.975rem;
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 1.5rem;
}

.hero-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.btn-hero-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.btn-hero-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.icon-hero-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-hero-wrap.live-pulse {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  position: relative;
}

.icon-hero-wrap.live-pulse::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ec4899;
  border-radius: 50%;
  top: 4px;
  right: 4px;
  box-shadow: 0 0 8px #ec4899;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.hero-action-texts strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-main);
}

.hero-action-texts span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tarjeta estándar de sección */
.card-main {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.card-header-with-badge {
  margin-bottom: 1.25rem;
}

.badge-tag-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cold);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-section-title {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.card-section-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   ASISTENTE SEGURO (COMPATIBILIDAD Y CANAS)
   ========================================================================== */

.advisor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.advisor-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
}

.field-help {
  font-size: 0.72rem;
  color: var(--text-subtle);
  line-height: 1.3;
}

/* Desplegables accesibles antidesborde */
.styled-select, .styled-select-sm {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 44px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 40px 0 0.85rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.styled-select:focus, .styled-select-sm:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.styled-select option, .styled-select-sm option {
  background: var(--bg-surface);
  color: var(--text-main);
}

.styled-select-sm {
  height: 40px;
  font-size: 0.8125rem;
}

/* Caja de diagnóstico en tiempo real con semáforo */
.advisor-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.traffic-light-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  width: fit-content;
}

.traffic-light-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.traffic-light-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.traffic-light-badge.red {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.traffic-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.diagnosis-title {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.diagnosis-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.advisor-suggested-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.suggested-tinte-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.suggested-tinte-pill:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   DECODIFICADOR DE NUMERACIÓN (LA REGLA DEL PUNTO)
   ========================================================================== */

.decoder-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .decoder-layout {
    grid-template-columns: 1.2fr 1fr;
  }
}

.decoder-selectors {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.decoder-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dec-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.6875rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.decoder-display-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.decoder-swatch-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.decoder-code-tag {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: -0.02em;
}

.decoder-name-title {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.decoder-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.badge-subtone, .badge-anti-reflection {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-subtone.cold {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cold);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-subtone.warm {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-subtone.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-anti-reflection {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.decoder-explanation {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.btn-filter-by-code {
  background: var(--bg-surface);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.btn-filter-by-code:hover {
  background: var(--accent-gold);
  color: #000;
}

/* ==========================================================================
   SWATCHES FOTORREALISTAS DE CABELLO (MECHÓN PEINADO & FIBRA CAPILAR)
   ========================================================================== */

.hair-swatch-preview {
  position: relative;
  width: 52px;
  height: 82px;
  border-radius: 10px 10px 22px 22px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hair-swatch-preview.large {
  width: 68px;
  height: 105px;
  border-radius: 12px 12px 28px 28px;
}

.hair-swatch-preview:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.swatch-fiber-texture {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 3px,
    transparent 4px,
    transparent 6px
  );
  pointer-events: none;
}

.swatch-shine-halo {
  position: absolute;
  top: 18%;
  left: -20%;
  right: -20%;
  height: 32%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  transform: skewY(-8deg);
  pointer-events: none;
}

/* ==========================================================================
   CATÁLOGO DE TINTES Y BUSCADOR EN TIEMPO REAL
   ========================================================================== */

.catalog-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.results-count-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.results-count-badge #count-number {
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Buscador grande */
.search-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  display: flex;
}

.search-input {
  width: 100%;
  height: 48px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 44px 0 46px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.9375rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

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

.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
}

.btn-clear-search:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

/* Píldoras de marcas */
.filter-pills-row {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.brand-filter-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.95rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.brand-filter-pill:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.brand-filter-pill.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-sm);
}

/* Grilla de filtros secundarios */
.filters-secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.filter-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-sublabel {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Grilla dinámica de tarjetas de tinte */
.tintes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .tintes-grid {
    grid-template-columns: 1fr;
  }
}

/* Tarjeta individual de tinte */
.tinte-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.tinte-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-md);
}

.tinte-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
}

.formula-tag {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.tinte-card-body {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.tinte-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.tinte-ref-badge {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.1;
}

.tinte-shade-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tinte-line-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tinte-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.tinte-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.tinte-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-open-shop-card {
  width: 100%;
  height: 42px;
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.btn-open-shop-card:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px var(--accent-gold-glow);
}

.tinte-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-card-secondary {
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--accent-cold);
}

.btn-card-secondary.active-compare {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cold);
  color: var(--accent-cold);
}

/* Estado vacío */
.empty-state-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.empty-state-card svg {
  color: var(--text-subtle);
}

.btn-reset-filters {
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* ==========================================================================
   STICKY BAR DE COMPARATIVA (2 TONOS)
   ========================================================================== */

.sticky-compare-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 640px;
  background: rgba(22, 32, 50, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cold);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 100;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.compare-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.compare-slots-preview {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.compare-slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  min-width: 110px;
}

.compare-slot.filled {
  border-style: solid;
  border-color: var(--accent-cold);
}

.slot-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.slot-empty-text {
  color: var(--text-subtle);
  font-size: 0.75rem;
}

.vs-divider {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-cold);
}

.compare-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-open-compare {
  background: var(--accent-cold);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-open-compare:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-clear-compare {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
}

.btn-clear-compare:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   MODALES (CHULETA PARA LA TIENDA Y COMPARADOR)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-shop-container, .modal-compare-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-compare-container {
  max-width: 720px;
}

.modal-shop-header, .modal-compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 2;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
}

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

.modal-shop-body, .modal-compare-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Tarjeta gigante de compra para la tienda */
.shop-big-card {
  background: var(--bg-card);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.shop-swatch-circle {
  position: relative;
  width: 72px;
  height: 98px;
  border-radius: 14px 14px 30px 30px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.shop-card-info {
  display: flex;
  flex-direction: column;
}

.shop-ref-code {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.shop-shade-name {
  font-size: 1.25rem;
  margin: 0.25rem 0;
}

.shop-line-name {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Lista de compra */
.shop-checklist-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.checklist-title {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.checklist-items {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.checklist-items strong {
  color: var(--text-main);
}

/* Tiendas */
.shop-stores-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stores-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stores-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.store-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-main);
}

.shop-tip-box {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--accent-gold);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Botones de acción de la ficha */
.shop-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.btn-copy-ref {
  width: 100%;
  height: 48px;
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-copy-ref:hover {
  filter: brightness(1.1);
}

.btn-amazon-buy {
  width: 100%;
  height: 44px;
  background: #ff9900;
  color: #111;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-amazon-buy:hover {
  background: #e68a00;
}

.btn-cam-link {
  width: 100%;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-cam-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cold);
  color: var(--accent-cold);
}

/* Tabla comparativa */
.compare-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.compare-card-col {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.compare-detail-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.compare-detail-row:last-child {
  border-bottom: none;
}

.compare-detail-row span:first-child {
  color: var(--text-subtle);
}

/* ==========================================================================
   GUÍA SEO Y PREGUNTAS FRECUENTES (FAQ ACCORDION)
   ========================================================================== */

.seo-guide-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.seo-title {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.seo-intro {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--accent-gold);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  color: var(--text-subtle);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: var(--accent-gold);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0.25rem;
}

.faq-answer ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.faq-answer li {
  margin-bottom: 0.4rem;
}

.faq-answer strong {
  color: var(--text-main);
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVA Y REGLAS CANÓNICAS
   ========================================================================== */

@media (max-width: 640px) {
  .tool-layout {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }
  .card-main, .card-hero-tinte, .seo-guide-section {
    padding: 1.25rem;
  }
  .shop-big-card {
    flex-direction: column;
    text-align: center;
  }
  .sticky-compare-bar {
    width: calc(100% - 1rem);
    bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
  }
  .compare-slots-preview {
    display: none;
  }
  .btn-open-compare {
    width: 100%;
  }
  .compare-columns-grid {
    grid-template-columns: 1fr;
  }
}
