/* ==========================================================
   PRODUCTS PAGE MOBILE V5
   Guaranteed app-style drawer and compact catalogue.
========================================================== */

/* Hero removed from HTML on every device. */
.products-page-main > .section:first-child,
main > .section:first-child {
    padding-top: 34px;
}

@media screen and (max-width: 600px) {
    main > .section:first-child {
        padding: 14px 0 24px !important;
    }

    /* Never show the old inline filters on mobile. */
    main .catalogue-filters-desktop,
    main > .section .catalogue-filters-mobile {
        display: none !important;
    }

    /* Bottom app controls must always be visible. */
    .mobile-shop-bar {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-shop-drawer {
        display: flex !important;
    }

    .mobile-shop-drawer-content .catalogue-filters-mobile {
        display: block !important;
    }

    .mobile-shop-drawer-content .mobile-filter-root {
        display: block !important;
        margin: 0 !important;
    }

    .mobile-shop-drawer-content .mobile-filter-root > summary {
        display: none !important;
    }

    .mobile-shop-drawer-content .mobile-filter-panel {
        position: static !important;
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .mobile-shop-drawer-content .mobile-filter-panel > button,
    .mobile-shop-drawer-content .mobile-filter-group > summary {
        display: flex !important;
        width: 100% !important;
        min-height: 48px !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 5px !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(17,17,17,.1) !important;
        border-radius: 0 !important;
        background: #fff !important;
        color: #111 !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        text-align: left !important;
        box-shadow: none !important;
    }

    .mobile-shop-drawer-content .mobile-filter-panel > button.active {
        color: #b78416 !important;
    }

    .mobile-shop-drawer-content .mobile-filter-group > summary {
        list-style: none !important;
    }

    .mobile-shop-drawer-content .mobile-filter-group > summary::-webkit-details-marker {
        display: none !important;
    }

    .mobile-shop-drawer-content .mobile-filter-group > summary::after {
        content: "›" !important;
        font-size: 19px !important;
        font-weight: 400 !important;
        transform: rotate(0deg);
        transition: transform .18s ease;
    }

    .mobile-shop-drawer-content .mobile-filter-group[open] > summary::after {
        transform: rotate(90deg);
    }

    .mobile-shop-drawer-content .mobile-filter-options {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        gap: 1px !important;
        padding: 7px !important;
        background: #f7f7f5 !important;
    }

    .mobile-shop-drawer-content .mobile-filter-options button {
        min-height: 39px !important;
        padding: 7px 9px !important;
        border: 0 !important;
        border-radius: 7px !important;
        background: #fff !important;
        color: #303030 !important;
        font-size: 10px !important;
        font-weight: 650 !important;
        text-align: left !important;
    }

    .mobile-shop-drawer-content .mobile-filter-options button.active {
        background: #111 !important;
        color: #fff !important;
    }

    .catalogue-filter-status {
        margin-top: 0 !important;
    }

    #productSearch {
        margin-bottom: 12px !important;
    }
}


/* Selected mobile category path: Men > Fleece Jackets */
@media screen and (max-width: 600px) {
    .mobile-filter-current {
        margin: 0 0 4px;
        padding: 10px 7px 8px;
        border-bottom: 1px solid rgba(17,17,17,.10);
        color: #b78416;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .02em;
    }
}


/* ==========================================================
   MOBILE PRODUCT CARDS — CLEAN BRANDED FOOTER
   Product codes remain admin-only and are never displayed.
========================================================== */
@media (max-width: 600px) {
    .product-card-code,
    [data-product-card] .product-card-code {
        display: none !important;
    }

    [data-product-card] .card-body {
        padding: 10px 5px 13px !important;
    }

    [data-product-card] .card-body h3 {
        min-height: 38px;
        margin: 0 0 8px !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        font-weight: 700 !important;
        color: #111 !important;
    }

    [data-product-card] .card-body > p {
        display: none !important;
    }

    [data-product-card] .meta {
        margin-top: 0 !important;
    }

    [data-product-card] .meta span {
        display: inline-flex !important;
        align-items: center !important;
        min-height: 30px !important;
        padding: 0 12px !important;
        border: 1px solid rgba(17, 17, 17, .12) !important;
        border-radius: 999px !important;
        background: #fff !important;
        color: #111 !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        letter-spacing: .01em !important;
    }
}


/* Tablet uses mobile drawer */
@media screen and (min-width:601px) and (max-width:1024px){
main .catalogue-filters-desktop{display:none!important;}
.mobile-shop-bar{display:grid!important;visibility:visible!important;opacity:1!important;position:fixed;left:0;right:0;bottom:0;z-index:1000}
.mobile-shop-drawer{display:flex!important;}
.mobile-shop-drawer-content .catalogue-filters-mobile,
.mobile-shop-drawer-content .mobile-filter-root{display:block!important;}
}

/* ==========================================================
   TABLET PRODUCT GRID — THREE CARDS PER ROW
   Tablet only: 601px–1024px.
   Mobile remains two cards; desktop remains unchanged.
========================================================== */
@media screen and (min-width: 601px) and (max-width: 1024px) {
    #managedProductsGrid,
    #dynamicProducts {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 14px !important;
        align-items: start !important;
    }

    #managedProductsGrid > *,
    #dynamicProducts > * {
        min-width: 0 !important;
    }

    #managedProductsGrid [data-product-card] .card-body,
    #dynamicProducts [data-product-card] .card-body {
        padding: 12px 10px 14px !important;
    }

    #managedProductsGrid [data-product-card] .card-body h3,
    #dynamicProducts [data-product-card] .card-body h3 {
        font-size: 14px !important;
        line-height: 1.35 !important;
    }
}
