/*
 * Storefront header — append layer.
 *
 * Everything here is scoped under .ss-notice / .ss-header so style.css keeps
 * owning the rest of the front end. Loaded after style.css and responsive.css.
 */

:root {
    --ss-notice-bg: #faf6ef;
    --ss-ink: #2b2b2b;
    --ss-ink-soft: #4a4a4a;
    --ss-line: #ece7dd;
    --ss-pill-line: #ded6c8;
}

/* ---------------------------------------------------------- promise strip */

.ss-notice {
    background: var(--ss-notice-bg);
    border-bottom: 1px solid var(--ss-line);
    font-size: 13px;
    line-height: 1;
    color: var(--ss-ink-soft);
}

.ss-notice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 38px;
}

.ss-notice-promise,
.ss-notice-contact {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ss-notice-promise i,
.ss-notice-contact i {
    font-size: 14px;
    margin-inline-end: 8px;
}

.ss-notice-promise span,
.ss-notice-contact span {
    vertical-align: middle;
}

.ss-notice-contact a {
    color: var(--ss-ink-soft);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.ss-notice-contact a:hover {
    color: var(--ss-ink);
}

/* ----------------------------------------------------------- header shell */

.navbar.ss-header {
    background: #fff;
    border-bottom: 1px solid var(--ss-line);
}

.ss-header .ss-header-row {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    min-height: 78px;
    padding: 10px 0;
}

.ss-header .ss-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.ss-header .ss-logo img {
    height: 58px;
    width: auto;
    max-width: 200px;
}

/* ------------------------------------------------------------- search bar */

.ss-header .ss-search {
    flex: 1 1 auto;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 6px 0 4px;
    border: 1px solid var(--ss-pill-line);
    border-radius: 999px;
    background: #fff;
}

/* style.css gives every .dropdown a pill shadow; inside the search bar that
   paints a second box around the category label. Flex (rather than the default
   block) also stops the inline-flex button sitting on a text baseline, which
   added descender space below it and pushed the label above the pill's centre. */
.ss-header .ss-search-cat {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: auto;
    border-radius: 0;
    box-shadow: none;
}

.ss-header .ss-search-cat-btn {
    /* style.css hangs margin-bottom: 10px on every button, which shifts a
       vertically centred flex item up by half of it. */
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    border-radius: 999px;
    font-size: 14px;
    color: var(--ss-ink);
    white-space: nowrap;
}

.ss-header .ss-search-cat-btn i {
    font-size: 12px;
}

.ss-header .ss-search-cat-menu {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--ss-line);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.ss-header .ss-search-cat-menu .dropdown-item {
    font-size: 14px;
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--ss-ink);
}

.ss-header .ss-search-divider {
    flex: 0 0 auto;
    width: 1px;
    height: 22px;
    background: var(--ss-pill-line);
    margin: 0 4px;
}

.ss-header .ss-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: var(--ss-ink);
}

.ss-header .ss-search-input::placeholder {
    color: #9a9184;
}

.ss-header .ss-search-btn {
    margin: 0;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ss-ink);
    font-size: 17px;
}

.ss-header .ss-search-btn:hover {
    background: var(--ss-notice-bg);
}

/* --------------------------------------------------------- right actions */

.ss-header .ss-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ss-header .ss-action-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ss-ink);
    text-decoration: none;
    cursor: pointer;
}

.ss-header .ss-action-link:hover {
    color: var(--bs-primary, #2b2b2b);
}

.ss-header .ss-action-link > i {
    font-size: 19px;
}

.ss-header .ss-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 19px;
}

.ss-header .ss-cart-count {
    position: absolute;
    top: -9px;
    inset-inline-end: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--bs-primary, #2e7d32);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-style: normal;
}

.ss-header .ss-cart-total {
    white-space: nowrap;
}

/* -------------------------------------------------------------- responsive */

/* Logo, search and cart share one row all the way down; the pill takes whatever
   width is left over rather than wrapping to a line of its own. */
@media (max-width: 991.98px) {
    .ss-header .ss-header-row {
        flex-wrap: nowrap;
        gap: 12px;
        min-height: 0;
    }

    .ss-header .ss-logo img {
        height: 42px;
        max-width: 120px;
    }

    .ss-header .ss-search {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        margin: 0;
        height: 42px;
    }

    .ss-header .ss-search-cat-btn {
        padding: 0 10px;
        font-size: 13px;
        max-width: 130px;
    }

    .ss-header .ss-search-cat-btn span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ss-header .ss-actions {
        gap: 16px;
    }

    .ss-header .ss-action-link > span:not(.ss-cart-icon):not(.ss-cart-total) {
        display: none;
    }
}

/* On a phone there is not enough room for the category picker AND a usable
   input on the same line, so the pill becomes search-everything. Browsing by
   category stays on the bottom bar and in the sidebar. */
@media (max-width: 575.98px) {
    .ss-header .ss-header-row {
        gap: 8px;
    }

    .ss-header .ss-logo img {
        height: 38px;
        max-width: 96px;
    }

    .ss-header .ss-search-cat,
    .ss-header .ss-search-divider {
        display: none;
    }

    .ss-header .ss-search {
        height: 40px;
        padding: 0 4px 0 8px;
    }

    .ss-header .ss-cart-total {
        display: none;
    }
}
