/* ==========================================================
   Dulce Manjar — Estilos compartidos (home + productos)
   ========================================================== */

/* ---------- Tipografías ---------- */
@font-face {
  font-family: "Kalnia";
  src: url("../Kalnia/Kalnia-Bold.woff2") format("woff2"),
       url("../Kalnia/Kalnia-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "New Spirit";
  src: url("../New Spirit/NewSpirit-Light.woff2") format("woff2"),
       url("../New Spirit/NewSpirit-Light.woff") format("woff");
  font-weight: 300;
  font-display: swap;
}
/* Montserrat se carga desde Google Fonts en el <head> de cada página */

/* ---------- Variables ---------- */
:root {
  --negro: #000;
  --texto: #2A2319;
  --crema: #FFF6EB;
  --panel: #F4E9DC;
  --tabla: #F9F4F0;
  --tostado: #A99A85;
  --blanco: #fff;

  --f-titulo: "Kalnia", Georgia, serif;
  --f-subtitulo: "New Spirit", Georgia, serif;
  --f-texto: "Montserrat", Arial, sans-serif;

  --radio-img: 13px;
  --radio-panel: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--texto);
  font-family: var(--f-texto);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.titulo {
  font-family: var(--f-titulo);
  font-weight: 700;
  line-height: 1.1;
}
.subtitulo {
  font-family: var(--f-subtitulo);
  font-weight: 300;
  line-height: 1.2;
}

/* ---------- Header ---------- */
.header {
  position: relative;
  height: 104px;
  background: var(--negro);
  margin-bottom: 61px; /* espacio que ocupa la pestaña bajo la franja negra */
}
.header__tab {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 435px;
  height: 165px;
  background: var(--negro);
  border-radius: 0 0 14px 14px;
  display: flex;
  justify-content: center;
  padding-top: 14px;
}
.header__tab img { width: 326px; height: auto; }

/* ---------- Botón ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 36px;
  background: var(--blanco);
  border: 1px solid var(--negro);
  border-radius: 999px;
  box-shadow: -5px 6px 0 var(--negro);
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 22px;
  color: var(--texto);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.boton:hover { transform: translate(-2px, 2px); box-shadow: -3px 4px 0 var(--negro); }
.boton:active { transform: translate(-5px, 6px); box-shadow: 0 0 0 var(--negro); }

/* ==========================================================
   HOME
   ========================================================== */
.home { padding: 45px 16px 72px; }
.home__titulo { font-size: 30px; text-align: center; }
.home__linea { display: none; }
.home__bajada {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.productos {
  list-style: none;
  margin: 32px auto 0;
  padding: 0;
  max-width: 906px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 72px 21px;
}
.producto-card {
  width: 288px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.producto-card__img {
  width: 100%;
  aspect-ratio: 288 / 330;
  object-fit: cover;
  border-radius: var(--radio-img);
}
.producto-card__nombre { margin-top: 30px; font-size: 28px; }
.producto-card__sabor { margin-top: 4px; font-size: 19px; }
.producto-card .boton { margin-top: auto; }
.producto-card__texto { margin-bottom: 44px; }

/* ==========================================================
   PRODUCTO
   ========================================================== */
.producto {
  width: 100%;
  max-width: 928px;
  margin: 68px auto 0;
  padding: 0 16px 120px;
  display: grid;
  grid-template-columns: 380px 1fr;
  grid-template-areas: "galeria info";
  column-gap: 16px;
  align-items: start;
}
.producto__galeria { grid-area: galeria; }
.producto__info { grid-area: info; }

.producto__encabezado { text-align: center; padding-top: 8px; }
.producto__nombre { font-size: 28px; }
.producto__sabor { margin-top: 2px; font-size: 22px; }
.producto__linea { display: none; }

/* Galería: grilla en desktop, carrusel en mobile */
.galeria__pista {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
.galeria__item { margin: 0; }
.galeria__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radio-img);
}
.galeria__item--principal { grid-column: 1 / -1; aspect-ratio: 380 / 440; }
.galeria__item--chica { aspect-ratio: 181 / 297; }
.galeria__item--ancha { grid-column: 1 / -1; aspect-ratio: 378 / 297; margin-top: -8px; }
.galeria__puntos { display: none; }

/* Acordeón */
.acordeon {
  margin-top: 20px;
  background: var(--panel);
  border-radius: var(--radio-panel);
  padding: 8px 20px 24px 28px;
}
.acordeon__item { border-bottom: 1px solid var(--texto); }
.acordeon__titulo {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 8px;
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 22px;
}
.acordeon__titulo::-webkit-details-marker { display: none; }
/* Ícono + / − */
.acordeon__icono { position: relative; width: 22px; height: 22px; flex: none; }
.acordeon__icono::before,
.acordeon__icono::after {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 3px;
  margin-top: -1.5px;
  background: var(--texto);
  transition: transform .2s ease;
}
.acordeon__icono::after { transform: rotate(90deg); }
.acordeon__item[open] .acordeon__icono::after { transform: rotate(0deg); }

.acordeon__contenido {
  padding: 4px 0 18px;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: .04em;
}
.acordeon__contenido p + p { margin-top: 18px; }
.acordeon__contenido--mayus {
  font-weight: 600;
  text-transform: uppercase;
}

/* Tabla nutricional */
.tabla {
  background: var(--tabla);
  border-radius: 14px;
  padding: 20px 14px 24px;
  margin: 4px -8px 0;
  font-size: 13.5px;
  letter-spacing: 0;
}
.tabla__porcion {
  text-align: center;
  font-weight: 500;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--texto);
}
.tabla table { width: 100%; border-collapse: collapse; }
.tabla th {
  font-weight: 600;
  padding: 18px 0 2px;
  border-bottom: 4px solid var(--texto);
}
.tabla th:nth-child(2) { text-align: center; }
.tabla th:last-child { text-align: right; }
.tabla td {
  padding: 14px 0 4px;
  border-bottom: 1px solid var(--texto);
}
.tabla td:nth-child(2) {
  text-align: center;
  border-left: 1px solid var(--texto);
  border-right: 1px solid var(--texto);
}
.tabla td:last-child { text-align: right; }
.tabla tbody tr:first-child td { padding-top: 28px; }
.tabla tbody tr:last-child td { border-bottom: 4px solid var(--texto); }
.tabla__nota { margin-top: 16px; font-weight: 500; font-size: 12.5px; line-height: 1.3; }

/* Certificados */
.certificados {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 10px 0 14px;
}
.certificados img:nth-child(1) { width: 141px; }
.certificados img:nth-child(2) { width: 106px; }
.certificados img:nth-child(3) { width: 65px; }

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  background: var(--negro);
  color: var(--tostado);
  padding: 30px 44px 34px;
}
.footer__arriba {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--tostado);
}
.footer__logo img { width: 188px; margin-left: -16px; }
.footer__derecha { display: flex; align-items: center; gap: 112px; }
.footer__redes { display: flex; gap: 18px; }
.footer__redes a { display: block; width: 24px; height: 24px; }
.footer__redes svg { width: 100%; height: 100%; fill: var(--tostado); }
/* Marca Paraguay en tono tostado (usa el SVG como máscara) */
.marca-paraguay {
  display: block;
  width: 92px;
  aspect-ratio: 109 / 36;
  background: var(--tostado);
  -webkit-mask: url("../Paraguay.svg") center / contain no-repeat;
          mask: url("../Paraguay.svg") center / contain no-repeat;
}
.footer__abajo {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  font-size: 11px;
  letter-spacing: .02em;
}
.footer__links { display: flex; gap: 20px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }

/* ==========================================================
   TABLET
   ========================================================== */
@media (max-width: 959px) {
  .productos { max-width: 597px; }
  .producto {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 560px;
  }
  .producto__info { display: contents; }
  .producto__encabezado { order: 1; }
  .producto__galeria { order: 2; margin-top: 40px; }
  .acordeon { order: 3; margin-top: 40px; }
}

/* ==========================================================
   MOBILE
   ========================================================== */
@media (max-width: 767px) {
  .header { height: 112px; margin-bottom: 59px; }
  .header__tab { width: 320px; height: 171px; padding-top: 28px; border-radius: 0 0 18px 18px; }
  .header__tab img { width: 248px; }

  .boton { height: 47px; padding: 0 34px; font-size: 23px; }

  /* Home */
  .home { padding: 52px 16px 80px; }
  .home__titulo { font-size: 34px; max-width: 290px; margin: 0 auto; }
  .home__linea {
    display: block;
    max-width: 312px;
    margin: 16px auto 0;
    border: 0;
    border-top: 1px solid var(--texto);
  }
  .home__bajada { margin-top: 12px; font-size: 14px; }
  .productos { margin-top: 48px; gap: 80px; }
  .producto-card { width: 312px; }
  .producto-card__img { aspect-ratio: 312 / 360; }
  .producto-card__nombre { margin-top: 32px; font-size: 32px; }
  .producto-card__sabor { font-size: 21px; }
  .producto-card__texto { margin-bottom: 32px; }

  /* Producto */
  .producto {
    margin-top: 76px;
    padding: 0 9px 120px;
  }
  .producto__encabezado { padding: 0 9px; }
  .producto__nombre { font-size: 30px; }
  .producto__sabor { font-size: 24px; }
  .producto__linea {
    display: block;
    max-width: 312px;
    margin: 20px auto 0;
    border: 0;
    border-top: 1px solid var(--texto);
  }
  .producto__galeria { margin-top: 50px; }
  .galeria__pista {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 9px;
    scroll-padding: 0 9px;
  }
  .galeria__pista::-webkit-scrollbar { display: none; }
  .galeria__item,
  .galeria__item--principal,
  .galeria__item--chica,
  .galeria__item--ancha {
    flex: 0 0 100%;
    aspect-ratio: 370 / 420;
    margin: 0;
    scroll-snap-align: start;
  }
  .galeria__puntos {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
  }
  .galeria__puntos button {
    width: 10px; height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #D9D9D9;
    cursor: pointer;
  }
  .galeria__puntos button[aria-current="true"] { background: #8C8178; }

  .acordeon { margin-top: 50px; padding: 4px 16px 22px 23px; }
  .acordeon__titulo { font-size: 20px; }
  .acordeon__contenido { font-size: 14px; }
  .tabla { margin: 4px -10px 0; font-size: 12.5px; }
  .certificados { gap: 18px; }
  .certificados img:nth-child(1) { width: 112px; }
  .certificados img:nth-child(2) { width: 88px; }
  .certificados img:nth-child(3) { width: 54px; }

  /* Footer */
  .footer { padding: 30px 20px 26px; }
  .footer__arriba {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 20px;
  }
  .footer__logo { align-self: center; }
  .footer__logo img { width: 254px; margin: 0; }
  .footer__derecha { justify-content: space-between; margin-top: 48px; gap: 16px; }
  .marca-paraguay { width: 104px; }
  .footer__redes { gap: 22px; }
  .footer__redes a { width: 26px; height: 26px; }
  .footer__abajo {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding-top: 22px;
    font-size: 11px;
    letter-spacing: 0;
  }
  .footer__links { gap: 22px; }
}
