/**
 * AWA B2B — Home Refinements
 * Padronização de seções, carousels e footer.
 * Escopo: homepage + módulos Rokanthemes + footer.
 */

/* ─────────────────────────────────────────────────────────────
   1. TOKENS — espaçamento e paleta centralizados
   ───────────────────────────────────────────────────────────── */
:root {
  --awa-section-gap:   56px;   /* distância entre seções */
  --awa-section-gap-sm: 36px;
  --awa-card-radius:   8px;
  --awa-card-shadow:   0 2px 8px rgba(0,0,0,.07);
  --awa-card-shadow-hover: 0 6px 20px rgba(0,0,0,.12);
  --awa-red:           #b73337;
  --awa-red-dark:      #8e2629;
  --awa-text:          #1a1a1a;
  --awa-text-muted:    #666;
  --awa-border:        #e8e8e8;
  --awa-bg-alt:        #f7f7f7;
}

/* ─────────────────────────────────────────────────────────────
   2. SEÇÕES DA HOME — espaçamento uniforme
   ───────────────────────────────────────────────────────────── */
.awa-home-section,
.top-home-content {
  margin-bottom: var(--awa-section-gap);
}

.awa-home-section:last-child,
.top-home-content:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .awa-home-section,
  .top-home-content {
    margin-bottom: var(--awa-section-gap-sm);
  }
}

/* ─────────────────────────────────────────────────────────────
   3. SECTION HEADER — cabeçalho padrão de cada seção
   ───────────────────────────────────────────────────────────── */
.awa-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--awa-border);
}

.awa-section-header__left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.awa-section-header__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--awa-red);
  line-height: 1;
}

.awa-section-header__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--awa-text);
  line-height: 1.2;
  margin: 0;
}

.awa-section-header__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--awa-red);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, gap .2s;
}

.awa-section-header__link:hover {
  color: var(--awa-red-dark);
  gap: 7px;
}

.awa-section-header__link svg {
  flex-shrink: 0;
  transition: transform .2s;
}

.awa-section-header__link:hover svg {
  transform: translateX(2px);
}

@media (max-width: 480px) {
  .awa-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 18px;
  }
  .awa-section-header__title { font-size: 18px; }
}

/* ─────────────────────────────────────────────────────────────
   4. CAROUSEL SECTIONS — wrapper e separação
   ───────────────────────────────────────────────────────────── */
.awa-carousel-section .container {
  position: relative;
}

/* Destaque sutil para carousels de categoria */
.awa-carousel-section--category {
  background: var(--awa-bg-alt);
  padding-top: 40px;
  padding-bottom: 40px;
  margin-left: 0;
  margin-right: 0;
}

.awa-carousel-section--category .container {
  padding-left: 16px;
  padding-right: 16px;
}

/* ─────────────────────────────────────────────────────────────
   5. CARDS DE PRODUTO — refinamento global
   ───────────────────────────────────────────────────────────── */
.product-thumb,
.item-product .product-thumb {
  border-radius: var(--awa-card-radius);
  box-shadow: var(--awa-card-shadow);
  transition: box-shadow .22s ease, transform .22s ease;
  background: #fff;
  overflow: hidden;
}

.product-thumb:hover,
.item-product:hover .product-thumb {
  box-shadow: var(--awa-card-shadow-hover);
  transform: translateY(-3px);
}

/* Imagem do card — proporção fixa */
.product-thumb .product-thumb-link img,
.product-thumb .first-thumb img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  width: 100%;
  height: auto;
  padding: 8px;
  background: #fff;
}

/* Info do card */
.product-thumb .product-info,
.product-thumb .product-name,
.item-product .product-info {
  padding: 10px 12px 14px;
}

/* Nome do produto */
.product-thumb .product-name a,
.item-product .product-name a {
  font-size: 13px;
  font-weight: 600;
  color: var(--awa-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  transition: color .18s;
}

.product-thumb .product-name a:hover {
  color: var(--awa-red);
}

/* SKU B2B */
.awa-b2b-sku {
  font-size: 11px;
  color: var(--awa-text-muted);
  letter-spacing: .04em;
  margin-bottom: 4px;
}

/* Preço */
.product-thumb .price-box .price,
.item-product .price-box .price {
  font-size: 15px;
  font-weight: 700;
  color: var(--awa-red);
}

.product-thumb .price-box .old-price .price {
  font-size: 12px;
  font-weight: 400;
  color: var(--awa-text-muted);
  text-decoration: line-through;
}

/* Badge de desconto */
.product-thumb .product-label-sale,
.item-product .lbl-percent {
  background: var(--awa-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
}

/* Botão de carrinho */
.product-thumb .btn-cart,
.product-thumb .action.tocart {
  width: 100%;
  background: var(--awa-red);
  color: #fff;
  border: none;
  border-radius: 0 0 var(--awa-card-radius) var(--awa-card-radius);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .18s;
}

.product-thumb .btn-cart:hover,
.product-thumb .action.tocart:hover {
  background: var(--awa-red-dark);
}

/* ─────────────────────────────────────────────────────────────
   6. OWL CAROUSEL — navegação refinada
   ───────────────────────────────────────────────────────────── */
.owl-controls .owl-buttons div,
.owl-nav .owl-prev,
.owl-nav .owl-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff !important;
  border: 1.5px solid var(--awa-border) !important;
  color: var(--awa-text) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .18s, box-shadow .18s, color .18s;
  opacity: 1 !important;
}

.owl-controls .owl-buttons div:hover,
.owl-nav .owl-prev:hover,
.owl-nav .owl-next:hover {
  border-color: var(--awa-red) !important;
  color: var(--awa-red) !important;
  box-shadow: 0 4px 12px rgba(183,51,55,.18);
}

/* Dots */
.owl-controls .owl-page span,
.owl-dots .owl-dot span {
  width: 7px;
  height: 7px;
  background: #d0d0d0;
  border-radius: 50%;
  transition: background .18s, width .18s;
}

.owl-controls .owl-page.active span,
.owl-dots .owl-dot.active span {
  background: var(--awa-red);
  width: 20px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────
   7. CATEGORYTAB — abas de categoria
   ───────────────────────────────────────────────────────────── */
.categorytab-container .rokan-product-heading {
  border-bottom: 2px solid var(--awa-border);
  margin-bottom: 20px;
  padding-bottom: 12px;
}

.categorytab-container .tabs li {
  border: 1.5px solid var(--awa-border);
  border-radius: 20px;
  margin-left: 6px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--awa-text-muted);
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
  background: #fff;
}

.categorytab-container .tabs li.active,
.categorytab-container .tabs li:hover {
  border-color: var(--awa-red);
  color: var(--awa-red);
  background: #fff7f7;
}

.categorytab-container .tabs li a {
  color: inherit;
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   8. BESTSELLER / NEWPRODUCT HEADING OVERRIDE
   ───────────────────────────────────────────────────────────── */
/* Ocultar os h2 internos dos blocos — usamos o awa-section-header */
.awa-carousel-section .rokan-product-heading h2,
.awa-carousel-section .rokan-featured-heading h2 {
  display: none;
}

.awa-carousel-section .rokan-product-heading,
.awa-carousel-section .rokan-featured-heading {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   9. FOOTER — imagens de pagamento e selos
   ───────────────────────────────────────────────────────────── */
.awa-footer-pay-sec {
  padding-top: 4px;
}

.awa-footer-pay-sec__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin: 0 0 10px;
}

.awa-footer-pay-sec__label--mt {
  margin-top: 18px;
}

/* Logos de pagamento */
.awa-footer-pay-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.awa-pay-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 5px;
  padding: 4px 6px;
  height: 36px;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.awa-pay-logo img {
  display: block;
  height: 22px;
  width: auto;
  object-fit: contain;
  filter: none;
}

/* Selos de segurança */
.awa-footer-sec-seals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.awa-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 5px 10px;
  height: 44px;
  transition: border-color .18s, background .18s;
  text-decoration: none;
}

.awa-seal:hover {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
}

.awa-seal img {
  display: block;
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .8;
  transition: opacity .18s;
}

.awa-seal:hover img,
.awa-seal--static img {
  opacity: 1;
}

/* Footer bottom copyright + pagamentos — alinhamento vertical */
.footer-bottom .footer-bottom-inner .row {
  align-items: center;
}

@media (max-width: 767px) {
  .awa-footer-pay-logos { gap: 6px; }
  .awa-pay-logo { height: 30px; }
  .awa-pay-logo img { height: 18px; }
  .awa-footer-sec-seals { gap: 8px; }
  .awa-seal { height: 38px; padding: 4px 8px; }
  .awa-seal img { height: 22px; }
  .awa-footer-pay-sec__label--mt { margin-top: 14px; }
}

/* ─────────────────────────────────────────────────────────────
   10. CONTAINER — consistência de largura máxima
   ───────────────────────────────────────────────────────────── */
.awa-home-section .container,
.top-home-content .container {
  max-width: 1280px;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 991px) {
  .awa-home-section .container,
  .top-home-content .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .awa-home-section .container,
  .top-home-content .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ─────────────────────────────────────────────────────────────
   11. BENEFÍCIOS BAR — refinamento
   ───────────────────────────────────────────────────────────── */
.awa-benefits-bar {
  background: var(--awa-red);
  padding: 0;
}

.awa-benefits-container {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
}

.awa-benefit-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-right: 1px solid rgba(255,255,255,.15);
  transition: background .18s;
}

.awa-benefit-item:last-child { border-right: none; }
.awa-benefit-item:hover { background: rgba(0,0,0,.08); }

.awa-benefit-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: rgba(255,255,255,.9);
}

.awa-benefit-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.awa-benefit-desc {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.75);
  line-height: 1.3;
}

@media (max-width: 767px) {
  .awa-benefits-container {
    flex-wrap: wrap;
  }
  .awa-benefit-item {
    flex: 0 0 50%;
    border-right: 1px solid rgba(255,255,255,.15);
    border-bottom: 1px solid rgba(255,255,255,.15);
    padding: 12px 16px;
  }
  .awa-benefit-item:nth-child(even) { border-right: none; }
  .awa-benefit-item:last-child,
  .awa-benefit-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}

@media (max-width: 360px) {
  .awa-benefit-item { flex: 0 0 100%; border-right: none; }
}
