/* ========================================================================== 
   NOSEAMS — Unified mobile horizontal gutters
   One 22px content line across header, footer and all internal pages.
   Full-width homepage sections remain unchanged.
   ========================================================================== */

:root {
    --ns-mobile-gutter: 22px;
}

@media (max-width: 960px) {
    :root {
        --ns-side-space: var(--ns-mobile-gutter) !important;
    }

    /* Header and mobile navigation.
       Use one shared grid row so hamburger, logo and basket have the same
       vertical centre. The outer columns are identical 44px touch targets. */
    .ns-header {
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) 44px !important;
        align-items: center !important;
        column-gap: 0 !important;
        height: var(--ns-header-mobile-height) !important;
        min-height: var(--ns-header-mobile-height) !important;
        padding: 0 var(--ns-mobile-gutter) !important;
    }

    .ns-header__mobile-toggle {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start !important;
        align-self: center !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 7px !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .ns-header__mobile-toggle span {
        width: 30px !important;
        margin: 0 !important;
    }

    .ns-header__logo {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: center !important;
        align-self: center !important;
        transform: none !important;
    }

    .ns-header__right {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        grid-column: 3 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        align-self: center !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .ns-header__basket {
        display: inline-flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    /* Keep the basket visually lighter than the previous version while the
       44px link remains fully tappable. The extra horizontal offset places
       the visible bag closer to the right viewport edge. */
    .ns-header__basket-icon {
        width: 21px !important;
        height: 25px !important;
        overflow: visible !important;
        transform: translateX(3px) !important;
    }

    .ns-header__basket-count {
        left: calc(100% - 7.5px) !important;
    }

    .ns-mobile-menu {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    .ns-mobile-menu__close,
    .ns-search-overlay__close {
        right: var(--ns-mobile-gutter) !important;
    }

    /* Footer and footer overlays. */
    body .ns-footer__top,
    body .ns-footer__bottom {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    body .ns-cookie-consent {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    /* Generic pages, policies, information pages and 404. */
    body:not(.home) .ns-page,
    body.page .ns-info-page,
    body.page .ns-page--legal,
    body.error404 .ns-info-page,
    body.search .ns-search-page,
    body.ns-wishlist-active .ns-wishlist-page {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    /* Search overlay uses the same viewport gutter. */
    .ns-search-overlay {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    /* Store archives, including translated shop pages. */
    .ns-shop-archive,
    .ns-page--shop {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    .ns-page--shop .ns-shop-archive {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* About page sections. */
    body.ns-about-active .ns-about-brand,
    body.ns-about-active .ns-about-timeline {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    /* Product page content areas. Product media remains fluid inside the line. */
    body.single-product .ns-single-product--design,
    body.single-product .ns-product-care-guide--design,
    body.single-product .ns-related-products--design {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    /* Cart: keep one gutter only, on the outer page wrapper. */
    body.woocommerce-cart .ns-page,
    body.woocommerce-cart .ns-page--cart {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    body.woocommerce-cart .ns-page__content,
    body.woocommerce-cart .ns-page__content > .woocommerce,
    body.woocommerce-cart .ns-page .entry-content,
    body.woocommerce-cart .ns-page .wp-block-woocommerce-cart,
    body.woocommerce-cart .ns-page .wc-block-cart {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Checkout: the custom checkout shell owns one 22px line. */
    body.woocommerce-checkout .ns-checkout-page,
    body.woocommerce-checkout > .wp-site-blocks .wp-block-woocommerce-checkout {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    body.woocommerce-checkout .ns-checkout-page .wp-block-woocommerce-checkout,
    body.woocommerce-checkout .woocommerce .wp-block-woocommerce-checkout,
    body.woocommerce-checkout .entry-content .wp-block-woocommerce-checkout {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.woocommerce-order-received .ns-order-received-page {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    /* Account: outer page supplies the gutter; nested shells must not double it. */
    body.woocommerce-account .ns-page,
    body.woocommerce-lost-password .ns-page {
        padding-left: var(--ns-mobile-gutter) !important;
        padding-right: var(--ns-mobile-gutter) !important;
    }

    body.woocommerce-account .ns-page__content,
    body.woocommerce-lost-password .ns-page__content,
    body.woocommerce-account .woocommerce .ns-account-page,
    body.woocommerce-account .ns-account-page,
    body.woocommerce-lost-password .woocommerce .ns-account-page,
    body.woocommerce-lost-password .ns-account-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Small phones keep the same 22px line instead of reducing to 14–18px. */
@media (max-width: 520px) {
    .ns-mobile-menu__close,
    .ns-search-overlay__close {
        right: var(--ns-mobile-gutter) !important;
    }
}

/* ==========================================================================
   v1.1.94 — Homepage mobile header parity
   The homepage uses performance-critical inline CSS. These final rules ensure
   its header has exactly the same geometry as every internal page, while the
   JavaScript-driven black/white colour switching remains untouched.
   ========================================================================== */
@media (max-width: 960px) {
    body.home .ns-header {
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) 44px !important;
        align-items: center !important;
        column-gap: 0 !important;
        height: var(--ns-header-mobile-height) !important;
        min-height: var(--ns-header-mobile-height) !important;
        padding: 0 var(--ns-mobile-gutter) !important;
    }

    body.home .ns-header__mobile-toggle {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start !important;
        align-self: center !important;
        width: 44px !important;
        height: 44px !important;
    }

    body.home .ns-header__logo {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: center !important;
        align-self: center !important;
        transform: none !important;
    }

    body.home .ns-header__right {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        grid-column: 3 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        align-self: center !important;
        width: 44px !important;
        height: 44px !important;
    }

    body.home .ns-header__basket {
        position: relative !important;
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
    }

    body.home .ns-header__basket-icon {
        width: 21px !important;
        height: 25px !important;
        transform: translateX(3px) !important;
    }
}


/* ==========================================================================
   v1.1.95 — Mobile basket optical edge alignment
   The SVG artwork has approximately 3px of transparent space at each side
   when rendered at 21px wide. A 3px offset makes the visible right edge sit
   exactly on the shared 22px content line, mirroring the hamburger at left.
   ========================================================================== */
@media (max-width: 960px) {
    .ns-header__basket-icon,
    body.home .ns-header__basket-icon {
        transform: translateX(3px) !important;
    }

    .ns-header__basket-count,
    body.home .ns-header__basket-count {
        left: calc(100% - 7.5px) !important;
    }
}
