/* ── Live Search Dropdown ─────────────────────────── */

.celero-live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: 480px;
    overflow-y: auto;
}

.celero-live-search-results::-webkit-scrollbar {
    width: 6px;
}

.celero-live-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.celero-live-search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.celero-live-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

/* ── Result row ──────────────────────────────────── */

.celero-search-result__link {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    align-items: center;
    transition: background 0.15s;
}

.celero-search-result__link:hover {
    background: var(--bg);
}

.celero-search-result + .celero-search-result {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ── Thumbnail ───────────────────────────────────── */

.celero-search-result__thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: calc(var(--radius) / 2);
    flex-shrink: 0;
}

/* ── Text content ────────────────────────────────── */

.celero-search-result__text {
    flex: 1;
    min-width: 0;
}

.celero-search-result__title {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text);
}

.celero-search-result__title strong,
.celero-search-result__desc strong {
    font-size: inherit;
    font-weight: 600;
}

.celero-search-result__desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.celero-search-result__price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.celero-search-result__price {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.celero-search-result__price del {
    color: var(--muted);
    font-weight: 400;
    margin-right: 4px;
}

.celero-search-result__price ins {
    text-decoration: none;
}

/* ── Sale badge ──────────────────────────────────── */

.celero-search-result__badge {
    background: var(--sale-badge-bg, #889664);
    color: #ffffff;
    font-size: var(--sale-search-font-size, 10px);
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: var(--sale-search-padding, 2px 8px);
    border-radius: var(--sale-badge-radius, 999px);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── View all link ───────────────────────────────── */

.celero-search-view-all {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.celero-search-view-all a {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: background 0.15s;
}

.celero-search-view-all a:hover {
    background: var(--bg);
}

/* ── Loading / no results ────────────────────────── */

.celero-search-loading,
.celero-search-no-results {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* ── Desktop search submit button ────────────────── */

.site-search button.celero-search-submit {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.site-search button.celero-search-submit i {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 16px;
    color: #fff;
    background: var(--accent);
    border-radius: var(--btn-radius);
    transition: background 0.15s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-search button.celero-search-submit:hover i {
    background: var(--accent-strong);
    transform: scaleX(-1);
}

/* ── Hide native search clear button ─────────────── */

.site-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* ── Clear button ────────────────────────────────── */

.celero-search-clear {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    font-size: 16px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s;
}

.celero-search-clear:hover {
    color: var(--text);
}

/* ── Mobile Search Overlay ──────────────────────── */

.celero-mobile-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1103;
    background: rgba(0, 0, 0, 0.4);
}

.celero-mobile-search-overlay.is-open {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.celero-mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
}

.celero-mobile-search-results-inner {
    background: #fff;
    border-radius: var(--radius, 12px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    max-height: 60vh;
    list-style: none;
    padding: 0;
    margin: 0 16px;
}

.celero-mobile-search-results-inner::-webkit-scrollbar {
    width: 6px;
}

.celero-mobile-search-results-inner::-webkit-scrollbar-track {
    background: transparent;
}

.celero-mobile-search-results-inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.celero-mobile-search-input-wrap {
    display: flex;
    gap: 8px;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    align-items: center;
}

.celero-mobile-search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: var(--btn-radius);
    padding: 8px 12px;
    border: 1px solid #e3e3e3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-width: 0;
}

.celero-mobile-search-input-wrap input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 16px;
    background: transparent;
    padding: 4px 4px;
    -webkit-appearance: none;
    min-width: 0;
}

.celero-mobile-search-input-wrap input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.celero-mobile-search-submit {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    cursor: pointer;
    border: none;
    background: transparent;
    flex-shrink: 0;
    padding: 0;
}

.celero-mobile-search-submit i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-size: 18px;
    color: #fff;
    background: var(--accent);
    border-radius: var(--btn-radius);
    transition: background 0.15s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.celero-mobile-search-submit:hover i {
    background: var(--accent-strong);
    transform: scaleX(-1);
}

.celero-mobile-search-close {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 18px;
    color: var(--muted);
    cursor: pointer;
    border: none;
    background: none;
    flex-shrink: 0;
    border-radius: 50%;
}

.celero-mobile-search-close:hover {
    color: var(--text);
}

/* Hide mobile overlay on desktop */
@media (min-width: 901px) {
    .celero-mobile-search-overlay {
        display: none !important;
    }
}
