/* ==========================================================================
   Fijate Tools - Decodificador de etiquetas de ropa y cuidado textil
   Estilos corporativos canónicos, etiqueta de satén virtual realista
   y diagnóstico inteligente de programas de lavado ISO 3758
   ========================================================================== */

:root {
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-card-hover: #182230;
  --bg-input: #1a2434;
  --bg-pill: #1f2a3a;
  --border-color: #233044;
  --border-focus: #3b82f6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-light: rgba(59, 130, 246, 0.12);
  --accent-border: rgba(59, 130, 246, 0.35);
  --textile-indigo: #6366f1;
  --warning-amber: #f59e0b;
  --danger-red: #ef4444;
  --success-green: #10b981;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"],
body.light-theme {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --bg-pill: #e2e8f0;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-light: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.25);
  --textile-indigo: #4f46e5;
  --warning-amber: #d97706;
  --danger-red: #dc2626;
  --success-green: #059669;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

.mono-num {
  font-family: var(--font-mono);
}

/* Layout container */
.tool-layout {
  width: 100%;
  max-width: 1200px;
  margin: 1.25rem auto 3rem;
  padding: 0 1rem;
}

.tool-with-sidebar {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

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

/* ==========================================================================
   ETIQUETA TEXTIL VIRTUAL (SIMULADOR DE SATÉN / TELA)
   ========================================================================== */

.virtual-tag-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
}

.virtual-fabric-tag {
  width: 100%;
  max-width: 520px;
  background: #fdfdfd;
  color: #1a1a1a;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  border: 1px solid #d4d4d8;
  display: flex;
  flex-direction: column;
}

/* Puntada de costura superior */
.tag-stitching-header {
  height: 24px;
  background: #f4f4f5;
  border-bottom: 2px dashed #a1a1aa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #71717a;
  text-transform: uppercase;
}

.tag-body-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tag-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e4e4e7;
  padding-bottom: 0.5rem;
}

.tag-brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: #09090b;
}

.tag-origin-label {
  font-size: 0.75rem;
  color: #52525b;
  font-weight: 600;
}

/* Fila interactiva de símbolos en la etiqueta de satén */
.tag-symbols-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  min-height: 64px;
}

.tag-symbol-slot {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #18181b;
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.tag-symbol-slot:hover {
  background: #f4f4f5;
}

.tag-symbol-slot svg {
  width: 32px;
  height: 32px;
}

.tag-symbol-slot.empty {
  border: 1.5px dashed #d4d4d8;
  color: #a1a1aa;
}

.tag-symbol-slot.empty::after {
  content: '?';
  font-size: 1.1rem;
  font-weight: 700;
}

.tag-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #71717a;
  border-top: 1px solid #e4e4e7;
  padding-top: 0.5rem;
}

/* ==========================================================================
   PANEL DE DIAGNÓSTICO DE LAVADO INTELIGENTE
   ========================================================================== */

.diagnosis-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.diagnosis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diagnosis-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-primary);
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.diag-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.diag-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.diag-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}

.diag-warning-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  font-size: 0.82rem;
  color: var(--danger-red);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

/* ==========================================================================
   SELECTOR INTERACTIVO DE SÍMBOLOS DEL CATÁLOGO
   ========================================================================== */

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

.symbols-family-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.family-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.symbols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.65rem;
}

.symbol-picker-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 90px;
  transition: all 0.2s ease;
}

.symbol-picker-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.symbol-picker-card.active {
  background: var(--accent-light);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.symbol-picker-card svg {
  width: 32px;
  height: 32px;
  color: var(--text-primary);
}

.symbol-picker-card.active svg {
  color: var(--accent);
}

.symbol-picker-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.25;
}

.symbol-picker-card.active .symbol-picker-name {
  color: var(--text-primary);
  font-weight: 700;
}

/* ==========================================================================
   GUÍA DIDÁCTICA Y SEO (2 COLUMNAS CANÓNICAS)
   ========================================================================== */

.laundry-seo-guide {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

.laundry-seo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.laundry-seo-card h2,
.laundry-seo-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.laundry-seo-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.laundry-seo-card ul,
.laundry-seo-card ol {
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ==========================================================================
   RESPONSIVIDAD MÓVIL
   ========================================================================== */

@media (max-width: 768px) {
  .tool-layout {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem;
  }

  .symbols-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

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

  .laundry-seo-guide {
    grid-template-columns: 1fr;
  }
}
