/* Site search modal — shared across themes */

body.store-search-open {
    overflow: hidden;
}

.store-search-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
}

.store-search-modal[hidden] {
    display: none;
}

.store-search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 7, 0.52);
    backdrop-filter: blur(4px);
}

.store-search-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: min(84vh, 720px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(14px, 2.5vw, 18px);
    border-radius: var(--radius-lg, 14px);
    background: var(--surface-panel, #fff);
    border: 1px solid var(--border-subtle, rgba(26, 15, 10, 0.1));
    box-shadow: var(--shadow-lg, 0 16px 40px rgba(10, 10, 10, 0.12));
}

@media (min-width: 900px) {
    .store-search-modal__panel {
        width: min(100%, 800px);
        max-height: min(86vh, 760px);
    }
}

.store-search-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.store-search-modal__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark, #1a0f0a);
}

.store-search-modal__close {
    flex-shrink: 0;
}

.store-search-modal__field {
    position: relative;
    display: block;
}

.store-search-modal__field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted, #6b5c55);
    pointer-events: none;
}

.store-search-modal__field-icon svg {
    width: 100%;
    height: 100%;
}

.store-search-modal__input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    font-size: 0.9375rem;
}

.store-search-results {
    overflow: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.store-search-results__hint,
.store-search-results__empty {
    margin: 0;
    padding: 6px 2px;
    color: var(--text-muted, #6b5c55);
    font-size: 0.875rem;
}

.store-search-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Override theme `section { padding: var(--section-padding) 0; }` */
.store-search-modal .store-search-section,
.store-search-section {
    padding: 0;
    margin: 0;
}

.store-search-section + .store-search-section .store-search-section__head {
    margin-top: 2px;
    padding-top: 4px;
    border-top: 1px solid var(--border-subtle, rgba(26, 15, 10, 0.08));
}

.store-search-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.store-search-section__title {
    margin: 0;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #6b5c55);
    line-height: 1.2;
}

.store-search-section__more {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--coffee-700, #5c3d2e);
    text-decoration: none;
    white-space: nowrap;
}

.store-search-section__more:hover,
.store-search-section__more:focus-visible {
    text-decoration: underline;
}

.store-search-results__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.store-search-results__list--products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

@media (min-width: 520px) {
    .store-search-results__list--products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .store-search-results__list--products {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
    }
}

.store-search-results__item--product {
    min-width: 0;
}

.store-search-results__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.store-search-results__link:hover,
.store-search-results__link:focus-visible {
    background: var(--bg-secondary, #f8f4f0);
    border-color: var(--border-subtle, rgba(26, 15, 10, 0.1));
    outline: none;
}

.store-search-results__link--product {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 5px;
    height: 100%;
    text-align: left;
}

.store-search-results__thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-secondary, #f8f4f0);
}

.store-search-results__thumb--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.store-search-results__thumb--product {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 6px;
}

.store-search-results__thumb--product.store-search-results__thumb--placeholder {
    min-height: 0;
}

.store-search-results__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.store-search-results__body--product {
    gap: 2px;
    flex: 1 1 auto;
}

.store-search-results__body--product .store-search-results__name {
    white-space: normal;
    -webkit-line-clamp: 2;
    line-height: 1.15;
    font-size: 0.6875rem;
}

.store-search-results__body--product .store-search-results__prices {
    gap: 2px;
    margin-top: auto;
}

.store-search-results__body--product .store-search-results__price {
    font-size: 0.6875rem;
}

.store-search-results__name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-dark, #1a0f0a);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.store-search-results__meta {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--coffee-700, #5c3d2e);
}

.store-search-results__excerpt {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--text-muted, #6b5c55);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.store-search-results__prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.store-search-results__price {
    font-size: 0.8125rem;
    color: var(--text-muted, #6b5c55);
}

.store-search-results__price--was {
    text-decoration: line-through;
    color: #c2410c;
}

.store-search-results__price--sale {
    color: #15803d;
    font-weight: 600;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-nav-link--button {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
