/* =========================================================
   SHOPSTYLE MOBILE V3
   Global mobile header + drawer + homepage responsive UX
   ========================================================= */


/* ---------- GLOBAL MOBILE MENU ---------- */

.ss-mobile-menu-toggle,
.ss-mobile-menu-overlay,
.ss-mobile-menu-drawer {
    display: none;
}


@media (max-width: 991px) {

    body.ss-mobile-menu-open {
        overflow: hidden !important;
        touch-action: none;
    }


    /* Header: logo must sit high and clear */
    .ssv3-page .utility {
        display: none !important;
    }

    .ssv3-page .header {
        position: sticky !important;
        top: 0 !important;
        z-index: 9000 !important;

        background: rgba(255,255,255,.98) !important;
        backdrop-filter: blur(16px);
    }

    .ssv3-page .header .wrap {
        width: calc(100% - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .ssv3-page .head-main {
        width: 100% !important;

        min-height: 0 !important;
        height: auto !important;

        padding: 7px 0 9px !important;

        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr)
            auto !important;

        grid-template-areas:
            "logo actions"
            "search search" !important;

        column-gap: 8px !important;
        row-gap: 7px !important;

        align-items: center !important;
    }


    .ssv3-page .logo {
        grid-area: logo;

        align-self: center !important;

        margin: 0 !important;
        padding: 0 !important;

        font-size: 25px !important;
        line-height: .95 !important;

        min-height: 42px;

        display: inline-flex !important;
        align-items: center !important;

        width: max-content !important;
        max-width: 100% !important;
    }

    .ssv3-page .logo small {
        display: none !important;
    }


    .ssv3-page .actions {
        grid-area: actions;

        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;

        gap: 5px !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    .ssv3-page .actions .hide-mobile {
        display: none !important;
    }


    .ssv3-page .icon-btn {
        width: 42px !important;
        height: 42px !important;

        min-width: 42px !important;
        min-height: 42px !important;
    }


    .ss-mobile-menu-toggle {
        width: 44px;
        height: 44px;

        flex: 0 0 44px;

        padding: 0;

        display: grid;

        place-content: center;

        gap: 4px;

        border: 1px solid #dadde0;
        border-radius: 50%;

        background: #111318;

        cursor: pointer;
    }

    .ss-mobile-menu-toggle span {
        display: block;

        width: 18px;
        height: 2px;

        border-radius: 999px;

        background: #fff;
    }


    .ssv3-page .search {
        grid-area: search !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        position: relative !important;
    }


    .ssv3-page .search-box {
        width: 100% !important;
        height: 44px !important;

        padding:
            0
            5px
            0
            14px !important;

        border-width: 1px !important;
    }


    .ssv3-page .search-box input {
        min-width: 0 !important;

        padding:
            0
            9px !important;

        font-size: 14px !important;
    }


    .ssv3-page .search-box button {
        height: 34px !important;

        padding:
            0
            13px !important;

        font-size: 11px !important;
    }


    /* Old horizontal navigation is replaced by drawer */
    .ssv3-page .nav {
        display: none !important;
    }

    .ssv4-legacy-mobile {
        display: none !important;
    }


    /* Search dropdown follows the real mobile header height */
    .ssv3-page .ss-search-dropdown {
        position: fixed !important;

        top: 101px !important;
        left: 12px !important;
        right: 12px !important;

        width: auto !important;

        max-height:
            calc(100dvh - 116px) !important;

        z-index: 100500 !important;
    }


    /* Overlay */
    .ss-mobile-menu-overlay {
        display: block;

        position: fixed;
        inset: 0;

        z-index: 100600;

        background:
            rgba(9, 11, 14, .54);

        opacity: 0;
        visibility: hidden;

        pointer-events: none;

        transition:
            opacity .22s ease,
            visibility .22s ease;
    }

    .ss-mobile-menu-overlay.is-open {
        opacity: 1;
        visibility: visible;

        pointer-events: auto;
    }


    /* Drawer */
    .ss-mobile-menu-drawer {
        display: flex;

        position: fixed;

        top: 0;
        right: 0;
        bottom: 0;

        z-index: 100601;

        width: min(92vw, 410px);

        flex-direction: column;

        background: #fff;

        box-shadow:
            -20px 0 60px
            rgba(0,0,0,.18);

        transform:
            translateX(104%);

        visibility: hidden;

        transition:
            transform .26s cubic-bezier(.2,.8,.2,1),
            visibility .26s ease;

        overflow: hidden;
    }


    .ss-mobile-menu-drawer.is-open {
        transform: translateX(0);

        visibility: visible;
    }


    .ss-mobile-menu-head {
        min-height: 64px;

        flex: 0 0 auto;

        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 14px;

        padding:
            env(safe-area-inset-top)
            16px
            0;

        border-bottom:
            1px solid #eceef0;
    }


    .ss-mobile-menu-logo {
        padding: 18px 0 16px;

        font-size: 28px;
        line-height: 1;

        font-weight: 950;

        letter-spacing: -.055em;

        text-decoration: none !important;
    }


    .ss-mobile-menu-logo .ss-logo-shop {
        color: #111318;
    }

    .ss-mobile-menu-logo .ss-logo-style {
        color: #f47a20;
    }


    .ss-mobile-menu-close {
        width: 42px;
        height: 42px;

        flex: 0 0 42px;

        display: grid;
        place-items: center;

        margin-right: 0;

        border: 0;
        border-radius: 50%;

        background: #f2f3f4;
        color: #111318;

        font-size: 28px;
        font-weight: 400;
        line-height: 1;

        cursor: pointer;
    }


    .ss-mobile-menu-quick {
        flex: 0 0 auto;

        display: flex;

        gap: 7px;

        padding: 13px 14px;

        overflow-x: auto;

        scrollbar-width: none;

        border-bottom:
            1px solid #eceef0;
    }

    .ss-mobile-menu-quick::-webkit-scrollbar {
        display: none;
    }

    .ss-mobile-menu-quick a {
        flex: 0 0 auto;

        padding: 9px 12px;

        border-radius: 999px;

        background: #f3f4f5;

        color: #353a40;

        font-size: 11px;
        font-weight: 800;

        text-decoration: none !important;
    }

    .ss-mobile-menu-quick a:nth-child(2) {
        background: #fff0f3;
        color: #c82853;
    }


    .ss-mobile-menu-title {
        flex: 0 0 auto;

        padding:
            15px
            16px
            8px;

        color: #8a8f95;

        font-size: 10px;
        font-weight: 850;

        letter-spacing: .14em;

        text-transform: uppercase;
    }


    .ss-mobile-menu-categories {
        flex: 1 1 auto;

        overflow-y: auto;
        overscroll-behavior: contain;

        padding:
            0
            12px
            18px;

        -webkit-overflow-scrolling:
            touch;
    }


    .ss-mobile-menu-root {
        border-bottom:
            1px solid #eceef0;
    }


    .ss-mobile-menu-root > summary,
    .ss-mobile-menu-branch > summary {
        list-style: none;

        cursor: pointer;

        user-select: none;

        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 12px;
    }

    .ss-mobile-menu-root > summary::-webkit-details-marker,
    .ss-mobile-menu-branch > summary::-webkit-details-marker {
        display: none;
    }


    .ss-mobile-menu-root > summary {
        min-height: 54px;

        padding: 0 5px;

        color: #181b20;

        font-size: 16px;
        font-weight: 850;
    }


    .ss-mobile-menu-plus {
        width: 30px;
        height: 30px;

        flex: 0 0 30px;

        display: grid;
        place-items: center;

        border-radius: 50%;

        background: #f3f4f5;

        color: #62676e;

        font-size: 18px;

        transition:
            transform .18s ease;
    }


    details[open]
    > summary
    > .ss-mobile-menu-plus {
        transform: rotate(45deg);
    }


    .ss-mobile-menu-root-content {
        padding:
            0
            0
            14px;
    }


    .ss-mobile-menu-all {
        display: block;

        padding:
            10px
            12px;

        border-radius: 10px;

        background: #f7f8f8;

        color: #32373d;

        font-size: 12px;
        font-weight: 800;

        text-decoration: none !important;
    }


    .ss-mobile-menu-all.root-all {
        margin-bottom: 4px;

        background: #111318;
        color: #fff;
    }


    .ss-mobile-menu-branch {
        border-bottom:
            1px solid #f0f1f2;
    }


    .ss-mobile-menu-branch > summary {
        min-height: 46px;

        padding:
            0
            8px;

        color: #3e444b;

        font-size: 13px;
        font-weight: 750;
    }


    .ss-mobile-menu-branch
    .ss-mobile-menu-plus {
        width: 26px;
        height: 26px;

        flex-basis: 26px;

        background: transparent;

        font-size: 17px;
    }


    .ss-mobile-menu-sub {
        padding:
            0
            0
            8px
            10px;
    }


    .ss-mobile-menu-leaf {
        min-height: 43px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 12px;

        padding:
            7px
            9px;

        color: #555b63;

        font-size: 12px;
        font-weight: 620;

        text-decoration: none !important;

        border-bottom:
            1px solid #f4f4f4;
    }


    .ss-mobile-menu-leaf.depth-1 {
        padding-left: 15px;
    }

    .ss-mobile-menu-leaf.depth-2 {
        padding-left: 23px;
    }

    .ss-mobile-menu-leaf.depth-3,
    .ss-mobile-menu-leaf.depth-4 {
        padding-left: 30px;
    }


    .ss-mobile-menu-direct {
        min-height: 52px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 12px;

        padding:
            0
            5px;

        border-bottom:
            1px solid #eceef0;

        color: #181b20;

        font-size: 15px;
        font-weight: 850;

        text-decoration: none !important;
    }


    .ss-mobile-menu-direct.sale {
        color: #d52d59;
    }


    .ss-mobile-menu-account {
        flex: 0 0 auto;

        display: grid;
        grid-template-columns:
            repeat(3, 1fr);

        border-top:
            1px solid #e7e9eb;

        padding:
            10px
            10px
            calc(
                10px
                + env(safe-area-inset-bottom)
            );

        background: #fafafa;
    }


    .ss-mobile-menu-account a {
        min-height: 42px;

        display: grid;
        place-items: center;

        padding: 5px;

        border-right:
            1px solid #e3e5e7;

        color: #454b52;

        font-size: 10px;
        font-weight: 800;

        text-align: center;

        text-decoration: none !important;
    }

    .ss-mobile-menu-account a:last-child {
        border-right: 0;
    }

}


/* =========================================================
   HOMEPAGE — TABLET
   ========================================================= */

@media
(min-width: 701px)
and
(max-width: 991px) {

    body.common-home
    .ssv3-page
    .wrap {
        width:
            calc(100% - 32px) !important;
    }


    body.common-home
    .ssv3-page
    .products {
        display: grid !important;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;

        gap: 14px !important;
    }


    body.common-home
    .ssv3-page
    .product {
        min-width: 0 !important;
    }


    body.common-home
    .ssv3-page
    .product-img {
        height: 280px !important;
    }


    body.common-home
    .ssv3-page
    .hero-main {
        min-height: 500px !important;
    }


    body.common-home
    .ssv3-page
    .hero-content h1 {
        font-size: 58px !important;
    }


    body.common-home
    .ssv3-page
    .departments-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr))
            !important;
    }

}


/* =========================================================
   HOMEPAGE — PHONE
   ========================================================= */

@media (max-width: 700px) {

    body.common-home
    .ssv3-page
    .wrap {
        width:
            calc(100% - 24px) !important;
    }


    body.common-home
    .ssv3-page
    main {
        overflow: hidden !important;
    }


    body.common-home
    .ssv3-page
    section {
        padding:
            34px
            0 !important;
    }


    /* HERO */

    body.common-home
    .ssv3-page
    .hero {
        padding:
            10px
            0
            14px !important;
    }


    body.common-home
    .ssv3-page
    .hero-main {
        min-height: 430px !important;

        border-radius:
            20px !important;
    }


    body.common-home
    .ssv3-page
    .hero-content {
        left: 20px !important;

        width:
            calc(100% - 40px) !important;

        top: auto !important;
        bottom: 24px !important;

        transform: none !important;
    }


    body.common-home
    .ssv3-page
    .hero-content h1 {
        margin:
            9px
            0
            15px !important;

        font-size:
            clamp(
                39px,
                12vw,
                50px
            ) !important;

        line-height: .92 !important;
    }


    body.common-home
    .ssv3-page
    .hero-content p {
        margin-bottom:
            18px !important;

        font-size:
            13px !important;

        line-height:
            1.45 !important;
    }


    body.common-home
    .ssv3-page
    .hero-cta {
        gap: 7px !important;
    }


    body.common-home
    .ssv3-page
    .hero-cta .btn {
        min-height: 42px;

        height: 42px !important;

        padding:
            0
            14px !important;

        font-size:
            11px !important;
    }


    body.common-home
    .ssv3-page
    .hero-side {
        grid-template-columns:
            1fr !important;

        gap: 12px !important;
    }


    body.common-home
    .ssv3-page
    .hero-card {
        min-height:
            190px !important;

        border-radius:
            20px !important;
    }


    /* TRUST */

    body.common-home
    .ssv3-page
    .trust-row {
        grid-template-columns:
            1fr !important;

        gap: 0 !important;
    }


    body.common-home
    .ssv3-page
    .trust-item {
        min-height: 64px;
    }


    /* TITLES */

    body.common-home
    .ssv3-page
    .section-head {
        flex-direction:
            column !important;

        align-items:
            flex-start !important;

        gap: 10px !important;
    }


    body.common-home
    .ssv3-page
    .section-head h2 {
        font-size:
            clamp(
                28px,
                9vw,
                38px
            ) !important;

        line-height: 1 !important;
    }


    body.common-home
    .ssv3-page
    .section-head p {
        max-width: 100% !important;

        font-size: 12px !important;

        line-height: 1.5 !important;
    }


    body.common-home
    .ssv3-page
    .view-all {
        font-size: 10px !important;
    }


    /* CATEGORY PILLS */

    body.common-home
    .ssv3-page
    .category-rail,
    body.common-home
    .ssv3-page
    .shelf-meta {
        width:
            calc(100vw - 12px);

        max-width: none;

        flex-wrap: nowrap !important;

        overflow-x: auto;

        overscroll-behavior-x:
            contain;

        scrollbar-width: none;

        -webkit-overflow-scrolling:
            touch;
    }


    body.common-home
    .ssv3-page
    .category-rail::-webkit-scrollbar,
    body.common-home
    .ssv3-page
    .shelf-meta::-webkit-scrollbar {
        display: none;
    }


    body.common-home
    .ssv3-page
    .cat-pill,
    body.common-home
    .ssv3-page
    .shelf-meta a,
    body.common-home
    .ssv3-page
    .shelf-meta span {
        flex: 0 0 auto;
    }


    /* PRODUCT CAROUSELS
       Full card + visible next card */

    body.common-home
    .ssv3-page
    .products {
        display: flex !important;

        width: 100% !important;

        gap: 12px !important;

        margin-top:
            18px !important;

        padding:
            2px
            18vw
            12px
            0 !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        scroll-snap-type:
            x mandatory;

        scroll-padding-left:
            0;

        overscroll-behavior-x:
            contain;

        scrollbar-width:
            none;

        -webkit-overflow-scrolling:
            touch;
    }


    body.common-home
    .ssv3-page
    .products::-webkit-scrollbar {
        display: none;
    }


    body.common-home
    .ssv3-page
    .product {
        flex:
            0
            0
            min(78vw, 310px)
            !important;

        width:
            min(78vw, 310px)
            !important;

        min-width:
            min(78vw, 310px)
            !important;

        max-width:
            min(78vw, 310px)
            !important;

        scroll-snap-align:
            start;

        scroll-snap-stop:
            normal;

        border-radius:
            16px !important;
    }


    body.common-home
    .ssv3-page
    .product-img {
        height:
            clamp(
                215px,
                66vw,
                250px
            ) !important;
    }


    body.common-home
    .ssv3-page
    .product-info {
        padding:
            12px !important;
    }


    body.common-home
    .ssv3-page
    .product-name {
        min-height:
            39px !important;

        font-size:
            12px !important;

        line-height:
            1.4 !important;
    }


    body.common-home
    .ssv3-page
    .price {
        min-height:
            24px !important;

        font-size:
            14px !important;
    }


    body.common-home
    .ssv3-page
    .retailer {
        font-size:
            9px !important;
    }


    /* DEPARTMENTS */

    body.common-home
    .ssv3-page
    .departments-grid {
        grid-template-columns:
            1fr !important;

        gap: 12px !important;
    }


    body.common-home
    .ssv3-page
    .dept,
    body.common-home
    .ssv3-page
    .dept.lifestyle-feature {
        grid-column:
            span 1 !important;

        min-height:
            225px !important;

        border-radius:
            20px !important;

        padding:
            22px !important;
    }


    body.common-home
    .ssv3-page
    .dept.lifestyle-feature p {
        max-width:
            100% !important;
    }


    /* BRAND DISCOVERY */

    body.common-home
    .ss-brand-universe
    .brand-tabs {
        min-height: 62px;

        padding:
            10px
            12px !important;

        gap:
            7px !important;

        scroll-snap-type:
            x proximity;
    }


    body.common-home
    .ss-brand-universe
    .brand-tabs button {
        min-height:
            42px !important;

        padding:
            0
            15px !important;

        font-size:
            11px !important;

        scroll-snap-align:
            start;
    }


    body.common-home
    .ss-brand-tab-meta {
        align-items:
            flex-start !important;

        gap:
            8px !important;

        padding:
            11px
            12px !important;
    }


    body.common-home
    .ss-brand-tab-meta span {
        max-width:
            calc(100% - 65px)
            !important;

        line-height:
            1.35;
    }


    body.common-home
    .ss-brand-universe
    .ss-home-brand-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0,1fr)
            ) !important;
    }


    body.common-home
    .ss-brand-universe
    .ss-home-brand-card {
        min-height:
            88px !important;
    }


    /* LIFESTYLE */

    body.common-home
    .ssv3-page
    .lifestyle-grid {
        grid-template-columns:
            1fr !important;
    }


    body.common-home
    .ssv3-page
    .lifestyle-main {
        min-height:
            390px !important;

        border-radius:
            20px !important;
    }


    body.common-home
    .ssv3-page
    .lifestyle-main
    .copy {
        left:
            20px !important;

        width:
            calc(100% - 40px)
            !important;
    }


    body.common-home
    .ssv3-page
    .lifestyle-main h2 {
        font-size:
            clamp(
                38px,
                11vw,
                48px
            ) !important;
    }


    body.common-home
    .ssv3-page
    .lifestyle-cats {
        grid-template-columns:
            1fr !important;

        gap:
            9px !important;
    }


    body.common-home
    .ssv3-page
    .lifestyle-cat {
        min-height:
            92px !important;

        padding:
            18px !important;
    }


    /* STYLE FINDER */

    body.common-home
    .ssv3-page
    .finder {
        grid-template-columns:
            1fr !important;

        gap:
            26px !important;

        padding:
            25px
            18px !important;

        border-radius:
            22px !important;
    }


    body.common-home
    .ssv3-page
    .finder h2 {
        font-size:
            clamp(
                34px,
                10vw,
                44px
            ) !important;
    }


    body.common-home
    .ssv3-page
    .finder-steps,
    body.common-home
    .ssv3-page
    .choice {
        grid-template-columns:
            1fr !important;
    }


    body.common-home
    .ssv3-page
    .finder-box {
        padding:
            20px !important;
    }


    /* SEO */

    body.common-home
    .ssv3-page
    .seo-grid {
        grid-template-columns:
            1fr !important;

        gap:
            28px !important;
    }


    body.common-home
    .ssv3-page
    .link-columns {
        grid-template-columns:
            1fr !important;
    }


    /* BOTTOM MOBILE NAV */

    body.common-home
    .ssv3-page
    .mobile-nav {
        left: 8px !important;
        right: 8px !important;

        bottom:
            calc(
                8px
                + env(safe-area-inset-bottom)
            ) !important;

        min-height:
            58px;

        padding:
            7px
            6px !important;

        border-radius:
            17px !important;

        z-index:
            8000 !important;
    }


    body.common-home
    .ssv3-page
    .mobile-nav a {
        min-width: 58px;

        padding:
            4px
            5px !important;
    }


    /* Footer must remain fully visible
       behind fixed bottom navigation */

    body.common-home
    .ss-global-footer-v3__inner {
        padding-bottom:
            calc(
                96px
                + env(safe-area-inset-bottom)
            ) !important;
    }

}


/* =========================================================
   VERY SMALL PHONES — 320 / 360
   ========================================================= */

@media (max-width: 360px) {

    .ssv3-page .logo {
        font-size:
            23px !important;
    }


    .ssv3-page .icon-btn {
        width:
            39px !important;

        height:
            39px !important;

        min-width:
            39px !important;

        min-height:
            39px !important;
    }


    .ss-mobile-menu-toggle {
        width: 41px;
        height: 41px;

        flex-basis: 41px;
    }


    body.common-home
    .ssv3-page
    .product {
        flex-basis:
            79vw !important;

        width:
            79vw !important;

        min-width:
            79vw !important;

        max-width:
            79vw !important;
    }


    body.common-home
    .ssv3-page
    .hero-main {
        min-height:
            410px !important;
    }


    body.common-home
    .ssv3-page
    .hero-content h1 {
        font-size:
            38px !important;
    }

}


/* =========================================================
   390–430 PHONE TUNING
   ========================================================= */

@media
(min-width: 390px)
and
(max-width: 430px) {

    body.common-home
    .ssv3-page
    .product {
        flex-basis:
            310px !important;

        width:
            310px !important;

        min-width:
            310px !important;

        max-width:
            310px !important;
    }

}


/* =========================================================
   SAFE AREA
   ========================================================= */

@supports (
    padding:
    max(0px)
) {

    @media (max-width: 991px) {

        .ss-mobile-menu-drawer {
            padding-right:
                env(safe-area-inset-right);
        }

    }

}
