/* Shared customer chrome, matching the approved homepage. */
body.customer-theme .wrap {
    width: min(1200px, calc(100% - 88px));
    margin-inline: auto;
}

body.customer-theme .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--brand-border);
    box-shadow: none;
}

body.customer-theme.payfast-onsite-open .site-header {
    z-index: 1;
}

body.customer-theme .header-inner {
    height: 88px;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

body.customer-theme .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-family: var(--font-heading);
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
}

body.customer-theme .brand-mark {
    display: block;
    width: 44px;
    height: 38px;
    flex-shrink: 0;
}

body.customer-theme .brand-mark svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: none;
    fill: none;
}

body.customer-theme .brand-page-green,
body.customer-theme .brand-fold { fill: var(--brand-primary); }
body.customer-theme .brand-page-charcoal { fill: var(--brand-text); }

body.customer-theme .brand-mark .brand-page-line {
    fill: none;
    stroke: white;
    stroke-width: 1.6;
    stroke-linecap: round;
    opacity: .9;
}

body.customer-theme .brand-wordmark {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

body.customer-theme .brand-textbook {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 1.15px;
    color: var(--brand-text);
}

body.customer-theme .brand-trader {
    display: block;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 3.1px;
    color: var(--brand-primary);
}

body.customer-theme .header-nav-wrap {
    display: flex;
    flex: 0 1 auto;
    order: 0;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 14px;
    font-weight: 550;
}

body.customer-theme .main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

body.customer-theme .main-nav a {
    padding: 12px 0;
    border: 0;
    color: var(--brand-text);
    font: inherit;
    white-space: nowrap;
    text-decoration: none;
}

body.customer-theme .main-nav a:hover,
body.customer-theme .footer a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

body.customer-theme .header-end {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 0;
}

body.customer-theme .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.customer-theme .header-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
    min-height: 40px;
    flex-shrink: 0;
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 50%;
    color: var(--brand-text);
    transition: background .2s ease;
}

body.customer-theme .header-icon-link:hover {
    background: var(--brand-surface);
    color: var(--brand-primary);
}

body.customer-theme .cart-badge {
    min-width: 20px;
    height: 20px;
    font-size: 12px;
    background: var(--brand-primary-dark);
}

body.customer-theme .header-icon-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: butt;
    stroke-linejoin: miter;
}

body.customer-theme .menu-button {
    display: none;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--brand-border);
    background: transparent;
    border-radius: 50%;
    place-items: center;
    color: var(--brand-text);
}

body.customer-theme .menu-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.customer-theme .top-bar {
    background: var(--brand-surface);
    border-bottom: 1px solid var(--brand-border);
    font-size: 14px;
}

body.customer-theme .top-bar-inner {
    max-width: 1200px;
    width: calc(100% - 88px);
    padding: 0;
    min-height: 36px;
    gap: 6px 16px;
}

body.customer-theme .top-bar .btn {
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    background: transparent;
    color: var(--brand-text);
}

body.customer-theme .top-bar-links { align-items: center; }

body.customer-theme .footer {
    margin-top: 0;
    background: var(--brand-surface);
    border-top: 1px solid var(--brand-border);
    color: var(--brand-text);
}

body.customer-theme .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding-block: 36px;
}

body.customer-theme .footer-top > p {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -.3px;
}

body.customer-theme .footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 14px;
}

body.customer-theme .footer a { color: inherit; }

body.customer-theme .footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 17px;
    border-top: 1px solid var(--brand-border);
    font-size: 14px;
    text-align: left;
    color: var(--brand-text-muted);
}

body.customer-theme .header-cart-preview {
    border-color: var(--brand-border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(59, 66, 81, .12);
}

body.customer-theme .header-cart-preview__title {
    font-family: var(--font-heading);
    color: var(--brand-text);
}

body.customer-theme .cart-preview-item__just-added,
body.customer-theme .cart-preview-item__meta,
body.customer-theme .cart-preview-item__details,
body.customer-theme .cart-preview-item__warn,
body.customer-theme .cart-preview-item__remove,
body.customer-theme .cart-preview-summary__note {
    font-size: 14px;
    line-height: 1.5;
}

body.customer-theme .cart-preview-item__just-added {
    color: #007a3d;
}

body.customer-theme.seller-fulfilment-layout .seller-fulfilment-layout__header {
    background: #fff;
    border-bottom: 1px solid var(--brand-border);
}

body.customer-theme.seller-fulfilment-layout .seller-fulfilment-layout__header-inner {
    width: min(1200px, calc(100% - 88px));
    min-height: 88px;
    padding-block: 16px;
}

body.customer-theme.seller-fulfilment-layout .seller-fulfilment-layout__tagline {
    color: var(--brand-text-muted);
    font-size: 14px;
}

@media (max-width: 1100px) {
    body.customer-theme .main-nav { gap: 20px; }
    body.customer-theme .footer nav { gap: 15px; }
}

@media (max-width: 991px) {
    body.customer-theme.is-account > .footer {
        padding-bottom: calc(var(--account-mobile-bar-height, 4.25rem) + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 800px) {
    body.customer-theme .header-nav-wrap { display: none; }
    body.customer-theme .menu-button { display: grid; }

    body.customer-theme .header-nav-wrap.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 12px 28px 22px;
        border-top: 1px solid var(--brand-border);
        border-bottom: 1px solid var(--brand-border);
        background: #fff;
        box-shadow: 0 8px 12px #00874408;
    }

    body.customer-theme .header-nav-wrap.is-open .main-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    body.customer-theme .header-nav-wrap.is-open .main-nav a {
        display: block;
        min-height: 44px;
        padding: 10px 0;
        border: 0;
    }

    body.customer-theme .footer-top { flex-wrap: wrap; }
    body.customer-theme .footer nav { width: 100%; justify-content: space-between; }
    body.customer-theme .footer-top > p { margin-left: auto; }
    body.customer-theme .footer-bottom { flex-wrap: wrap; }
}

@media (max-width: 600px) {
    body.customer-theme .wrap,
    body.customer-theme .top-bar-inner { width: calc(100% - 40px); }
    body.customer-theme .header-inner { height: 75px; gap: 10px; }
    body.customer-theme .brand { gap: 8px; }
    body.customer-theme .brand-mark { width: 38px; height: 34px; }
    body.customer-theme .brand-wordmark { gap: 4px; }
    body.customer-theme .brand-textbook { font-size: 12px; letter-spacing: 1px; }
    body.customer-theme .brand-trader { font-size: 15px; letter-spacing: 2.6px; }
    body.customer-theme .header-actions { gap: 6px; }
    body.customer-theme .header-nav-wrap.is-open { padding-inline: 20px; }
    body.customer-theme .top-bar-inner { padding-block: 6px; }
    body.customer-theme .top-bar-inner > div:first-child { min-width: 0; overflow-wrap: anywhere; }
    body.customer-theme .footer-top { padding-block: 28px; gap: 22px; }
    body.customer-theme .footer-top > p { font-size: 14px; }
    body.customer-theme .footer nav { gap: 15px; font-size: 14px; }
    body.customer-theme .footer-bottom { font-size: 14px; gap: 14px; }
    body.customer-theme.seller-fulfilment-layout .seller-fulfilment-layout__header-inner {
        width: calc(100% - 40px);
        min-height: 75px;
        gap: 14px;
    }
    body.customer-theme.seller-fulfilment-layout .seller-fulfilment-layout__tagline { font-size: 14px; }
}

@media (max-width: 360px) {
    body.customer-theme .wrap,
    body.customer-theme .top-bar-inner { width: calc(100% - 32px); }
    body.customer-theme .header-actions { gap: 2px; }
    body.customer-theme .footer-top > p { font-size: 14px; }
}

@media print {
    body.customer-theme > .site-header,
    body.customer-theme > .footer {
        display: none !important;
    }
}

body.customer-theme .brand-logo {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    body.customer-theme .brand-logo { width: 166px; }
}
