/* §114c — PDP shell final-wins (carregado na PDP; evita truncamento do styles-l.less) */
html body#html-body.catalog-product-view:not(.cms-index-index):not(.cms-home):not(.cms-homepage_ayo_home5):not(.checkout-index-index):not(.onepagecheckout-index-index) .page-wrapper .main-detail > .row > .col-md-6:last-child .product-info-main,
html body#html-body.catalog-product-view:not(.cms-index-index):not(.cms-home):not(.cms-homepage_ayo_home5):not(.checkout-index-index):not(.onepagecheckout-index-index) .page-wrapper .product-info-main.detail-info {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
}

html body#html-body.catalog-product-view:not(.cms-index-index):not(.cms-home):not(.cms-homepage_ayo_home5):not(.checkout-index-index):not(.onepagecheckout-index-index) .page-wrapper .awa-pdp-related.awa-shelf--carousel .awa-carousel__viewport.awa-cq-card-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-block: 8px !important;
}

html body#html-body.catalog-product-view:not(.cms-index-index):not(.cms-home):not(.cms-homepage_ayo_home5):not(.checkout-index-index):not(.onepagecheckout-index-index) .page-wrapper .awa-pdp-related.awa-shelf--carousel .awa-carousel__track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: max-content !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

html body#html-body.catalog-product-view:not(.cms-index-index):not(.cms-home):not(.cms-homepage_ayo_home5):not(.checkout-index-index):not(.onepagecheckout-index-index) .page-wrapper .awa-pdp-related.awa-shelf--carousel .awa-carousel__track > :is(.awa-carousel__slide, li.item) {
    display: flex !important;
    flex: 0 0 clamp(160px, 22vw, 240px) !important;
    width: clamp(160px, 22vw, 240px) !important;
    max-width: 240px !important;
    min-width: 0 !important;
    list-style: none !important;
    scroll-snap-align: start;
}

/* §114e — Buy box: alinhar caixa QTD e botão "Adicionar ao Carrinho".
   Estrutura real: form(grid, align-items:end) > .attr-product(flex) > .info-qty(input)
                   form(grid) > .actions > button.tocart
   O grid já alinha os filhos pela base (end). O input ficava 21px acima porque
   .attr-product tem padding-bottom:10px + margin-bottom:10px ABAIXO do .info-qty,
   empurrando a base visível do input para cima. Zeramos esse espaço inferior para
   que a base do input coincida com a base do botão (mesma linha do grid). */
html body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form {
    align-items: end !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form > .attr-product {
    align-self: end !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form > .actions {
    align-self: end !important;
    margin-bottom: 0 !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form .info-qty input.qty,
html body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form .actions .action.tocart {
    height: 44px !important;
    box-sizing: border-box !important;
}

/* §114d — Backstop: nav/progress órfãos do wrapper externo .awa-pdp-related.
   O motor de carrossel inicializava o wrapper E o .rokan-mostviewed interno,
   duplicando a navegação. O JS já evita, mas garantimos via CSS o nav correto
   (interno, em .rokan-mostviewed) e ocultamos o duplicado do nível da section. */
html body#html-body.catalog-product-view .page-wrapper .awa-pdp-related > .awa-owl-nav,
html body#html-body.catalog-product-view .page-wrapper .awa-pdp-related > .awa-owl-progress,
html body#html-body.catalog-product-view .page-wrapper .awa-pdp-related > .awa-carousel-live {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PDP GRID SSOT LOCK — container 1280px, flex 54/46 desktop, coluna ≤991px
   Escala spacing corporativa 4–16px. Final-wins sobre align-grid / visual-bugfix.
   ═══════════════════════════════════════════════════════════════════════════ */
html body#html-body.catalog-product-view {
    --awa-pdp-gap-xs: 4px;
    --awa-pdp-gap-sm: 8px;
    --awa-pdp-gap-md: 12px;
    --awa-pdp-gap-lg: 16px;
    --awa-pdp-shell-max: min(100%, 1280px);
    --awa-pdp-container-pad: clamp(12px, 2.5vw, 16px);
    --awa-container-catalog: 1280px;
}

/* Container — eixo 1280px (vence legado 1440px em visual-bugfix/defer) */
html body#html-body.catalog-product-view .page-wrapper
:is(.nav-breadcrumbs, #maincontent.page-main.container, #maincontent#maincontent.page-main.container, .page-main.container) {
    box-sizing: border-box !important;
    margin-inline: auto !important;
    max-width: var(--awa-pdp-shell-max) !important;
    padding-inline: var(--awa-pdp-container-pad) !important;
    width: 100% !important;
}

/* page-layout-2columns-left sem sidebar — col-main ocupa 100% */
html body#html-body.catalog-product-view .page-wrapper .page-main > .columns.layout.layout-2-col > .col-main {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}

/* Ritmo vertical denso entre blocos da coluna principal */
html body#html-body.catalog-product-view .page-wrapper .col-main {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--awa-pdp-gap-lg) !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-view {
    margin-block-end: var(--awa-pdp-gap-xs) !important;
}

html body#html-body.catalog-product-view .page-wrapper .main-detail {
    padding-block-end: var(--awa-pdp-gap-xs) !important;
}

html body#html-body.catalog-product-view .page-wrapper
.column.main > :is(.product.info.detailed, .awa-pdp-related, .rx-pdp-crosssell) {
    margin-block-start: var(--awa-pdp-gap-lg) !important;
}

/* Grid galeria × info — mobile/tablet: coluna única */
@media (max-width: 991px) {
    html body#html-body.catalog-product-view .page-wrapper .main-detail > .row {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: var(--awa-pdp-gap-md) !important;
        grid-template-columns: none !important;
        margin-inline: 0 !important;
        padding-inline: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body#html-body.catalog-product-view .page-wrapper .main-detail > .row > :is(.col-md-6, .col-sm-6) {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-inline: 0 !important;
    }
}

/* Grid galeria × info — desktop: flex 54/46, gap 16px */
@media (min-width: 992px) {
    html body#html-body.catalog-product-view .page-wrapper .main-detail > .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: var(--awa-pdp-gap-lg) !important;
        grid-template-columns: none !important;
        margin-inline: 0 !important;
        padding-inline: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body#html-body.catalog-product-view .page-wrapper .main-detail > .row > .col-md-6.col-sm-6.col-xs-12:first-child {
        flex: 1 1 54% !important;
        max-width: 54% !important;
        width: auto !important;
        min-width: 0 !important;
        float: none !important;
        padding-inline: 0 !important;
    }

    html body#html-body.catalog-product-view .page-wrapper .main-detail > .row > .col-md-6.col-sm-6.col-xs-12:last-child {
        flex: 1 1 46% !important;
        max-width: 46% !important;
        width: auto !important;
        min-width: 0 !important;
        float: none !important;
        padding-inline: 0 !important;
        overflow: visible !important;
    }
}

/* Hierarquia corporativa flat — buy box denso */
html body#html-body.catalog-product-view .page-wrapper .product-info-main {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--awa-pdp-gap-lg) !important;
    min-width: 0 !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .page-title-wrapper .page-title {
    font-family: var(--awa-font-heading, "Rubik", system-ui, sans-serif) !important;
    font-size: clamp(1.25rem, 1rem + 0.8vw, 1.5rem) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    margin-block: 0 var(--awa-pdp-gap-sm) !important;
    letter-spacing: -0.01em !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .page-title-wrapper .page-title .base {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .product-info-price {
    margin: 0 !important;
    padding: 0 !important;
    gap: var(--awa-pdp-gap-xs) !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .product.attribute.overview {
    margin: 0 !important;
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
    color: var(--awa-text-secondary, #666) !important;
}

html body#html-body.catalog-product-view .page-wrapper .product-info-main .b2b-login-to-see-price.price-box {
    padding: var(--awa-pdp-gap-sm) var(--awa-pdp-gap-md) !important;
    margin-block: var(--awa-pdp-gap-xs) !important;
}

html body#html-body.catalog-product-view .page-wrapper .breadcrumbs {
    margin-block-end: var(--awa-pdp-gap-xs) !important;
    padding: var(--awa-pdp-gap-sm) var(--awa-pdp-gap-md) !important;
}

html body#html-body.catalog-product-view .page-wrapper .product.data.items {
    margin-block-start: var(--awa-pdp-gap-md) !important;
}

html body#html-body.catalog-product-view .page-wrapper .page-main {
    padding-block-start: var(--awa-pdp-gap-md) !important;
    padding-block-end: var(--awa-pdp-gap-lg) !important;
}

/* PDP corporate density pass — buy box, tabs, technical data and related shelves. */
html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main {
    gap: var(--awa-pdp-gap-md) !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: var(--awa-pdp-gap-md) !important;
    border: 1px solid var(--awa-border, color-mix(in srgb, CanvasText 12%, Canvas)) !important;
    border-radius: 8px !important;
    background: var(--awa-bg, Canvas) !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form {
    display: grid !important;
    grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr) !important;
    gap: var(--awa-pdp-gap-sm) var(--awa-pdp-gap-md) !important;
    align-items: end !important;
    margin: 0 !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form :is(.fieldset, .field, .attr-product, .actions) {
    margin: 0 !important;
    padding: 0 !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form .info-qty input.qty,
html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form .actions .action.tocart {
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
    line-height: 1.2 !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form .actions .action.tocart {
    width: 100% !important;
    max-width: none !important;
    padding-inline: var(--awa-pdp-gap-lg) !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper :is(.product.info.detailed, .product.data.items) {
    box-sizing: border-box !important;
    margin-block-start: var(--awa-pdp-gap-lg) !important;
    padding: var(--awa-pdp-gap-md) !important;
    border: 1px solid var(--awa-border, color-mix(in srgb, CanvasText 12%, Canvas)) !important;
    border-radius: 8px !important;
    background: var(--awa-bg, Canvas) !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product.data.items > .item.title {
    min-height: 40px !important;
    margin: 0 !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product.data.items > .item.title > .switch {
    min-height: 40px !important;
    padding: var(--awa-pdp-gap-sm) var(--awa-pdp-gap-md) !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product.data.items > .item.content {
    padding: var(--awa-pdp-gap-md) !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product.data.items :is(table, table.additional-attributes, .additional-attributes) {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: 13px !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .product.data.items :is(th, td) {
    padding: var(--awa-pdp-gap-sm) var(--awa-pdp-gap-md) !important;
    vertical-align: top !important;
    line-height: 1.45 !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper :is(.awa-pdp-related, .rx-pdp-crosssell) {
    margin-block-start: var(--awa-pdp-gap-lg) !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .awa-pdp-related :is(.awa-section-header, .awa-shelf__header) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: var(--awa-pdp-gap-sm) var(--awa-pdp-gap-md) !important;
    align-items: end !important;
    margin-block-end: var(--awa-pdp-gap-sm) !important;
    padding-block: var(--awa-pdp-gap-xs) var(--awa-pdp-gap-sm) !important;
}

html body#html-body#html-body.catalog-product-view .page-wrapper .awa-pdp-related.awa-shelf--carousel .awa-carousel__track {
    gap: var(--awa-pdp-gap-sm) !important;
}

@media (max-width: 767px) {
    html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form {
        padding: var(--awa-pdp-gap-sm) !important;
    }

    html body#html-body#html-body.catalog-product-view .page-wrapper .product-info-main .product-add-form form#product_addtocart_form {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: var(--awa-pdp-gap-sm) !important;
    }

    html body#html-body#html-body.catalog-product-view .page-wrapper :is(.product.info.detailed, .product.data.items) {
        padding: var(--awa-pdp-gap-sm) !important;
    }

    html body#html-body#html-body.catalog-product-view .page-wrapper .product.data.items > .item.content {
        padding: var(--awa-pdp-gap-sm) !important;
    }
}
