/* ==========================================================================
   Guía y buscador de equivalencia de pilas y baterías - fijate.com/tools
   ========================================================================== */

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

  /* Paleta cromática tema claro */
  --bat-bg: #f8fafc;
  --bat-card: #ffffff;
  --bat-card-subtle: #f1f5f9;
  --bat-border: #e2e8f0;
  --bat-border-hover: #cbd5e1;
  --bat-text: #0f172a;
  --bat-text-muted: #64748b;
  --bat-primary: #0284c7;
  --bat-primary-hover: #0369a1;
  --bat-primary-light: #e0f2fe;

  --safe-color: #16a34a;
  --safe-bg: #f0fdf4;
  --safe-border: #bbf7d0;

  --warn-color: #d97706;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;

  --danger-color: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Tema Oscuro Universal
   ========================================================================== */
[data-theme="dark"] {
  --bat-bg: #0b0f17;
  --bat-card: #151d2c;
  --bat-card-subtle: #1e293b;
  --bat-border: #243248;
  --bat-border-hover: #334155;
  --bat-text: #f1f5f9;
  --bat-text-muted: #94a3b8;
  --bat-primary: #38bdf8;
  --bat-primary-hover: #7dd3fc;
  --bat-primary-light: rgba(56, 189, 248, 0.15);

  --safe-color: #4ade80;
  --safe-bg: rgba(34, 197, 94, 0.12);
  --safe-border: rgba(34, 197, 94, 0.25);

  --warn-color: #fbbf24;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(245, 158, 11, 0.25);

  --danger-color: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.25);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.55);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--bat-text);
  margin-top: 0;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* ==========================================================================
   Layout Principal y Contención Canónica
   ========================================================================== */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.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%;
}

/* ==========================================================================
   Hero de la Herramienta
   ========================================================================== */
.tool-hero-header {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.tool-hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #10b981);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bat-primary-light);
  color: var(--bat-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.tool-hero-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.tool-hero-desc {
  font-size: 1rem;
  color: var(--bat-text-muted);
  max-width: 850px;
  margin: 0;
  line-height: 1.55;
}

/* ==========================================================================
   Navegación por Pestañas
   ========================================================================== */
.tool-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--bat-border);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--bat-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 44px;
}

.nav-tab-btn:hover {
  color: var(--bat-text);
  background-color: var(--bat-card-subtle);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nav-tab-btn.active {
  color: var(--bat-primary);
  border-bottom-color: var(--bat-primary);
  background-color: transparent;
}

.tab-pane {
  display: none;
}

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

/* ==========================================================================
   Buscador y Barra de Filtros (Tab 1)
   ========================================================================== */
.search-controls-box {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--bat-text-muted);
  pointer-events: none;
}

.main-search-input {
  width: 100%;
  height: 48px;
  padding: 0 2.8rem 0 2.8rem;
  background: var(--bat-bg);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--bat-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.main-search-input:focus {
  border-color: var(--bat-primary);
  box-shadow: 0 0 0 3px var(--bat-primary-light);
}

.btn-clear-search {
  position: absolute;
  right: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  color: var(--bat-text-muted);
  cursor: pointer;
  border-radius: 50%;
}

.btn-clear-search:hover {
  background: var(--bat-border);
  color: var(--bat-text);
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-pill {
  height: 38px;
  padding: 0 0.95rem;
  background: var(--bat-bg);
  border: 1px solid var(--bat-border);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bat-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-pill:hover {
  border-color: var(--bat-primary);
  color: var(--bat-text);
}

.filter-pill.active {
  background: var(--bat-primary);
  border-color: var(--bat-primary);
  color: #ffffff;
  font-weight: 600;
}

.results-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
  font-size: 0.85rem;
  color: var(--bat-text-muted);
}

/* ==========================================================================
   Cuadrícula de Tarjetas de Pilas
   ========================================================================== */
.battery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.battery-card {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.battery-card:hover {
  transform: translateY(-2px);
  border-color: var(--bat-primary);
  box-shadow: var(--shadow-md);
}

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

.battery-badge-voltage {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--bat-primary-light);
  color: var(--bat-primary);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-rechargeable {
  background: var(--safe-bg);
  color: var(--safe-color);
  border: 1px solid var(--safe-border);
}

.badge-hybrid {
  background: var(--bat-card-subtle);
  color: var(--bat-text-muted);
}

.badge-color-amarillo { background: #fef9c3; color: #854d0e; }
.badge-color-marron { background: #fed7aa; color: #7c2d12; }
.badge-color-naranja { background: #ffedd5; color: #9a3412; }
.badge-color-azul { background: #dbeafe; color: #1e40af; }

.battery-card-body {
  flex: 1 1 auto;
}

.battery-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  margin-bottom: 0.75rem;
  color: var(--bat-primary);
}

.battery-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.battery-chemistry {
  font-size: 0.85rem;
  color: var(--bat-text-muted);
  margin-bottom: 0.85rem;
}

.battery-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bat-card-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--bat-text);
}

.battery-equiv-box {
  background: var(--bat-bg);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.equiv-label {
  display: block;
  font-weight: 600;
  color: var(--bat-text-muted);
  margin-bottom: 0.15rem;
}

.equiv-values {
  color: var(--bat-text);
  font-family: var(--font-mono);
}

.battery-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bat-border);
}

.btn-card-action {
  width: 100%;
  height: 40px;
  background: var(--bat-card-subtle);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bat-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-action:hover {
  background: var(--bat-primary);
  border-color: var(--bat-primary);
  color: #ffffff;
}

/* ==========================================================================
   Tab 2: Buscador por Aparato Doméstico
   ========================================================================== */
.appliance-filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.appliance-select {
  height: 48px;
  width: 100%;
  padding: 0 2.2rem 0 1rem;
  background-color: var(--bat-card);
  color: var(--bat-text);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  appearance: none;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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 1rem center;
}

.appliance-select:focus {
  border-color: var(--bat-primary);
  box-shadow: 0 0 0 3px var(--bat-primary-light);
}

.appliance-select option {
  background-color: var(--bat-card);
  color: var(--bat-text);
}

.appliance-category-block {
  margin-bottom: 2rem;
}

.category-block-title {
  font-size: 1.25rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--bat-border);
  margin-bottom: 1rem;
}

.appliance-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.appliance-card {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.appliance-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.appliance-models {
  display: block;
  font-size: 0.8rem;
  color: var(--bat-text-muted);
  margin-bottom: 0.85rem;
}

.appliance-battery-rec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rec-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bat-text-muted);
}

.btn-rec-battery {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.75rem;
  background: var(--bat-primary-light);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: var(--radius-sm);
  color: var(--bat-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-rec-battery:hover {
  background: var(--bat-primary);
  color: #ffffff;
}

.btn-rec-battery.alt-bat {
  background: var(--bat-card-subtle);
  border-color: var(--bat-border);
  color: var(--bat-text);
}

.btn-rec-battery.alt-bat:hover {
  background: var(--bat-primary);
  color: #ffffff;
}

.appliance-tip {
  font-size: 0.82rem;
  color: var(--bat-text-muted);
  line-height: 1.45;
  margin: 0;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--bat-border);
}

.appliance-tip svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--bat-primary);
}

/* ==========================================================================
   Tab 3: Comparador Interactivo
   ========================================================================== */
.comparator-setup-card {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.comparator-selectors-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.comp-select-wrap label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--bat-text-muted);
}

.comp-select {
  width: 100%;
  height: 48px;
  padding: 0 2rem 0 0.85rem;
  background-color: var(--bat-bg);
  color: var(--bat-text);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  appearance: none;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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 0.85rem center;
}

.comp-select:focus {
  border-color: var(--bat-primary);
}

.comp-select option {
  background-color: var(--bat-card);
  color: var(--bat-text);
}

.btn-swap-wrap {
  padding-top: 1.5rem;
}

.btn-swap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bat-card-subtle);
  border: 1px solid var(--bat-border);
  color: var(--bat-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-swap:hover {
  background: var(--bat-primary);
  border-color: var(--bat-primary);
  color: #ffffff;
  transform: rotate(180deg);
}

.popular-comp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bat-border);
}

.popular-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bat-text-muted);
}

.comp-quick-pill {
  height: 32px;
  padding: 0 0.75rem;
  background: var(--bat-bg);
  border: 1px solid var(--bat-border);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bat-text);
  cursor: pointer;
  transition: all 0.2s;
}

.comp-quick-pill:hover {
  border-color: var(--bat-primary);
  color: var(--bat-primary);
}

/* Tarjeta de Resultado de Comparación */
.comparison-result-card {
  background: var(--bat-card);
  border: 2px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.comparison-result-card.status-safe {
  border-color: var(--safe-color);
  background: linear-gradient(180deg, var(--safe-bg) 0%, var(--bat-card) 120px);
}

.comparison-result-card.status-warning {
  border-color: var(--warn-color);
  background: linear-gradient(180deg, var(--warn-bg) 0%, var(--bat-card) 120px);
}

.comparison-result-card.status-danger {
  border-color: var(--danger-color);
  background: linear-gradient(180deg, var(--danger-bg) 0%, var(--bat-card) 120px);
}

.comp-result-header {
  margin-bottom: 1rem;
}

.comp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.comp-status-badge.status-safe {
  background: var(--safe-bg);
  color: var(--safe-color);
  border: 1px solid var(--safe-border);
}

.comp-status-badge.status-warning {
  background: var(--warn-bg);
  color: var(--warn-color);
  border: 1px solid var(--warn-border);
}

.comp-status-badge.status-danger {
  background: var(--danger-bg);
  color: var(--danger-color);
  border: 1px solid var(--danger-border);
}

.comp-result-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.comp-result-summary {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--bat-text);
}

.comp-side-by-side {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.25rem;
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.comp-battery-col {
  display: flex;
  flex-direction: column;
}

.col-role-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--bat-text-muted);
}

.col-bat-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.2rem 0 0.75rem 0;
}

.comp-specs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.comp-specs-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--bat-border);
}

.comp-vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--bat-text-muted);
  font-size: 1rem;
  opacity: 0.5;
  padding: 0 0.5rem;
}

.comp-check {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.comp-check.ok { background: var(--safe-bg); color: var(--safe-color); }
.comp-check.warn { background: var(--warn-bg); color: var(--warn-color); }
.comp-check.danger { background: var(--danger-bg); color: var(--danger-color); }
.comp-check.upgrade { background: var(--bat-primary-light); color: var(--bat-primary); }

.comp-footer-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ==========================================================================
   Tab 4: Descifrador de Códigos IEC
   ========================================================================== */
.decoder-box {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.decoded-card {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.decoded-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bat-primary-light);
  color: var(--bat-primary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.decoded-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.decoded-summary {
  font-size: 1rem;
  color: var(--bat-text-muted);
  margin-bottom: 1.25rem;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.breakdown-item {
  background: var(--bat-bg);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.breakdown-char {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--bat-primary);
}

.breakdown-meaning {
  font-size: 0.85rem;
  color: var(--bat-text);
  line-height: 1.4;
}

.decoder-quick-pill {
  height: 32px;
  padding: 0 0.75rem;
  background: var(--bat-bg);
  border: 1px solid var(--bat-border);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.decoder-quick-pill:hover {
  border-color: var(--bat-primary);
  color: var(--bat-primary);
}

/* ==========================================================================
   Modal de Ficha Técnica Detallada
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 23, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.25s ease-out;
}

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

.btn-close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bat-card-subtle);
  border: 1px solid var(--bat-border);
  color: var(--bat-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: var(--bat-border);
  color: var(--bat-text);
}

.modal-content-box {
  padding: 2rem;
}

.modal-battery-header {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-bat-visual {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  background: var(--bat-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--bat-primary);
}

.modal-bat-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bat-primary);
  display: inline-block;
  margin-bottom: 0.25rem;
}

.modal-bat-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
  line-height: 1.2;
}

.modal-bat-type {
  font-size: 0.85rem;
  color: var(--bat-text-muted);
  margin: 0;
}

.modal-specs-table-wrap {
  margin-bottom: 1.5rem;
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.modal-specs-table th,
.modal-specs-table td {
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid var(--bat-border);
}

.modal-specs-table tr:last-child th,
.modal-specs-table tr:last-child td {
  border-bottom: none;
}

.modal-specs-table th {
  text-align: left;
  background: var(--bat-bg);
  width: 38%;
  color: var(--bat-text-muted);
  font-weight: 600;
}

.modal-section-block {
  margin-bottom: 1.5rem;
}

.modal-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.modal-equiv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.equiv-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bat-card-subtle);
  border: 1px solid var(--bat-border);
}

.mfr-bullet-list,
.appliances-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mfr-bullet-list li,
.appliances-bullet-list li {
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.45;
}

.mfr-bullet-list li::before,
.appliances-bullet-list li::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  color: var(--bat-primary);
  font-weight: bold;
}

.modal-info-card {
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.modal-info-card .info-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
}

.modal-info-card p {
  margin: 0;
}

.modal-info-card.note-card {
  background: var(--bat-primary-light);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--bat-text);
}

.modal-info-card.note-card .info-card-title {
  color: var(--bat-primary);
}

.modal-info-card.danger-card {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--bat-text);
}

.modal-info-card.danger-card .info-card-title {
  color: var(--danger-color);
}

.modal-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bat-border);
}

.btn-primary,
.btn-secondary {
  height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--bat-primary);
  border: 1px solid var(--bat-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--bat-primary-hover);
}

.btn-secondary {
  background: var(--bat-card-subtle);
  border: 1px solid var(--bat-border);
  color: var(--bat-text);
}

.btn-secondary:hover {
  background: var(--bat-border);
}

/* ==========================================================================
   Guía Didáctica SEO y Sección Informativa
   ========================================================================== */
.guide-section {
  background: var(--bat-card);
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.guide-main-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.guide-block {
  margin-bottom: 2rem;
}

.guide-block:last-child {
  margin-bottom: 0;
}

.guide-block h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.guide-block p,
.guide-block li {
  font-size: 0.95rem;
  color: var(--bat-text);
  line-height: 1.6;
}

.table-responsive-wrapper {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guide-table th,
.guide-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bat-border);
  text-align: left;
}

.guide-table th {
  background: var(--bat-bg);
  font-weight: 700;
  color: var(--bat-text);
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.badge-warning-inline {
  background: var(--warn-bg);
  color: var(--warn-color);
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.badge-danger-inline {
  background: var(--danger-bg);
  color: var(--danger-color);
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.badge-safe-inline {
  background: var(--safe-bg);
  color: var(--safe-color);
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

/* Acordeón FAQ */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--bat-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bat-bg);
}

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

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

.faq-summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bat-primary);
}

details[open] .faq-summary::after {
  content: '−';
}

.faq-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--bat-text);
}

/* ==========================================================================
   Responsive móvil y tablets
   ========================================================================== */
@media (max-width: 768px) {
  .tool-layout {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }

  .tool-hero-header {
    padding: 1.25rem;
  }

  .tool-hero-title {
    font-size: 1.45rem;
  }

  .tool-nav-tabs {
    gap: 0.25rem;
  }

  .nav-tab-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
  }

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

  .appliance-filter-bar {
    grid-template-columns: 1fr;
  }

  .comparator-selectors-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .btn-swap-wrap {
    padding-top: 0;
    display: flex;
    justify-content: center;
  }

  .comp-side-by-side {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .comp-vs-divider {
    padding: 0.5rem 0;
  }

  .comp-footer-actions {
    flex-direction: column;
  }

  .comp-footer-actions button {
    width: 100%;
  }

  .modal-dialog {
    max-height: 95vh;
  }

  .modal-content-box {
    padding: 1.25rem;
  }

  .modal-battery-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .modal-actions-bar {
    flex-direction: column;
  }

  .modal-actions-bar button {
    width: 100%;
  }
}
