/* ==========================================================================
   Bilbao — Home (front-page)
   Ref. Figma node 4260:888
   ========================================================================== */

.home .site-main { overflow-x: clip; }

/* --- Hero como banner-carrossel (header transparente por cima) --- */
.hero { position: relative; color: #fff; text-align: center; }
/* Antes do Splide montar, mostra só o 1º slide (evita empilhar) */
.hero .splide:not(.is-initialized) .splide__slide:nth-child(n + 2) { display: none; }
.hero .splide__slide {
  position: relative;
  min-height: min(88vh, 896px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; min-height: 100%; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); }
.hero__content { position: relative; z-index: 2; padding: 0 24px; display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: min(520px, 82vw); height: auto; margin: 0 auto 24px; }
.hero__kicker { font-size: clamp(20px, 3vw, 32px); color: #fff; }
.hero__cta { margin-top: 30px; }
/* Dots do hero — brancos, no rodapé */
.hero .splide__pagination { position: absolute; bottom: 32px; left: 0; right: 0; margin: 0; z-index: 3; }
.hero .splide__pagination__page { width: 8px; height: 8px; background: rgba(255, 255, 255, 0.45); }
.hero .splide__pagination__page.is-active { background: #fff; transform: scale(1.3); }

/* --- Faixa de marcas --- */
.brand-strip { background: var(--c-brand-900); overflow: hidden; }
.brand-strip__viewport { overflow: hidden; }
.brand-strip__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: brand-marquee 32s linear infinite;
}
.brand-strip__track:hover { animation-play-state: paused; }
.brand-strip__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-block: 28px;
  padding-inline: clamp(28px, 4vw, 56px);
}
.brand-strip__item img {
  max-height: 54px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}
@keyframes brand-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-strip__track { animation: none; }
}

/* --- Banners promo 2-up --- */
.promo2__grid { display: grid; grid-template-columns: 1fr 1fr; }
.promo-card {
  position: relative;
  aspect-ratio: 16 / 15;
  overflow: hidden;
  display: block;
}
.promo-card::after,
.tile::after,
.mosaic__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0) 58%); }
.promo-card__img {width: 100%; height: 100%; object-fit: cover;}
.promo-card__body,
.tile__body,
.mosaic__body {
  position: absolute;
  left: clamp(28px, 4vw, 56px);
  right: clamp(28px, 4vw, 56px);
  bottom: 44px;
  z-index: 2;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.promo-card__title,
.tile__title,
.mosaic__title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
}
.promo-card__sub,
.tile__sub,
.mosaic__sub {
  font: var(--t-body-sm);
  color: rgba(255, 255, 255, 0.85);
  max-width: 34ch;
}
.promo-card__body .btn,
.tile__body .btn,
.mosaic__body .btn { margin-top: 6px; }

/* --- Carrossel de produtos --- */
.home-products { padding-block: 96px; }
.home-products__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  border-bottom:1px solid #DFDFDF;
}
.home-products__tabs { display: flex; gap: 40px; flex-wrap: wrap; }
.home-products__nav { display: flex; gap: 12px; }
.carousel-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-neutral-100);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: var(--c-neutral-900);
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.carousel-arrow:hover { background: var(--c-brand-900); border-color: var(--c-brand-900); color: #fff; opacity: 1; }
.home-products .splide.is-loading { opacity: 0.45; transition: opacity 0.2s ease; }
.home-products__empty { padding: 48px 0; color: var(--c-neutral-500); font: var(--t-body-sm); }
.tab {
  font: var(--t-label-md);
  letter-spacing: var(--ls-nav);
  text-transform: capitalize;
  color: var(--c-neutral-500);
  padding: 25px 15px;
  border-bottom: 2px solid transparent;
}
.tab.is-active { color: var(--c-brand-900); border-bottom-color: var(--c-brand-900); }
.home-products__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.home-products__track::-webkit-scrollbar { display: none; }
.home-products__track .product-card { scroll-snap-align: start; }

/* --- Seções feature (destaque) ---
   Media com ALTURA FIXA (não aspect-ratio) para não transbordar dentro do grid
   auto-dimensionado em certas larguras. */
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.feature__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; justify-content: center; padding-block: 96px; padding-inline: var(--edge) clamp(40px, 5vw, 80px); }
.feature__media { height: 680px; }
.feature__kicker,
.story__kicker {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-brand-100);
}
.feature__kicker.red { color: var(--c-brand-500) }
.feature__title { font: var(--t-title-lg); }
.feature__desc { color: inherit; opacity: 0.85; max-width: 40ch; line-height: 1.6; }

.feature--dark { background: #000000; color: #fff; }
.feature--dark .feature__media { order: 2; background:#000000; }
.feature--dark .feature__media video { width: 100%; height: 100%; object-fit: contain; }
.feature--light { background: var(--c-white); color: var(--c-neutral-900); margin: 100px 0 }
.feature__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; height: 560px; overflow: hidden; }
.feature__gallery .ph { height: 100%; aspect-ratio: auto; min-height: 0; }

/* --- Trajetória (brown) --- */
.story { display: grid; grid-template-columns: 1fr 1fr; background: var(--c-brand-900); color: #fff; align-items: center; position: relative; overflow: hidden; }
/* Grafismo: marca d'água sutil da assinatura Bilbao. */
.story svg {
  position: absolute;
  right: 50%;
  top: 50%;
  transform: translateY(-50%) translateX(80px);
  width: auto;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.story__media, .story__text { position: relative; z-index: 1; }
.story__media { height: 680px; }
.story__media img { width:100%; height:100%; object-fit:cover; }
.story__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; justify-content: center; padding-block: 96px; padding-inline: clamp(40px, 5vw, 80px) var(--edge); }
.story__title { font: var(--t-title-lg); max-width: 16ch; }
.story__desc {
    color: inherit;
    opacity: 0.85;
    max-width: 40ch;
    line-height: 1.6;
}


/* --- 3 categorias --- */
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 60px auto }
.tile {
  position: relative;
  aspect-ratio: 3 / 4;
  display: block;
  color: #fff;
  overflow: hidden;
}
.tile .ph, .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* --- Blog --- */
.home-blog { padding-block: 96px; }
.home-blog__title { text-align: center; font-size: 20px; color: var(--c-neutral-700); margin-bottom: 48px; }
.home-blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.post-card__media { display: block; height: 260px; overflow: hidden; background: var(--c-neutral-0); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__media .ph { height: 100%; }
.post-card__body { padding-top: 20px; }
.post-card__date { color: var(--c-neutral-500); }
.post-card__title { font: var(--t-title-sm); margin-top: 10px; line-height: 1.4; }

/* --- Mosaico de categorias --- */
.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 320px;
  gap: 8px;
  margin: 0 auto 60px;
}
.mosaic__item { position: relative; display: block; color: #fff; overflow: hidden; }
.mosaic__item--tall { grid-row: span 2; }
.mosaic__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* --- Responsivo --- */
@media (max-width: 900px) {
  .promo2__grid,
  .feature,
  .story,
  .tiles3,
  .home-blog__grid,
  .mosaic { grid-template-columns: 1fr; }
  .feature--dark .feature__media { order: 0; }
  .feature__media, .feature__gallery, .story__media { height: auto; min-height: 320px; }
  .feature__desc, .story__desc { max-width: none }
  .mosaic__item--tall { grid-row: span 1; }
  .hero { min-height: 88vh; }
  .brand-strip__item img {max-height: 32px;}
  .story svg {
    top: 0;
    right: 0;
    height: 50%;
    transform: translateY(0%);
  }
}
