/* ============================================================
   AWA COMPREHENSIVE LAYOUT FIX — 4 Phases
   Resolves ALL visual layout issues identified in live audit.
   Loaded LAST in cascade (after all other CSS files).
   ============================================================ */

/* ═══════════════════════════════════════════════════════════════
   PHASE 1 — CRITICAL: Layout-Breaking Issues
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   1.1 TRUST BADGE SVGs GIANT — CMS block renders raw img/svg
       without constraints. Force max dimensions.
   ────────────────────────────────────────────────────────────── */

.trust-badges-homepage img,
.trust-badges-homepage svg,
.awa-trust-badges-wrap img,
.awa-trust-badges-wrap svg,
.trust-badge-item img,
.trust-badge-item svg,
.section .security-seals img,
.section .security-seals svg {
    max-width: 64px !important;
    max-height: 64px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
}

/* Constrain image containers too */
.trust-badges-homepage .trust-badge-item,
.awa-trust-badges-wrap .trust-badge-item {
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
    max-height: 160px !important;
    overflow: hidden !important;
    padding: 16px !important;
}

.trust-badges-homepage .trust-badges-grid,
.awa-trust-badges-wrap .trust-badges-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    padding: 16px !important;
}

/* If badges inside the section path */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .awa-trust-badges-wrap img,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .awa-trust-badges-wrap svg,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .top-home-content--trust-close img:not(.product-image-photo),
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .top-home-content--trust-close svg:not(.awa-footer-sprite) {
    max-width: 64px !important;
    max-height: 64px !important;
    width: auto !important;
    height: auto !important;
}

/* Security seals section on homepage */
.section .security-seals {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
}

.section .security-seals > * {
    max-width: 200px !important;
}

/* ──────────────────────────────────────────────────────────────
   1.2 PRODUCT GRID CARD OVERSIZED — 6th card in OWL carousel
       expanding to full width when OWL hasn't initialized.
       Force consistent card sizing before & after OWL init.
   ────────────────────────────────────────────────────────────── */

/* Pre-OWL: all items in product carousels get equal sizing */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .wrapper.grid .product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .wrapper.grid .product-grid > li.item-product {
    margin-bottom: 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* Product items inside OWL */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .owl-carousel .owl-item .item-product {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 0 !important;
}

/* Product image containers — prevent blow-up */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .item-product .product-image-photo {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* product-item-info card sizing */
body .page-wrapper .products-grid .product-item,
body .page-wrapper .wrapper.grid .item-product {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* ──────────────────────────────────────────────────────────────
   1.3 HERO BANNER COLLAPSED — Ensure the banner slider is
       visible and has minimum height while loading.
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--above-fold .banner-slider2 {
    min-height: clamp(200px, 30vw, 460px) !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
    border-radius: 16px !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--above-fold .banner-slider2 .wrapper_slider {
    min-height: inherit !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--above-fold .banner-slider2 img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover !important;
}

/* ──────────────────────────────────────────────────────────────
   1.4 BLOG THUMBNAILS BROKEN — When images fail to load,
       alt text wraps awkwardly. Provide placeholder styling +
       constrain the image area.
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-thumb img,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-image img,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .rokanthemes-recent img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    background: #f1f5f9 !important;
    min-height: 60px;
    object-fit: cover;
}

/* Blog list layout — force horizontal card layout */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .rokanthemes-recent .post-item,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .block-content .post-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #edf1f5;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .rokanthemes-recent .post-item:last-child,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .block-content .post-item:last-child {
    border-bottom: none;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-thumb,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-image {
    flex: 0 0 100px !important;
    max-width: 100px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f1f5f9;
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 2 — HIGH: Spacing & Structure
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   2.1 EXCESSIVE WHITESPACE between sections (~400px dead space)
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-wrapper > .top-home-content,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-wrapper > .awa-home-section,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-wrapper > section {
    margin-top: clamp(16px, 2vw, 28px) !important;
    margin-bottom: 0 !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-wrapper > :first-child {
    margin-top: 0 !important;
}

/* CMS block containers that add extra margins */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .column.main > .section,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .column.main > .top-home-content {
    margin-top: clamp(16px, 2vw, 28px) !important;
    margin-bottom: 0 !important;
}

/* Empty CMS blocks or hidden sections taking vertical space */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content:empty,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .awa-home-section:empty {
    display: none !important;
}

/* Constrain inner container padding */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content > .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ──────────────────────────────────────────────────────────────
   2.2 "CATEGORIAS POPULARES" — Sparse layout, only 2 products
       Force full-width grid layout.
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .wrapper.grid {
    width: 100% !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .wrapper.grid .product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
}

/* Category list inside popular-categories section */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .rokan-cate {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .rokan-cate li a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: #1f2937 !important;
    font-weight: 500 !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .rokan-cate li a:hover {
    border-color: rgb(183 51 55 / 30%) !important;
    background: rgb(183 51 55 / 4%) !important;
    color: #b73337 !important;
}

/* ──────────────────────────────────────────────────────────────
   2.3 REDUNDANT LABELS — "LANÇAMENTOS Novidades" + "New Products"
       Hide the CMS block default title when we have a custom header.
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--launches .ayo-home5-launches > .rokan-product-heading,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--launches .ayo-home5-launches > .block-title,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--launches .ayo-home5-launches > h2:not(:first-child),
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--launches .ayo-home5-launches > h3 {
    display: none !important;
}

/* Same for bestsellers — hide CMS-generated "Produto" subtitle */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--bestsellers .block-title strong,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--bestsellers > .container > .rokan-product-heading .sup-title:empty {
    display: none !important;
}

/* Hide the generic "Recent" / "New Products" blocks that duplicate */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .block-title {
    display: none !important;
}

/* ──────────────────────────────────────────────────────────────
   2.4 "ESTILO MOTO" — Category links without grid, just text.
       Apply tag-style layout.
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .container > ul,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .container > .rokan-cate,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .container > div > ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .container > ul li a,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .container > div > ul li a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    box-shadow: 0 2px 6px rgb(0 0 0 / 4%) !important;
    transition: all 0.2s ease !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .container > ul li a:hover,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--popular-categories .container > div > ul li a:hover {
    border-color: rgb(183 51 55 / 30%) !important;
    background: rgb(183 51 55 / 5%) !important;
    color: #b73337 !important;
    box-shadow: 0 4px 12px rgb(183 51 55 / 10%) !important;
    transform: translateY(-1px);
}


/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — MEDIUM: Visual Polish
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   3.1 CARDS — Consistent shadow, border-radius, transitions
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .item-product > .content-item-product,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .product-item-info {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgb(15 23 42 / 4%) !important;
    overflow: hidden !important;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .item-product:hover > .content-item-product,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .product-item-info:hover {
    border-color: rgb(183 51 55 / 18%) !important;
    box-shadow: 0 8px 24px rgb(15 23 42 / 8%) !important;
    transform: translateY(-2px) !important;
}

/* Product thumb area */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .item-product .product-thumb {
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden !important;
    background: #f8fafc !important;
}

/* Product info area */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .item-product .product-info {
    padding: 12px !important;
}

/* ──────────────────────────────────────────────────────────────
   3.2 NAV BAR — Harmonize "DEPARTAMENTOS" vs "INÍCIO"/"OFERTAS"
   ────────────────────────────────────────────────────────────── */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-control .header-nav {
    background: #b73337 !important;
    min-height: 48px !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-nav .navigation.custommenu .main-nav-list > li > a {
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-nav .navigation.custommenu .main-nav-list > li > a:hover,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-nav .navigation.custommenu .main-nav-list > li > a:focus-visible {
    background: rgb(255 255 255 / 15%) !important;
}

/* Override the pill-style badges on OFERTAS/B2B */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-nav .main-nav-list > li.ofertas-link > a,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-nav .main-nav-list > li.b2b-link > a {
    background: rgb(255 255 255 / 18%) !important;
    border: 1px solid rgb(255 255 255 / 25%) !important;
    color: #fff !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-nav .main-nav-list > li.ofertas-link > a:hover,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .header-nav .main-nav-list > li.b2b-link > a:hover {
    background: rgb(255 255 255 / 28%) !important;
}

/* ──────────────────────────────────────────────────────────────
   3.3 FLOATING BUTTONS — Space apart WhatsApp + Cotação
   ────────────────────────────────────────────────────────────── */

.awa-whatsapp-fab {
    bottom: 24px !important;
    right: 24px !important;
    z-index: 9999 !important;
}

.awa-quote-trigger,
.awa-quote-fab,
a[href*="cotacao"],
.fixed-right .cotacao-link {
    bottom: 90px !important;
    right: 24px !important;
    z-index: 9998 !important;
}

/* ──────────────────────────────────────────────────────────────
   3.4 FOOTER — Ensure visible when trust badges are fixed
   ────────────────────────────────────────────────────────────── */

.page_footer {
    overflow: hidden !important;
}

.page_footer .footer-container,
.page_footer .footer-bottom {
    position: relative !important;
    z-index: 1 !important;
}

/* Footer trust bar with SVG icons — constrain */
.awa-footer-trust-bar {
    overflow: hidden !important;
}

.awa-footer-trust-bar .awa-footer-trust-icon svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
}

/* Footer payment/security section */
.awa-footer-payments-security svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
}

.awa-security-badge__icon svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
}


/* ═══════════════════════════════════════════════════════════════
   PHASE 4 — LOW: Final Refinement
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   4.1 FOOTER TEXT CONTRAST — Improve readability
   ────────────────────────────────────────────────────────────── */

.page_footer,
.footer-container,
.footer-bottom {
    color: #d1d5db !important;
}

.page_footer a,
.footer-container a,
.footer-bottom a {
    color: #e5e7eb !important;
}

.page_footer a:hover,
.footer-container a:hover,
.footer-bottom a:hover {
    color: #fff !important;
}

.footer-bottom .copyright {
    color: #9ca3af !important;
}

/* ──────────────────────────────────────────────────────────────
   4.2 PAYMENT ICONS — Monochromatic, muted colors
   ────────────────────────────────────────────────────────────── */

.awa-payment-chip svg,
.awa-payment-chip img {
    opacity: 0.7 !important;
    filter: grayscale(40%) !important;
}

.awa-payment-chip:hover svg,
.awa-payment-chip:hover img {
    opacity: 1 !important;
    filter: none !important;
}

/* ──────────────────────────────────────────────────────────────
   4.3 SECTION SPACING — Headings & labels polish
   ────────────────────────────────────────────────────────────── */

/* Standard section headings */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-heading {
    margin-bottom: 16px !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-label {
    display: inline-block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: #b73337 !important;
    margin-bottom: 4px !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-heading h2 {
    font-size: clamp(20px, 2.5vw, 28px) !important;
    font-weight: 800 !important;
    color: #1f2937 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .ayo-home5-divider {
    display: block !important;
    width: 48px !important;
    height: 3px !important;
    background: #b73337 !important;
    border-radius: 2px !important;
    margin-top: 10px !important;
}

/* Notification bar — reduce excessive padding */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .block_notification {
    padding: 10px 0 !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .block_notification .awa-ticker-wrap {
    padding: 12px 16px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
}


/* ═══════════════════════════════════════════════════════════════
   PLP — Product Grid Container (Category + Search Pages)
   ═══════════════════════════════════════════════════════════════ */

:is(body.catalog-category-view, body.catalogsearch-result-index)
    .wrapper.grid.products-grid .product-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0;
    margin: 0;
    list-style: none;
}

:is(body.catalog-category-view, body.catalogsearch-result-index)
    .wrapper.grid.products-grid .product-grid > li.item-product {
    margin-bottom: 0 !important;
}

:is(body.catalog-category-view, body.catalogsearch-result-index)
    .wrapper.list.products-list .product-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 0;
    margin: 0;
    list-style: none;
}

:is(body.catalog-category-view, body.catalogsearch-result-index)
    .wrapper.list.products-list .product-list > li.item-product {
    margin-bottom: 0 !important;
}


/* ═══════════════════════════════════════════════════════════════
   OWL CAROUSEL — Proper padding & overflow
   ═══════════════════════════════════════════════════════════════ */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .owl-carousel .owl-stage {
    display: flex !important;
    align-items: stretch;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .owl-carousel .owl-item {
    padding: 6px 8px !important;
    box-sizing: border-box !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper .owl-carousel .owl-stage-outer {
    overflow: visible !important;
    padding-block: 4px;
}

/* Clip at section level */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .page-wrapper :is(.hot-deal, .list-tab-product, .tab_product,
    .featured-products, .bestseller-products, .top-home-content--bestsellers,
    .top-home-content--launches, .top-home-content--popular-categories) {
    overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
    :is(body.catalog-category-view, body.catalogsearch-result-index)
        .wrapper.grid.products-grid .product-grid {
        gap: 14px !important;
    }

    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .page-wrapper .owl-carousel .owl-item {
        padding: 4px 6px !important;
    }

    .trust-badges-homepage .trust-badges-grid,
    .awa-trust-badges-wrap .trust-badges-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

@media (max-width: 767px) {
    :is(body.catalog-category-view, body.catalogsearch-result-index)
        .wrapper.grid.products-grid .product-grid {
        gap: 12px !important;
    }

    :is(body.catalog-category-view, body.catalogsearch-result-index)
        .wrapper.list.products-list .product-list {
        gap: 10px !important;
    }

    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .page-wrapper .owl-carousel .owl-item {
        padding: 3px 4px !important;
    }

    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .ayo-home5-wrapper > .top-home-content,
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .ayo-home5-wrapper > section {
        margin-top: 12px !important;
    }

    .trust-badges-homepage .trust-badges-grid,
    .awa-trust-badges-wrap .trust-badges-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .trust-badges-homepage img,
    .trust-badges-homepage svg,
    .awa-trust-badges-wrap img,
    .awa-trust-badges-wrap svg,
    .trust-badge-item img,
    .trust-badge-item svg {
        max-width: 48px !important;
        max-height: 48px !important;
    }

    .awa-whatsapp-fab {
        bottom: 80px !important;
        right: 16px !important;
    }

    .awa-quote-trigger,
    .awa-quote-fab,
    a[href*="cotacao"],
    .fixed-right .cotacao-link {
        bottom: 140px !important;
        right: 16px !important;
    }

    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .page-wrapper .wrapper.grid .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    /* Blog posts stack vertically on mobile */
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .top-home-content--blog .post-item .post-thumb,
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .top-home-content--blog .post-item .post-image {
        flex: 0 0 80px !important;
        max-width: 80px !important;
    }
}

@media (max-width: 479px) {
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .page-wrapper .wrapper.grid .product-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .trust-badges-homepage .trust-badges-grid,
    .awa-trust-badges-wrap .trust-badges-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   PHASE 4.4 — CATEGORYTAB GRID FIX (6th Card Issue)
   ═══════════════════════════════════════════════════════════════ */

/* The CMS bestsellers block uses UL.tabs-categorytab > DIV.product_row.
   If a row has fewer items (e.g. 1 instead of 5), flex-grow or auto-width
   will cause it to expand massively. We force a max-width and equal flex flow. */

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .tab_content .product_row,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .categorytab-container .product_row,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    ul.tabs-categorytab .product_row {
    display: flex !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    clear: both !important;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .tab_content .product_row > *,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .categorytab-container .product_row > *,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    ul.tabs-categorytab .product_row > *,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .categorytab-container .product_row > .item-product {
    max-width: 280px !important; /* Cap width to prevent the 6th card blowing up */
    width: 100%; /* Fill parent when inside carousel */
    padding: 0 8px;
    box-sizing: border-box;
    flex: 1 1 auto; /* Allow flexible growing up to max-width */
}

/* Responsive categorytab columns */
@media (max-width: 1199px) {
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .tab_content .product_row > *,
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .categorytab-container .product_row > * {
        max-width: 260px !important;
    }
}

@media (max-width: 991px) {
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .tab_content .product_row > *,
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .categorytab-container .product_row > * {
        max-width: 320px !important;
    }
}

@media (max-width: 767px) {
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .tab_content .product_row > *,
    :is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
        .categorytab-container .product_row > * {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        min-width: 50% !important;
    }
}

/* ──────────────────────────────────────────────────────────────
   4.5 GENERIC LABELS FIX (Blog 'Recent' & Subtitles)
   ────────────────────────────────────────────────────────────── */

/* Hide weird unstyled 'Recent' link in blog sidebar widget.
   NOTE: using specific classes instead of :contains which is not valid CSS */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .widget.widget-post-tab .title-post-tab,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog ul.tabs-categorytab.blog-tabs .tab-item {
    display: none !important;
}

/* Hide the Recent word that's floating */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .tabs {
    display: none !important;
}

/* Force override of default Rokanthemes widget titles for products */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .rokan-product-heading .sup-title {
    display: none !important;
}

/* Ensure blog images always fill their container */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-thumb a,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 80px !important;
    background: #f1f5f9;
    position: relative;
}

:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-thumb img,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Hide alt text overflow on broken blog images */
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-thumb img::after,
:is(body.cms-index-index, body.cms-home, body.cms-homepage_ayo_home5)
    .top-home-content--blog .post-item .post-image img::after {
    content: "Artigo AWA";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
