:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #f0fdfa;
  --cta: #ea580c;
  --cta-dark: #c2410c;
  --badge-bg: #ccfbf1;
  --badge-text: #115e59;
  --radius: 14px;
  --max-width: 1140px;
  --shadow-sm: 0 2px 10px rgb(15 23 42 / 0.05);
  --shadow-md: 0 12px 28px rgb(15 23 42 / 0.08);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header & Responsive Navbar */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
  gap: 1rem;
}

.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.brand-accent {
  color: var(--primary);
}

.site-header.is-measuring * {
  transition: none !important;
}

.menu-button {
  anchor-name: --menu-button;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.menu-button:focus-visible,
.site-menu a:focus-visible,
.btn:focus-visible,
.breadcrumb a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.site-menu {
  position: fixed;
  inset: auto;
  inset-block-start: 4.5rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(82dvw, 21rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 6rem);
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: auto;
}

.site-menu a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-menu a:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

.site-menu a[aria-current="page"] {
  color: var(--primary-dark);
  background: var(--primary-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.site-header.is-wide .menu-button {
  display: none;
}

.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.is-wide .site-menu::backdrop {
  display: none;
}

.site-header.is-wide .site-menu a {
  padding: 0.45rem 0.75rem;
}

/* Breadcrumbs */
.breadcrumb {
  padding-block: 0.85rem 0;
  font-size: 0.9rem;
}

.breadcrumb > ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb > ol > li + li::before {
  content: "/" / "";
  color: #94a3b8;
  margin-inline-end: 0.45rem;
}

.breadcrumb a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* Disclosure bar */
.disclosure-bar {
  background: #fef3c7;
  color: #78350f;
  font-size: 0.875rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid #fde68a;
}

/* Hero split */
.hero {
  padding-block: 2.75rem 2.5rem;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
  gap: 2rem;
}

.hero-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-media-square img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f8fafc;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.85rem, 3.8vw, 2.7rem);
  line-height: 1.14;
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 64ch;
  margin: 0 0 1.5rem;
}

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

.section {
  padding-block: 3rem;
}

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

.section-lead {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 1.5rem;
  max-width: 72ch;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 9px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-block {
  display: block;
  width: 100%;
  margin-top: 1.15rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

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

.btn-secondary {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-alt);
}

.btn-cta {
  background: var(--cta);
  color: #ffffff;
}

.btn-cta:hover {
  background: var(--cta-dark);
}

/* Infographics */
.infographic-grid {
  display: grid;
  gap: 1.75rem;
}

.infographic-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.infographic-card img {
  inline-size: 100%;
  block-size: auto;
}

.infographic-card figcaption {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Hub Guide Cards */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.guide-card h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.12rem;
}

.guide-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.guide-link {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Product cell in comparison table */
.table-product {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.table-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* Responsive table (Container Query + Sticky Headers) */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(640px, 82vh);
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  --label-2: "Casquillo";
  --label-3: "Ideal para";
  --label-4: "Tono de luz";
  --label-5: "Oferta";
}

.equiv-cta {
  margin-top: 1rem;
  margin-bottom: 0;
}

.equiv-table {
  --label-2: "Bombilla LED";
  --label-3: "Bajo consumo (CFL)";
  --label-4: "Halógena / Incandescente";
  --label-5: "Uso recomendado";
}

.compare-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}

.compare-table th,
.compare-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  vertical-align: middle;
}

.compare-table thead th {
  background: var(--bg-alt);
  font-size: 0.875rem;
  color: var(--muted);
}

.compare-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  font-weight: 600;
}

@container (width < 600px) {
  .compare-table,
  .compare-table thead,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table tbody tr {
    margin: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }

  .compare-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
  }

  .compare-table td:nth-child(2)::before {
    content: var(--label-2) ": ";
    font-weight: 600;
    color: var(--muted);
  }

  .compare-table td:nth-child(3)::before {
    content: var(--label-3) ": ";
    font-weight: 600;
    color: var(--muted);
  }

  .compare-table td:nth-child(4)::before {
    content: var(--label-4) ": ";
    font-weight: 600;
    color: var(--muted);
  }

  .compare-table td:nth-child(5)::before {
    content: var(--label-5) ": ";
    font-weight: 600;
    color: var(--muted);
  }
}

.badge {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--badge-bg);
  color: var(--badge-text);
}

.badge-alt {
  background: #dcfce7;
  color: #166534;
}

.badge-auto {
  background: #e0e7ff;
  color: #3730a3;
}

/* Product Cards with Photos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.product-img-wrap {
  margin: 0 0 1rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.product-img-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-card .badge {
  margin-bottom: 0.4rem;
}

.product-card h3 {
  margin: 0.25rem 0 0.5rem;
}

.pros-cons {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.pros-cons h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.pros-cons ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

/* Calculator Widget */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: end;
}

.calc-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.calc-field input,
.calc-field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.calc-result {
  grid-column: 1 / -1;
  background: var(--primary-soft);
  border: 1px solid #99f6e4;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  color: var(--primary-dark);
  font-weight: 600;
}

/* Accordion accesible */
.accordion {
  display: grid;
  gap: 0.75rem;
}

.accordion details {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  cursor: pointer;
}

.accordion summary::before {
  content: "▾";
  display: inline-block;
  flex-shrink: 0;
  color: var(--primary);
  rotate: -90deg;
}

.accordion details[open] > summary::before {
  rotate: 0deg;
}

.accordion details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.accordion details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .accordion summary::before {
    transition: rotate 0.2s ease;
  }

  .accordion details::details-content {
    transition: block-size 0.28s ease-in-out, content-visibility 0.28s ease-in-out;
    transition-behavior: allow-discrete;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--bg-alt);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.footer-links a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* Tabs interactivos por uso */
.tabs {
  display: grid;
  gap: 1rem;
}

.tablist {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: inline proximity;
  gap: 0.25rem;
  border-block-end: 1px solid var(--border);
  scrollbar-gutter: stable;
}

.tablist button[role="tab"] {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  padding: 0.75rem 1rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.tablist button[role="tab"]:hover {
  color: var(--text);
}

.tablist button[role="tab"]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}

.tablist button[role="tab"][aria-selected="true"] {
  color: var(--primary-dark);
}

.tablist button[role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--primary);
}

.tab-panels {
  display: grid;
}

.tab-panels > [role="tabpanel"] {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
}

.tab-panels > [role="tabpanel"][hidden] {
  pointer-events: none;
  z-index: 0;
}

.tab-panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.tab-panel-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.spec-list li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}

.spec-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-weight: 700;
}

.avoid-box {
  background: #fff7ed;
  border-inline-start: 4px solid var(--cta);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.93rem;
  color: #7c2d12;
  margin-bottom: 1.15rem;
}

/* Pain points grid */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
}

.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.pain-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  margin-bottom: 0.45rem;
}

.pain-card h3 {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.08rem;
}

.pain-card p {
  margin: 0 0 0.55rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.pain-fix {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.92rem;
}

