/* =======================================================================
   Site Search — full-page modal
   Design tokens:
     Sun/50:          #FFFDF5   bg
     Blue/700-brand:  #373741   primary text
     Sand/800:        #62554A   secondary / active tab bg
     Sand/400:        #ADA28A   placeholder
     Sand/300:        #C3BCA9   input border, dividers
     Sand/100:        #EEEDE6   inactive tab bg
     Blue/300:        #D3D3D9   close border
   ==================================================================== */

.ss-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #FFFDF5;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    transition: opacity 150ms ease;
}

.ss-modal[data-open] {
    opacity: 1;
}

.ss-modal[hidden] {
    display: none !important;
}

.ss-modal__inner {
    position: relative;
    min-height: 100%;
    padding: 96px 40px 40px;
    display: flex;
    justify-content: center;
}

@media (max-width: 767px) {
    .ss-modal__inner {
        padding: 80px 16px 48px;
    }
}

.ss-modal__close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFDF5;
    border: 1px solid #D3D3D9;
    border-radius: 8px;
    color: #373741;
    cursor: pointer;
    transition: background 120ms ease;
}

.ss-modal__close:hover { background: #EEEDE6; }

@media (max-width: 767px) {
    .ss-modal__close {
        top: 16px;
        right: 16px;
    }
}

.ss-modal__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 64px;
    width: 100%;
    max-width: 800px;
}

/* ── Header (logo + search + tabs) ─────────────────────────────────── */
.ss-modal__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.ss-modal__logo {
    height: 26px;
    width: auto;
}

.ss-modal__search-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.ss-modal__search-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 600px;
    max-width: 100%;
    height: 40px;
    padding: 8px 16px;
    border: 0.5px solid #C3BCA9;
    border-radius: 4px;
    background: #FFFDF5;
}

.ss-modal__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #373741;
}

.ss-modal__input::placeholder {
    color: #ADA28A;
}

.ss-modal__search-icon {
    flex-shrink: 0;
    color: #62554A;
}

.ss-modal__no-result {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #373741;
    text-align: center;
}

.ss-modal__tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.ss-modal__tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    background: #EEEDE6;
    color: #62554A;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

.ss-modal__tab:hover {
    background: #E0DFD6;
}

.ss-modal__tab.is-active {
    background: #62554A;
    color: #FFFDF5;
}

.ss-modal__tab-count:empty {
    display: none;
}

/* ── Results ───────────────────────────────────────────────────────── */
.ss-modal__results {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.ss-modal__section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ss-modal__product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1023px) {
    .ss-modal__product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .ss-modal__product-grid { grid-template-columns: 1fr; gap: 40px; }
}

.ss-product-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}

.ss-product-card__image {
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    overflow: hidden;
    background: #EEEDE6;
}

.ss-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 300ms ease, transform 300ms ease;
}

.ss-product-card__image img.is-loaded {
    opacity: 1;
}

.ss-product-card:hover .ss-product-card__image img {
    transform: scale(1.03);
}

.ss-product-card__title {
    margin: 0;
    font-family: 'Season Sans Medium', 'Inter', system-ui, sans-serif;
    font-weight: 550;
    font-size: 16px;
    line-height: 1.3;
    color: #373741;
}

.ss-product-card__desc {
    margin: 4px 0 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #373741;
}

.ss-text-results {
    display: flex;
    flex-direction: column;
}

.ss-text-result {
    display: block;
    padding: 20px 0;
    border-top: 0.5px solid #C3BCA9;
    text-decoration: none;
    color: inherit;
}

.ss-text-result:first-child { border-top: none; padding-top: 0; }

.ss-text-result__title {
    margin: 0 0 10px;
    font-family: 'Season Sans Medium', 'Inter', system-ui, sans-serif;
    font-weight: 550;
    font-size: 24px;
    line-height: 1.2;
    color: #373741;
}

.ss-text-result:hover .ss-text-result__title {
    color: #62554A;
}

.ss-text-result__snippet {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #373741;
}

.ss-text-result__snippet em,
.ss-text-result__title em {
    background: #FDFDE7;
    font-style: normal;
    padding: 0 2px;
}

/* ── Load more ─────────────────────────────────────────────────────── */
.ss-modal__load-more {
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #D3D3D9;
    border-radius: 4px;
    background: transparent;
    color: #373741;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 120ms ease;
}

.ss-modal__load-more:hover {
    background: #EEEDE6;
}

/* ── Body lock when open ───────────────────────────────────────────── */
body.ss-modal-open {
    overflow: hidden;
}
