/* ============================================================
   ARCAICOS BEBIDAS NATURALES
   Layout · layout.css
   Contenedores, secciones y sistema de grid
   ============================================================ */

/* -- Contenedor -- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--lg  { max-width: var(--container-lg); }
.container--2xl { max-width: var(--container-2xl); }

/* -- Secciones -- */
.section {
  padding-block: var(--space-20);
}

.section--sm  { padding-block: var(--space-12); }
.section--lg  { padding-block: var(--space-24); }
.section--xl  { padding-block: var(--space-32); }

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

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-text-white);
}

.section--dark p {
  color: var(--color-text-light);
}

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

/* Canales de contacto */
.section--contact-canales {
  position: relative;
  background-color: rgba(250, 247, 242, 0.88);
  background-image: none;
}

.section--contact-canales > .container {
  position: relative;
  z-index: 1;
}

.section--white {
  background-color: rgba(255, 255, 255, 0.85);
  background-image: none;
}

/* -- Grid -- */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2   { grid-template-columns: repeat(2, 1fr); }
.grid--3   { grid-template-columns: repeat(3, 1fr); }
.grid--4   { grid-template-columns: repeat(4, 1fr); }
.grid--5   { grid-template-columns: repeat(5, 1fr); }
.grid--auto-220 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--auto-180 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid--auto-280 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* -- Flex -- */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-4        { gap: var(--space-4); }
.gap-6        { gap: var(--space-6); }

/* -- Encabezado de sección -- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header__eyebrow {
  display: inline-block;
  font-size: var(--size-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section--dark .section-header__eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--size-4xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.section--dark .section-header__title {
  color: white;
}

.section-header__subtitle {
  font-size: var(--size-md);
  max-width: 580px;
  margin-inline: auto;
  line-height: var(--leading-loose);
}

/* Acento animado bajo títulos con clase .reveal (armonía al entrar en vista) */
.section-header__title.reveal {
  position: relative;
}

.section-header__title.reveal::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  margin: var(--space-4) auto 0;
  background: var(--color-primary);
  border-radius: 2px;
  transform: scaleX(1);
  opacity: 1;
  transition:
    transform 0.85s var(--ease-out-soft),
    opacity 0.45s var(--ease-in-out-soft);
  transform-origin: center;
}

.js-ready .section-header__title.reveal:not(.is-visible)::after {
  transform: scaleX(0);
  opacity: 0;
}

.section--dark .section-header__title.reveal::after {
  background: rgba(255, 252, 248, 0.72);
}

/* -- Banner para páginas internas -- */
.page-banner {
  height: 260px;
  background-color: var(--color-primary);
  background-image: url('../assets/images/banners/banner-paginas.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--navbar-height);
  position: relative;
  overflow: hidden;
}

.page-banner--nosotros {
  background-image: url('../assets/images/banners/banner-paginas.png');
  background-size: cover;
  background-position: center;
}

.page-banner--nosotros::before {
  /* Menos oscurecimiento para respetar el arte del banner */
  background: rgba(77, 18, 12, 0.18);
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-primary-overlay);
}

.page-banner__content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.page-banner__logo {
  display: block;
  width: min(420px, 70vw);
  height: auto;
  margin: 0 auto var(--space-3);
  /* El archivo tiene fondo negro: screen lo integra con el banner */
  mix-blend-mode: screen;
  opacity: 0.98;
  filter: contrast(1.08) saturate(1.05);
}

.page-banner__title {
  font-family: var(--font-display);
  font-size: var(--size-4xl);
  font-weight: var(--weight-bold);
  color: white;
  margin-bottom: var(--space-2);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: normal;
}

.page-banner__breadcrumb {
  font-size: var(--size-sm);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-1) var(--space-2);
  max-width: 100%;
  margin-inline: auto;
  overflow-wrap: break-word;
  word-break: normal;
}

.page-banner__breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.page-banner__breadcrumb a:hover {
  color: white;
}

.page-banner__breadcrumb span {
  opacity: 0.5;
  overflow-wrap: break-word;
  word-break: normal;
  max-width: 100%;
}

.page-banner__breadcrumb span:last-child {
  min-width: 0;
}

/* -- Bloques principales: sin huecos, flujo continuo -- */
main > .page-banner,
main > section,
main > .hero,
main > section.franchise-hero {
  position: relative;
  isolation: isolate;
  border-radius: 0;
  overflow: hidden;
  margin-inline: 0;
  border: none;
  box-shadow: none;
}

/* Intersección entre secciones: sin huecos */
main > .page-banner + section,
main > section + section {
  margin-top: 0;
  border-top: none;
}

/* Secciones claras: fondo semi-transparente para que se vea el arabesco del body */
.section--light,
.section--white,
.section--contact-canales {
  background-color: rgba(250, 247, 242, 0.88);
}

.section--catalog-bg {
  background-color: rgba(250, 247, 242, 0.88);
}

/* Pseudo-elementos de catalog-bg: ocultar para no tapar el fondo */
.section--catalog-bg::before,
.section--catalog-bg::after {
  display: none;
}

