/* =========================================================
   COMPONENTES — iconos, botones, hero, tarjetas, gama de
   producto, acordeones, tablas, visor de fotos, contacto…
   ========================================================= */

/* ---------- Iconos ----------
   Todos los iconos son SVG de trazo (24×24) que heredan el color
   del texto (currentColor). */

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Icono dentro de un fondo verde suave */
.badge-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: var(--green-soft);
  color: var(--green);
}

.badge-icon .icon {
  width: 48px;
  height: 48px;
  stroke-width: 1.4;
}

.badge-icon--lg {
  width: 128px;
  height: 128px;
  border-radius: 36px;
}

.badge-icon--lg .icon {
  width: 72px;
  height: 72px;
  stroke-width: 1.2;
}

.badge-icon--sm {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.badge-icon--sm .icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.6;
}

.section--dark .badge-icon,
.tile--dark .badge-icon {
  background: rgba(111, 207, 120, 0.12);
  color: var(--green-on-dark);
}

/* ---------- Botones y enlaces ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--green);
  border-radius: 980px;
  background: var(--green);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
  color: #fff;
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--green);
}

.btn--outline:hover {
  background: var(--green);
  color: #fff;
}

.btn--quiet {
  border-color: var(--tile);
  background: var(--tile);
  color: var(--text);
}

.btn--quiet:hover {
  border-color: var(--tile-hover);
  background: var(--tile-hover);
  color: var(--text);
}

.btn .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Enlace "Más información ›" */
.more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
  color: var(--green);
}

.more::after {
  content: "›";
  font-size: 1.3em;
  line-height: 1;
  transform: translateY(-1px);
}

.section--dark .more,
.tile--dark .more {
  color: var(--green-on-dark);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
}

.actions--start {
  justify-content: flex-start;
}

/* ---------- Hero de la portada (solo tipografía) ---------- */

.hero {
  padding-block: clamp(72px, 13vw, 168px) clamp(56px, 8vw, 96px);
  text-align: center;
}

.hero h1 {
  max-width: 12ch;
  margin: 0 auto 22px;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1;
}

.hero .lead {
  max-width: 640px;
  margin: 0 auto 32px;
}

/* Fila de categorías con icono bajo el hero */
.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-strip a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 12px 24px;
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s;
}

.category-strip a:hover {
  background: var(--tile);
  text-decoration: none;
}

@media (max-width: 760px) {
  .category-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .category-strip a {
    padding: 20px 8px;
    background: var(--tile);
  }
}

/* ---------- Cifras clave ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.facts .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: var(--green);
  stroke-width: 1.5;
}

.facts strong {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.facts span {
  font-size: 1rem;
  color: var(--muted);
}

.section--dark .facts strong {
  color: #f5f5f7;
}

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

/* ---------- Tarjetas grandes (tiles) ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(44px, 6vw, 72px) clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--tile);
  text-align: center;
}

.tile .badge-icon {
  margin-bottom: 28px;
}

.tile h3 {
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  letter-spacing: -0.035em;
}

.tile p {
  max-width: 400px;
  margin: 0 auto 20px;
  font-size: 1.15rem;
  color: var(--muted);
}

.tile .actions {
  gap: 10px 24px;
  margin-top: auto;
}

.tile--dark {
  background: var(--dark-tile);
}

.tile--dark h3 {
  color: #f5f5f7;
}

.tile--dark p {
  color: #a1a1a6;
}

@media (max-width: 760px) {
  .tiles {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ---------- Tarjetas con icono (catálogos, noticias) ---------- */

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

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--tile);
  color: inherit;
}

.card .badge-icon {
  margin-bottom: 14px;
}

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

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

.card__meta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.card .more,
.card .btn {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 10px;
}

.card .btn {
  padding-top: 8px;
}

/* ---------- Frase destacada ---------- */

.statement {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--text);
}

.statement span {
  color: var(--muted);
}

.section--dark .statement {
  color: #f5f5f7;
}

.section--dark .statement span {
  color: #86868b;
}

/* ---------- Historia (años) ---------- */

.years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.years li {
  padding: 36px 30px;
  border-radius: var(--radius);
  background: #fff;
}

.years__num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

.years h3 {
  font-size: 1.25rem;
}

.years p {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
}

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

/* Lista de valores con icono */
.values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.values li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.values .badge-icon {
  margin-bottom: 12px;
}

.values h3 {
  margin: 0;
  font-size: 1.3rem;
}

.values p {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .values {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------- Gama de producto (accesos con icono) ---------- */

.range {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.range a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 14px 22px;
  border-radius: var(--radius);
  background: var(--tile);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transition: background 0.2s;
}

.range a:hover {
  background: var(--tile-hover);
  text-decoration: none;
}

.range .icon {
  width: 40px;
  height: 40px;
  color: var(--green);
  stroke-width: 1.4;
}

@media (max-width: 560px) {
  .range {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* ---------- Secciones de producto (acordeón) ---------- */

.products-list {
  border-bottom: 1px solid var(--line);
}

.product {
  border-top: 1px solid var(--line);
}

.product__summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.product__summary::-webkit-details-marker,
.product__summary::marker {
  display: none;
  content: "";
}

.product__summary:focus-visible {
  outline-offset: -3px;
}

.product__head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: clamp(20px, 3vw, 28px);
}

.product__head .icon {
  width: 34px;
  height: 34px;
  color: var(--green);
  stroke-width: 1.5;
}

.product__head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.product__summary:hover h2 {
  color: var(--green);
}

.product__toggle {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--tile);
  transition: background 0.2s, transform 0.3s var(--ease);
}

.product__toggle::before,
.product__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--text);
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.product__toggle::before {
  width: 12px;
  height: 2px;
}

.product__toggle::after {
  width: 2px;
  height: 12px;
}

details[open] > summary .product__toggle {
  transform: rotate(45deg);
}

.product__summary:hover .product__toggle {
  background: var(--tile-hover);
}

.product__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  max-width: 820px;
  padding: 0 0 clamp(40px, 6vw, 64px) 52px;
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .product__body {
    padding-left: 0;
  }
}

.product__text > :last-child {
  margin-bottom: 0;
}

.product__text h3 {
  margin: 1.4em 0 0.4em;
  font-size: 1.25rem;
}

.product__text h3:first-child {
  margin-top: 0;
}

.product__text ul {
  padding-left: 1.2em;
}

.product__text li {
  margin-bottom: 6px;
}

.product__text li::marker {
  color: var(--muted);
}

.product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.2em;
  padding: 0 !important;
  list-style: none;
}

.tags li {
  margin: 0 !important;
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--tile);
  font-size: 0.95rem;
  font-weight: 500;
}

.note {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--tile);
  font-size: 1rem;
}

/* ---------- Tablas técnicas (estilo ficha técnica) ---------- */

.table-wrap {
  overflow-x: auto;
}

.spec-table {
  min-width: 100%;
  font-size: 1rem;
  white-space: nowrap;
}

.spec-table caption {
  padding-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.spec-table th,
.spec-table td {
  padding: 13px 20px 13px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.spec-table thead th {
  border-bottom-color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.spec-table tbody th {
  font-weight: 600;
}

.badge-yes {
  color: var(--green);
  font-weight: 500;
}

.badge-no {
  color: var(--muted);
}

.tables-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 28px 48px;
}

/* ---------- Visor de fotos (lightbox) ---------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.94);
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: calc(100vw - 150px);
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  user-select: none;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox__close {
  top: 16px;
  right: 16px;
}

.lightbox__prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 640px) {
  .lightbox__img {
    max-width: 100vw;
    max-height: calc(100vh - 170px);
    border-radius: 0;
  }

  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 14px;
    transform: none;
  }
}

/* ---------- Contacto ---------- */

.contact-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 28px;
  border-radius: var(--radius-lg);
  background: var(--tile);
  text-align: center;
  color: var(--text);
  transition: background 0.2s;
}

a.contact-tile:hover {
  background: var(--tile-hover);
  text-decoration: none;
}

.contact-tile .badge-icon {
  margin-bottom: 14px;
}

.contact-tile h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-tile strong {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-tile span {
  font-size: 1rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .contact-tiles {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-tile {
    padding: 30px 20px;
  }
}

.hours {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 760px;
  margin-inline: auto;
}

.hours__card {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
}

.hours__card h3 {
  margin-bottom: 4px;
  font-size: 1.6rem;
}

.hours__card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.hours__time {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.map {
  position: relative;
  aspect-ratio: 16 / 7;
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--tile);
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.map__placeholder strong {
  font-size: 1.2rem;
}

.map__placeholder p {
  max-width: 420px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .map {
    aspect-ratio: auto;
    height: 380px;
    min-height: 0;
  }
}

/* ---------- Texto legal ---------- */

.prose {
  max-width: 760px;
  margin-inline: auto;
  font-size: 1.05rem;
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.5rem;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.2rem;
}

.prose h2:first-child {
  margin-top: 0;
}

/* ---------- Error 404 ---------- */

.error-page {
  display: grid;
  min-height: 60vh;
  place-items: center;
  text-align: center;
}

.error-page__code {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--line);
}

/* En fondo gris, las tarjetas de la gama van en blanco para distinguirse */
.section--tile .range a {
  background: #fff;
}

.section--tile .range a:hover {
  background: var(--tile-hover);
}
