/*
 * SESSION 777 STOREFRONT CATALOG SEARCH FILTER START
 *
 * Product discovery toolbar only. This file does not style cart, checkout,
 * account, payment, or order interfaces.
 */

.shop-catalog .catalog-discovery {
    margin: 0 0 28px;
    padding: 24px;
    border: 1px solid #d9e3ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(31, 57, 79, 0.08);
}

.shop-catalog .catalog-discovery__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.shop-catalog .catalog-discovery__heading .eyebrow {
    margin: 0 0 4px;
    color: #526779;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.shop-catalog .catalog-discovery__heading h1 {
    margin: 0;
    color: #172c3d;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.08;
}

.shop-catalog .catalog-result-count {
    flex: 0 0 auto;
    margin: 0 0 3px;
    color: #526779;
    font-size: 0.95rem;
    font-weight: 750;
}

.shop-catalog .catalog-filter-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #e6c463;
    border-radius: 10px;
    color: #604915;
    background: #fff8df;
    font-weight: 650;
}

.shop-catalog .catalog-toolbar {
    display: grid;
    grid-template-columns:
        minmax(230px, 2.15fr)
        minmax(120px, 0.8fr)
        minmax(150px, 1fr)
        minmax(165px, 1.1fr)
        auto;
    align-items: end;
    gap: 14px;
}

.shop-catalog .catalog-field {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #2f4557;
    font-size: 0.8rem;
    font-weight: 800;
}

.shop-catalog .catalog-field > span:first-child {
    letter-spacing: 0.01em;
}

.shop-catalog .catalog-search-control {
    position: relative;
    display: block;
}

.shop-catalog .catalog-search-control svg {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: #667b8c;
    transform: translateY(-50%);
    pointer-events: none;
}

.shop-catalog .catalog-field input,
.shop-catalog .catalog-field select {
    width: 100%;
    min-height: 46px;
    margin: 0;
    border: 1px solid #bdcbd7;
    border-radius: 10px;
    color: #172c3d;
    background: #ffffff;
    box-shadow: none;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 650;
}

.shop-catalog .catalog-field input {
    padding: 10px 13px;
}

.shop-catalog .catalog-field--search input {
    padding-left: 42px;
}

.shop-catalog .catalog-field select {
    padding: 10px 36px 10px 12px;
}

.shop-catalog .catalog-field input::placeholder {
    color: #7b8d9b;
    opacity: 1;
}

.shop-catalog .catalog-field input:hover,
.shop-catalog .catalog-field select:hover {
    border-color: #8fa6b8;
}

.shop-catalog .catalog-field input:focus,
.shop-catalog .catalog-field select:focus,
.shop-catalog .catalog-field input:focus-visible,
.shop-catalog .catalog-field select:focus-visible {
    border-color: #1769aa;
    outline: 3px solid rgba(23, 105, 170, 0.16);
    outline-offset: 1px;
}

.shop-catalog .catalog-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
}

.shop-catalog .catalog-apply-button {
    min-height: 46px;
    margin: 0;
    padding: 10px 20px;
    border: 1px solid #1769aa;
    border-radius: 10px;
    color: #ffffff;
    background: #1769aa;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.shop-catalog .catalog-apply-button:hover,
.shop-catalog .catalog-apply-button:focus-visible {
    border-color: #0f4778;
    background: #0f4778;
}

.shop-catalog .catalog-apply-button:focus-visible {
    outline: 3px solid rgba(23, 105, 170, 0.22);
    outline-offset: 2px;
}

.shop-catalog .catalog-clear-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: #32556f;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.shop-catalog .catalog-clear-link:hover,
.shop-catalog .catalog-clear-link:focus-visible {
    color: #0f4778;
}

.shop-catalog .catalog-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
}

.shop-catalog .catalog-active-filters__label {
    margin-right: 2px;
    color: #617585;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.shop-catalog .catalog-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #c4d3df;
    border-radius: 999px;
    color: #24465f;
    background: #f3f7fa;
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
}

.shop-catalog .catalog-filter-chip span {
    font-size: 1.05rem;
    line-height: 0.8;
}

.shop-catalog .catalog-filter-chip:hover,
.shop-catalog .catalog-filter-chip:focus-visible {
    border-color: #1769aa;
    color: #0f4778;
    background: #eaf3fa;
}

.shop-catalog .catalog-filter-chip:focus-visible {
    outline: 3px solid rgba(23, 105, 170, 0.18);
    outline-offset: 1px;
}

.shop-catalog .catalog-discovery .catalog-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2eaf0;
}

.shop-catalog .catalog-discovery .catalog-category-pill {
    min-height: 38px;
    padding: 8px 12px;
}

.shop-catalog .catalog-empty-state {
    margin-top: 10px;
}

@media (max-width: 1040px) {
    .shop-catalog .catalog-toolbar {
        grid-template-columns:
            minmax(260px, 1.7fr)
            minmax(120px, 0.75fr)
            minmax(150px, 1fr);
    }

    .shop-catalog .catalog-field:nth-of-type(4) {
        grid-column: 1 / 2;
    }

    .shop-catalog .catalog-toolbar__actions {
        grid-column: 2 / 4;
        align-self: end;
    }
}

@media (max-width: 720px) {
    .shop-catalog .catalog-discovery {
        margin-bottom: 22px;
        padding: 18px;
        border-radius: 15px;
    }

    .shop-catalog .catalog-discovery__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 17px;
    }

    .shop-catalog .catalog-result-count {
        margin: 0;
    }

    .shop-catalog .catalog-toolbar {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .shop-catalog .catalog-field--search {
        grid-column: 1 / -1;
    }

    .shop-catalog .catalog-field:nth-of-type(4) {
        grid-column: 1 / -1;
    }

    .shop-catalog .catalog-toolbar__actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .shop-catalog .catalog-apply-button {
        flex: 1 1 auto;
    }

    .shop-catalog .catalog-discovery .catalog-category-pills {
        flex-wrap: nowrap;
        margin-right: -18px;
        margin-left: -18px;
        padding-right: 18px;
        padding-left: 18px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .shop-catalog .catalog-discovery .catalog-category-pill {
        flex: 0 0 auto;
    }
}

@media (max-width: 440px) {
    .shop-catalog .catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .shop-catalog .catalog-field--search,
    .shop-catalog .catalog-field:nth-of-type(4),
    .shop-catalog .catalog-toolbar__actions {
        grid-column: 1;
    }

    .shop-catalog .catalog-toolbar__actions {
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
    }

    .shop-catalog .catalog-clear-link {
        justify-content: center;
    }
}

/* SESSION 777 STOREFRONT CATALOG SEARCH FILTER END */

/*
 * SESSION 778 STOREFRONT CATALOG SPACING CLEANUP START
 *
 * Separates the filter controls from category navigation and normalizes
 * spacing against older catalog rules that use !important overrides.
 */
body:has(.shop-catalog) .shop-catalog .catalog-discovery {
    margin-bottom: 32px;
    padding: 26px 24px 24px;
}

body:has(.shop-catalog) .shop-catalog .catalog-discovery__heading {
    align-items: center;
    margin-bottom: 24px;
}

body:has(.shop-catalog) .shop-catalog .catalog-result-count {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f7fa;
    line-height: 1.1;
}

body:has(.shop-catalog) .shop-catalog .catalog-toolbar {
    column-gap: 16px;
    row-gap: 18px;
}

body:has(.shop-catalog) .shop-catalog .catalog-field {
    gap: 8px;
}

body:has(.shop-catalog) .shop-catalog .catalog-field input,
body:has(.shop-catalog) .shop-catalog .catalog-field select,
body:has(.shop-catalog) .shop-catalog .catalog-apply-button {
    min-height: 48px;
}

body:has(.shop-catalog) .shop-catalog .catalog-toolbar__actions {
    min-height: 48px;
}

body:has(.shop-catalog) .shop-catalog .catalog-discovery .catalog-category-pills {
    gap: 12px;
    margin: 24px 0 0 !important;
    padding: 20px 0 0 !important;
    border-top: 1px solid #e2eaf0 !important;
}

body:has(.shop-catalog) .shop-catalog .catalog-discovery .catalog-category-pill {
    min-height: 40px;
    padding: 9px 14px;
}

@media (max-width: 1040px) {
    body:has(.shop-catalog) .shop-catalog .catalog-discovery {
        padding: 24px 22px 22px;
    }
}

@media (max-width: 720px) {
    body:has(.shop-catalog) .shop-catalog .catalog-discovery {
        margin-bottom: 26px;
        padding: 20px 18px 18px;
    }

    body:has(.shop-catalog) .shop-catalog .catalog-discovery__heading {
        gap: 10px;
        margin-bottom: 20px;
    }

    body:has(.shop-catalog) .shop-catalog .catalog-result-count {
        padding: 5px 9px;
    }

    body:has(.shop-catalog) .shop-catalog .catalog-toolbar {
        gap: 14px 12px;
    }

    body:has(.shop-catalog) .shop-catalog .catalog-discovery .catalog-category-pills {
        gap: 10px;
        margin: 22px -18px 0 !important;
        padding: 18px 18px 2px !important;
        border-top: 1px solid #e2eaf0 !important;
    }
}

@media (max-width: 440px) {
    body:has(.shop-catalog) .shop-catalog .catalog-toolbar {
        row-gap: 13px;
    }
}
/* SESSION 778 STOREFRONT CATALOG SPACING CLEANUP END */
