/**
 * Bella Flor — Home
 * ---------------------------------------------------------------------------
 * Carregado apenas na página inicial (ver inc/enqueue.php).
 */

/* ==========================================================================
   Hero
   ========================================================================== */

.bf-hero {
  position: relative;
  background-color: var(--bf-surface-alt);
}

.bf-hero__track {
  position: relative;
  /*
   * Altura fixa evita CLS: o espaço é reservado antes de a imagem carregar.
   * dvh em vez de vh para não pular quando a barra do navegador móvel some.
   */
  height: clamp(420px, 62vh, 720px);
}

.bf-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--bf-duration-slow) var(--bf-ease),
    visibility var(--bf-duration-slow) var(--bf-ease);
}

.bf-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.bf-hero__media,
.bf-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bf-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

/*
 * Gradiente lateral em vez de escurecer a foto inteira: preserva o produto
 * e garante contraste do texto sem "sujar" a imagem.
 */
.bf-hero__slide--light .bf-hero__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(30, 12, 18, 0.68) 0%,
    rgba(30, 12, 18, 0.35) 42%,
    rgba(30, 12, 18, 0) 72%
  );
}

.bf-hero__slide--dark .bf-hero__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.45) 42%,
    rgba(255, 255, 255, 0) 72%
  );
}

.bf-hero__box {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.bf-hero__slide--light .bf-hero__box { color: var(--bf-text-inverse); }
.bf-hero__slide--dark .bf-hero__box  { color: var(--bf-text); }

.bf-hero__slide--light .bf-hero__eyebrow { color: rgba(255, 255, 255, 0.82); }

.bf-hero__title {
  margin-top: var(--bf-space-3);
  font-family: var(--bf-font-display);
  font-size: var(--bf-text-3xl);
  font-weight: var(--bf-weight-regular);
  line-height: var(--bf-leading-tight);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.bf-hero__subtitle {
  margin-top: var(--bf-space-4);
  max-width: 44ch;
  font-size: var(--bf-text-lg);
  line-height: var(--bf-leading-body);
  opacity: 0.92;
}

.bf-hero__cta {
  margin-top: var(--bf-space-6);
}

.bf-hero__slide--light .bf-hero__cta {
  background-color: var(--bf-surface);
  border-color: var(--bf-surface);
  color: var(--bf-brand-strong);
}

.bf-hero__slide--light .bf-hero__cta:hover {
  background-color: var(--bf-brand-tint);
  border-color: var(--bf-brand-tint);
}

/* --- Controles ------------------------------------------------------------ */

.bf-hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--bf-brand-strong);
  border-radius: var(--bf-radius-pill);
  transition: background-color var(--bf-duration-fast) var(--bf-ease);
}

.bf-hero__arrow:hover {
  background-color: var(--bf-surface);
}

.bf-hero__arrow--prev { left: var(--bf-space-5); }
.bf-hero__arrow--next { right: var(--bf-space-5); }

.bf-hero__dots {
  position: absolute;
  bottom: var(--bf-space-5);
  left: 50%;
  z-index: 3;
  display: flex;
  gap: var(--bf-space-2);
  transform: translateX(-50%);
}

.bf-hero__dot {
  width: 28px;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.45);
  border-radius: var(--bf-radius-pill);
  transition: background-color var(--bf-duration-fast) var(--bf-ease);
}

.bf-hero__dot.is-active {
  background-color: var(--bf-surface);
}

/* --- Hero sem banners ----------------------------------------------------- */

.bf-hero--empty {
  display: grid;
  place-items: center;
  padding-block: var(--bf-space-11);
  background-color: var(--bf-brand-tint);
  text-align: center;
}

.bf-hero--empty .bf-hero__box {
  max-width: 620px;
  margin-inline: auto;
}

.bf-hero__hint {
  margin-top: var(--bf-space-5);
  font-size: var(--bf-text-xs);
  color: var(--bf-text-muted);
}

/* ==========================================================================
   Categorias
   ========================================================================== */

.bf-cats__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--bf-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.bf-cat__link {
  display: block;
}

.bf-cat__media {
  display: block;
  overflow: hidden;
  border-radius: var(--bf-radius-sm);
  background-color: var(--bf-surface-alt);
  aspect-ratio: var(--bf-ratio-product);
}

.bf-cat__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--bf-duration-slow) var(--bf-ease-out);
}

.bf-cat__link:hover .bf-cat__img {
  transform: scale(1.05);
}

.bf-cat__label {
  display: block;
  margin-top: var(--bf-space-3);
  text-align: center;
}

.bf-cat__name {
  display: block;
  font-size: var(--bf-text-sm);
  font-weight: var(--bf-weight-medium);
  letter-spacing: var(--bf-tracking-wide);
  text-transform: uppercase;
}

.bf-cat__count {
  display: block;
  margin-top: 2px;
  font-size: var(--bf-text-xs);
  color: var(--bf-text-subtle);
}

/* ==========================================================================
   Bloco de coleção
   ========================================================================== */

.bf-collection {
  background-color: var(--bf-brand-tint);
}

.bf-collection__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--bf-space-9);
  padding-block: var(--bf-section-y);
}

.bf-collection__media {
  overflow: hidden;
  border-radius: var(--bf-radius-sm);
}

.bf-collection__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.bf-collection__title {
  margin-top: var(--bf-space-3);
  font-size: var(--bf-text-2xl);
}

.bf-collection__text {
  margin-top: var(--bf-space-4);
  max-width: 46ch;
  color: var(--bf-text-muted);
}

.bf-collection__list {
  display: grid;
  gap: var(--bf-space-4);
  margin-block: var(--bf-space-6);
  list-style: none;
  padding: 0;
}

.bf-collection__item {
  display: flex;
  align-items: flex-start;
  gap: var(--bf-space-3);
}

.bf-collection__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background-color: var(--bf-surface);
  color: var(--bf-brand-strong);
  border-radius: var(--bf-radius-pill);
}

.bf-collection__item-title {
  display: block;
  font-size: var(--bf-text-sm);
  font-weight: var(--bf-weight-medium);
}

.bf-collection__item-text {
  display: block;
  font-size: var(--bf-text-sm);
  color: var(--bf-text-muted);
  line-height: var(--bf-leading-snug);
}

/* ==========================================================================
   Depoimentos
   ========================================================================== */

.bf-reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bf-space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.bf-review {
  display: flex;
  flex-direction: column;
  gap: var(--bf-space-3);
  padding: var(--bf-space-6);
  background-color: var(--bf-bg);
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-radius-sm);
}

.bf-review__stars {
  display: flex;
  gap: 2px;
  color: var(--bf-line-strong);
}

.bf-review__text {
  flex: 1;
  margin: 0;
  font-family: var(--bf-font-display);
  font-size: var(--bf-text-lg);
  font-style: italic;
  line-height: var(--bf-leading-snug);
  color: var(--bf-text);
}

.bf-review__meta {
  font-size: var(--bf-text-xs);
}

.bf-review__author {
  display: block;
  font-weight: var(--bf-weight-medium);
}

.bf-review__product {
  color: var(--bf-text-muted);
}

/* ==========================================================================
   Instagram
   ========================================================================== */

.bf-instagram__inner {
  display: grid;
  justify-items: center;
  gap: var(--bf-space-4);
  text-align: center;
}

.bf-instagram__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  background-color: var(--bf-brand-tint);
  color: var(--bf-brand-strong);
  border-radius: var(--bf-radius-pill);
}

.bf-instagram__title {
  font-size: var(--bf-text-xl);
}

.bf-instagram__text {
  max-width: 48ch;
  color: var(--bf-text-muted);
}

/* ==========================================================================
   Blog na home
   ========================================================================== */

.bf-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bf-space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.bf-post-card__media {
  display: block;
  overflow: hidden;
  border-radius: var(--bf-radius-sm);
  background-color: var(--bf-surface-alt);
  aspect-ratio: 10 / 7;
}

.bf-post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--bf-duration-slow) var(--bf-ease-out);
}

.bf-post-card__link:hover .bf-post-card__img {
  transform: scale(1.04);
}

.bf-post-card__body {
  display: block;
  padding-top: var(--bf-space-4);
}

.bf-post-card__date {
  display: block;
  font-size: var(--bf-text-xs);
  letter-spacing: var(--bf-tracking-wide);
  text-transform: uppercase;
  color: var(--bf-text-subtle);
}

.bf-post-card__title {
  display: block;
  margin-top: var(--bf-space-2);
  font-family: var(--bf-font-display);
  font-size: var(--bf-text-lg);
  line-height: var(--bf-leading-snug);
}

.bf-post-card__excerpt {
  display: block;
  margin-top: var(--bf-space-2);
  font-size: var(--bf-text-sm);
  color: var(--bf-text-muted);
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 1024px) {
  .bf-cats__grid { grid-template-columns: repeat(3, 1fr); }

  .bf-collection__grid {
    grid-template-columns: 1fr;
    gap: var(--bf-space-6);
  }

  .bf-reviews__grid { grid-template-columns: repeat(2, 1fr); }
  .bf-posts { grid-template-columns: 1fr; gap: var(--bf-space-5); }

  .bf-hero__arrow { display: none; }
}

@media (max-width: 768px) {
  .bf-hero__track { height: clamp(460px, 78vh, 620px); }

  /* No mobile o texto vai para o rodapé do banner, sobre gradiente vertical. */
  .bf-hero__content { align-items: flex-end; padding-bottom: var(--bf-space-9); }

  .bf-hero__slide--light .bf-hero__content::before {
    background: linear-gradient(
      to top,
      rgba(30, 12, 18, 0.78) 0%,
      rgba(30, 12, 18, 0.3) 45%,
      rgba(30, 12, 18, 0) 75%
    );
  }

  .bf-hero__slide--dark .bf-hero__content::before {
    background: linear-gradient(
      to top,
      rgba(255, 255, 255, 0.88) 0%,
      rgba(255, 255, 255, 0.4) 45%,
      rgba(255, 255, 255, 0) 75%
    );
  }

  .bf-cats__grid { grid-template-columns: repeat(2, 1fr); }
  .bf-reviews__grid { grid-template-columns: 1fr; }
}
