/*
 * Build 351 — Home Premium
 * Refinamento visual seguro, aplicado após o hotfix 350.1.
 */

/* Ritmo vertical e títulos */
.home .section {
  padding-block: clamp(64px, 7vw, 104px);
}
.home .section-heading {
  margin-bottom: clamp(28px, 4vw, 48px);
}
.home .section-heading h2 {
  text-wrap: balance;
  letter-spacing: -.025em;
}
.home .section-heading p {
  max-width: 680px;
  margin-inline: auto;
  text-wrap: pretty;
}

/* Botões e microinterações */
.home .btn,
.home .button,
.home button {
  -webkit-tap-highlight-color: transparent;
}
.home .btn,
.home .product-card-actions .button,
.home .product-details-link {
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
}
@media (hover:hover) {
  .home .btn:hover,
  .home .product-card-actions .button:hover,
  .home .product-details-link:hover {
    transform: translateY(-2px);
  }
}

/* Categorias: acabamento sem alterar a grade responsiva aprovada */
.home .kaff-category-card {
  min-width: 0;
  border-radius: clamp(16px, 2vw, 24px);
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0,0,0,.30);
  transform: translateZ(0);
}
.home .kaff-category-card__link {
  isolation: isolate;
}
.home .kaff-category-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.04) 35%, rgba(0,0,0,.82) 100%);
  pointer-events: none;
}
.home .kaff-category-card__image {
  transition: transform .55s cubic-bezier(.2,.65,.3,1), filter .35s ease;
}
.home .kaff-category-card__content {
  z-index: 2;
}
.home .kaff-category-card__title {
  text-wrap: balance;
  line-height: 1.05;
}
.home .kaff-category-card__cta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@media (hover:hover) {
  .home .kaff-category-card:hover .kaff-category-card__image {
    transform: scale(1.045);
    filter: brightness(1.06) saturate(1.04);
  }
}

/* Vitrines: cards com altura e alinhamento uniformes */
.home .kaff-showcase-track {
  align-items: stretch;
}
.home .kaff-showcase-card {
  height: auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(0,0,0,.24);
}
.home .kaff-product-media {
  aspect-ratio: 1 / 1;
  min-height: 0;
}
.home .kaff-product-media .product-image-link,
.home .kaff-product-media img {
  width: 100%;
  height: 100%;
}
.home .kaff-product-media img {
  object-fit: contain;
}
.home .kaff-product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.home .kaff-product-content h3 {
  min-height: 2.8em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.home .product-price {
  margin-top: auto;
}
.home .product-card-actions {
  margin-top: 16px;
}
.home .product-card-actions .button,
.home .product-details-link {
  min-height: 44px;
}
.home .kaff-showcase-tabs {
  scrollbar-width: none;
}
.home .kaff-showcase-tabs::-webkit-scrollbar {
  display: none;
}

/* WhatsApp: posição segura e aparência discreta */
.home .kaff-whatsapp-float,
.home .kaff-whatsapp-button,
.home [class*="whatsapp"][class*="float"] {
  box-shadow: 0 12px 32px rgba(0,0,0,.34);
}

/* Mobile */
@media (max-width: 767px) {
  .home .section {
    padding-block: 56px;
  }
  .home .section-heading {
    text-align: left;
    margin-inline: 0;
  }
  .home .section-heading h2 {
    font-size: clamp(1.72rem, 8vw, 2.2rem);
  }
  .home .section-heading p {
    margin-inline: 0;
    font-size: .96rem;
  }
  .home .kaff-category-track {
    gap: 12px !important;
  }
  .home .kaff-category-card__content {
    padding: 14px !important;
  }
  .home .kaff-category-card__title {
    font-size: clamp(1rem, 4.6vw, 1.22rem) !important;
  }
  .home .kaff-category-card__description,
  .home .kaff-category-card__count {
    display: none !important;
  }
  .home .kaff-category-card__meta {
    margin-top: 8px;
  }
  .home .kaff-category-card__cta {
    min-height: 34px;
    font-size: .78rem;
  }
  .home .kaff-showcase-heading {
    align-items: flex-end;
  }
  .home .kaff-showcase-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
  }
  .home .kaff-showcase-tabs button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 42px;
  }
  .home .kaff-product-content h3 {
    min-height: 2.65em;
  }
}

@media (max-width: 390px) {
  .home .container {
    width: min(94%, var(--container));
  }
  .home .kaff-category-track {
    gap: 10px !important;
  }
  .home .kaff-category-card__content {
    padding: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .kaff-category-card__image,
  .home .btn,
  .home .button,
  .home button {
    transition: none !important;
  }
}
