/* ARMANIPLAST-PASS-037 */

/* REQ-037-001 — mega columns pack to content; nested items must not stretch */
@media (min-width: 990px) {
    header.header .nav-item.has-dropdown:hover > #nav-products-submenu,
    header.header .nav-item.has-dropdown.show > #nav-products-submenu {
        opacity: 1 !important;
        visibility: visible !important;
    }
    header.header .nav-item.has-dropdown > #nav-products-submenu {
        align-items: flex-start !important;
        align-content: flex-start !important;
        height: auto !important;
    }
    header.header #nav-products-submenu li,
    header.header #nav-products-submenu ul,
    header.header #nav-products-submenu .dropdown-item,
    header.header #nav-products-submenu .ap-nav-col-stack,
    header.header #nav-products-submenu .ap-nav-stack-group {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        align-self: flex-start !important;
        justify-content: flex-start !important;
    }
    header.header #nav-products-submenu .dropdown-item {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    header.header #nav-products-submenu .dropdown-menu {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-content: flex-start !important;
        align-items: stretch !important;
        row-gap: 0 !important;
        gap: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        position: static !important;
        float: none !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        inset: auto !important;
        left: auto !important;
        top: auto !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    header.header #nav-products-submenu a {
        padding: 0.2rem 0.7rem !important;
        line-height: 1.35 !important;
        min-height: 0 !important;
        height: auto !important;
    }
    header.header #nav-products-submenu > .dropdown-item > a,
    header.header #nav-products-submenu > .dropdown-item > .dropdown-item-text,
    header.header #nav-products-submenu > .ap-nav-col-stack > .ap-nav-stack-group > a {
        padding: 0.38rem 0.75rem 0.12rem !important;
        font-weight: 700;
    }
}

/* REQ-037-002 — CTA: lead line heavier than secondary, do not grow the bar */
main.main .call-us {
    padding-top: 1.15rem !important;
    padding-bottom: 1.15rem !important;
}
main.main .call-us h4.f-2,
main.main .call-us h4 {
    font-weight: 800 !important;
    font-size: clamp(1.28rem, 1.55vw, 1.72rem) !important;
    line-height: 1.45;
    margin: 0 0 0.2rem;
    max-width: min(58rem, 96%);
}
main.main .call-us p {
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 0.15rem;
    opacity: 0.92;
}
main.main .call-us .d-flex.gap-2 {
    margin-top: 0.15rem;
}
main.main .call-us .theme-btn {
    margin-top: 0.45rem !important;
}
@media (min-width: 1200px) {
    main.main .call-us h4.f-2,
    main.main .call-us h4 {
        white-space: nowrap !important;
        max-width: none !important;
        font-size: 1.55rem !important;
    }
}
@media (max-width: 767.98px) {
    main.main .call-us h4 {
        white-space: normal;
        font-size: 1.2rem;
    }
}

/* REQ-037-003 — date stays in-flow with the nav (hero is absolute). Equalize home vs inner. */
@media (min-width: 992px) {
    header.header,
    header.header.inner {
        padding-top: 0.45rem !important;
    }
    header.header > .nav-container.top,
    header.header.inner > .nav-container.top {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        margin: 0 0 0.15rem !important;
        padding-top: 0.15rem !important;
        padding-bottom: 0.1rem !important;
        z-index: 3;
    }
    header.header > nav.nav,
    header.header.inner > nav.nav {
        position: relative !important;
        margin-top: 0 !important;
    }
}

/* REQ-037-005 — equal card tracks; images fill the card well */
.product-content .products-list .item {
    min-width: 0;
    box-sizing: border-box;
}
.product-content .products-list .item .product-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.product-content .product-background-box,
.product-content .product-background-box img {
    width: 100%;
    max-width: 100%;
}

/* REQ-037-006 — related / promo slider equal height regardless of photo */
.product-slider.owl-carousel .owl-stage {
    display: flex;
    align-items: stretch;
}
.product-slider.owl-carousel .owl-item {
    display: flex;
    height: auto;
    float: none;
}
.product-slider.owl-carousel .owl-item .item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
.product-slider .product-box {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}
.product-slider .product-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    height: 180px;
    background: #f7f7f7;
    border-radius: 10px;
    overflow: hidden;
}
.product-slider .product-img img,
.product-slider .product-card-photo {
    width: 100%;
    height: 180px;
    object-fit: contain;
    object-position: center;
}
.product-slider .product-details {
    flex: 1 1 auto;
}
.product-slider .addCart,
.product-slider .ap-card-footer {
    margin-top: auto;
}

/* REQ-037-007 — hide pay-note only on empty mini-cart */
.armani-mini-cart.is-empty .ap-mini-pay-note,
.armani-mini-cart:has(.ap-mini-empty) .ap-mini-pay-note {
    display: none !important;
}

/* REQ-037-008 — mobile listing uses the useful viewport; float button is overlay, not inset */
@media (max-width: 600px) {
    section.products > .px-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .product-content .products-list {
        margin-top: 0.5rem;
        width: 100%;
    }
    .product-content .products-list .item {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.55rem 0 !important;
    }
}

/* REQ-037-009 — filter drawer eases like the main nav; clicks off while closed */
@media (max-width: 991.98px) {
    body.ap-filter-layer-on > .ap-filter-backdrop.is-on {
        opacity: 1;
        transition: opacity 0.28s ease;
    }
    body.ap-filter-layer-on > .ap-filter-backdrop:not(.is-on) {
        opacity: 0;
        pointer-events: none !important;
    }
    body.ap-filter-layer-on > .product-aside#apFilterDrawer {
        transform: translateX(110%) !important;
        transition: transform 0.28s ease;
        pointer-events: none !important;
    }
    html[dir="rtl"] body.ap-filter-layer-on > .product-aside#apFilterDrawer,
    body.ap-filter-layer-on > .product-aside#apFilterDrawer {
        transform: translateX(110%) !important;
    }
    body.ap-filter-layer-on > .product-aside#apFilterDrawer.is-open {
        transform: translateX(0) !important;
        pointer-events: auto !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.ap-filter-layer-on > .product-aside#apFilterDrawer,
    body.ap-filter-layer-on > .ap-filter-backdrop.is-on {
        transition: none !important;
    }
}

/* Search history confirm (REQ-037-004) */
.ap-ui-confirm[hidden] { display: none !important; }
.ap-ui-confirm {
    position: fixed;
    inset: 0;
    z-index: 6400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.ap-ui-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.ap-ui-confirm__dialog {
    position: relative;
    z-index: 1;
    width: min(22rem, 100%);
    background: #fff;
    color: #181818;
    border-radius: 10px;
    padding: 1.1rem 1.15rem 1rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}
.ap-ui-confirm__title { margin: 0 0 0.85rem; font-size: 1rem; line-height: 1.7; }
.ap-ui-confirm__actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.ap-ui-confirm__actions button { min-height: 44px; min-width: 5.5rem; }
