/* ============================================================
   SEARCH PAGE — HERO
   ============================================================ */
.search-page-hero {
    position: relative;
    min-height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.78), rgba(0,0,0,0.88)),
                url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80')
                center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 60px;
    overflow: hidden;
}

.search-hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.search-hero-inner {
    position: relative;
    z-index: 2;
}

.search-back-link {
    display: inline-flex;
    align-items: center;
    color: rgba(234,234,234,0.55);
    font-size: 0.82rem;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    margin-bottom: 28px;
}
.search-back-link:hover { color: var(--accent-color); }

/* Refined search-page hero */
.search-page-hero {
    min-height: 500px;
    padding: 68px 20px 54px;
    align-items: center;
    text-align: left;
    background:
        linear-gradient(90deg, rgba(2, 12, 16, 0.82) 0%, rgba(2, 13, 18, 0.62) 50%, rgba(2, 13, 18, 0.57) 100%),
        linear-gradient(0deg, rgba(1, 9, 12, 0.44), rgba(1, 9, 12, 0.12)),
        url('images/site/bg_image.png') center 55% / cover no-repeat;
}

.search-page-hero .search-hero-particles { display: none; }

.search-page-hero .search-hero-inner {
    width: min(100%, 920px);
    margin: 0 auto;
    text-align: center;
}

.search-page-hero .hero-badge {
    margin: 0 0 18px !important;
    padding: 8px 14px;
    background: rgba(201, 145, 30, 0.15);
    border-color: rgba(218, 169, 48, 0.48);
    color: #dfae3e;
    font-size: 0.67rem;
    letter-spacing: 1.4px;
    line-height: 1;
}

.search-page-hero .hero-title {
    position: relative;
    margin: 0 0 34px !important;
    color: #fffdf8 !important;
    font-size: clamp(2.8rem, 4.3vw, 4rem) !important;
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.04em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
}

.search-page-hero .hero-title::after {
    content: "";
    position: absolute;
    width: 205px;
    height: 1px;
    bottom: -18px;
    left: 50%;
    background: linear-gradient(90deg, #d6a330 0 80%, transparent 80% 87%, #d6a330 87% 100%);
    transform: translateX(-50%);
}

.search-page-hero .hero-title-accent {
    display: inline;
    color: #dba836;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.search-page-hero .hero-subtitle {
    margin: 0 0 26px !important;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.94rem !important;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0 !important;
    text-transform: none;
}

.search-page-hero .search-hero-box {
    max-width: 650px;
    margin: 0 auto 22px;
}

.search-page-hero .search-hero-input-wrap {
    min-height: 58px;
    padding: 14px 20px;
    background: rgba(4, 13, 16, 0.7);
    border-color: rgba(215, 164, 47, 0.7);
    border-radius: 9px;
}

.search-page-hero .popular-grid-label {
    margin-bottom: 11px;
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.66rem;
    letter-spacing: 1.65px;
}

.search-page-hero .popular-searches-grid {
    justify-content: center;
    max-width: 730px;
    gap: 8px;
    margin: 0 auto;
}

.search-page-hero .popular-card {
    padding: 8px 13px;
    background: rgba(4, 13, 16, 0.58);
    border-color: rgba(215, 164, 47, 0.28);
    font-size: 0.8rem;
}

@media (max-width: 767.98px) {
    .search-page-hero {
        min-height: 600px;
        padding: 56px 20px 44px;
        background-position: 60% center;
    }

    .search-page-hero .search-hero-inner { margin: 0 auto; }
    .search-page-hero .hero-subtitle br { display: none; }
    .search-page-hero .popular-searches-grid { justify-content: center; }
}

/* ============================================================
   SEARCH HERO — INPUT
   ============================================================ */
.search-hero-box {
    max-width: 660px;
    margin: 0 auto 32px;
}

.search-hero-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(20, 16, 6, 0.9);
    border: 1.5px solid rgba(212, 175, 55, 0.5);
    border-radius: 50px;
    padding: 14px 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-hero-input-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(156,125,74,0.15), 0 8px 30px rgba(0,0,0,0.4);
}

.search-hero-icon {
    color: var(--accent-color);
    font-size: 1rem;
    margin-right: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.search-hero-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.search-hero-input::placeholder { color: rgba(234,234,234,0.35); }

.search-hero-clear {
    background: none;
    border: none;
    color: rgba(234,234,234,0.4);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    transition: color 0.3s ease, background 0.3s ease;
    display: none;
    flex-shrink: 0;
}
.search-hero-clear.visible { display: flex; align-items: center; justify-content: center; }
.search-hero-clear:hover { color: var(--accent-color); background: rgba(156,125,74,0.1); }

/* ============================================================
   RECENT SEARCHES
   ============================================================ */
.recent-searches-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: rgba(20,16,6,0.85);
    border: 1px solid rgba(156,125,74,0.2);
    border-radius: 14px;
    margin-top: 8px;
    backdrop-filter: blur(8px);
}

.recent-searches-label {
    color: rgba(234,234,234,0.4);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.recent-searches-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.recent-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(156,125,74,0.1);
    border: 1px solid rgba(156,125,74,0.25);
    color: var(--accent-color);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.recent-chip:hover {
    background: rgba(156,125,74,0.25);
    border-color: var(--primary-color);
}

.recent-clear-btn {
    background: none;
    border: none;
    color: rgba(234,234,234,0.3);
    font-size: 0.72rem;
    cursor: pointer;
    transition: color 0.3s ease;
    flex-shrink: 0;
}
.recent-clear-btn:hover { color: var(--accent-color); }

/* ============================================================
   POPULAR SEARCHES GRID
   ============================================================ */
.popular-grid-label {
    color: rgba(234,234,234,0.35);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.popular-searches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto;
}

.popular-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(20,16,6,0.75);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 40px;
    padding: 9px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    color: rgba(234,234,234,0.75);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
}

.popular-card:hover {
    background: rgba(156,125,74,0.2);
    border-color: var(--primary-color);
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.pop-icon { font-size: 1.05rem; }
.pop-label { letter-spacing: 0.3px; }

/* ============================================================
   SEARCH RESULTS — HEADER / SORT
   ============================================================ */
.search-results-section {
    padding: 60px 0 80px;
    min-height: 200px;
}

.results-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.results-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 4px;
}

.results-query-text {
    color: var(--accent-color);
}

.results-count-text {
    color: rgba(234,234,234,0.5);
    font-size: 0.88rem;
    margin: 0;
}

.results-sort-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    color: rgba(234,234,234,0.5);
    font-size: 0.8rem;
    white-space: nowrap;
}

.custom-sort-dropdown {
    position: relative;
    flex: 1;
    min-width: 170px;
    user-select: none;
}

.custom-sort-selected {
    background: rgba(20,16,6,0.9);
    border: 1px solid rgba(156,125,74,0.3);
    color: var(--accent-color);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-sort-selected::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: rgba(156,125,74,0.8);
    transition: transform 0.3s ease;
}

.custom-sort-dropdown.open .custom-sort-selected {
    border-color: var(--primary-color);
}

.custom-sort-dropdown.open .custom-sort-selected::after {
    transform: rotate(180deg);
}

.custom-sort-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20,16,6,0.98);
    border: 1px solid rgba(156,125,74,0.3);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    overflow: hidden;
    margin-top: -2px;
}

.custom-sort-dropdown.open .custom-sort-options {
    display: block;
    animation: fadeInDrop 0.2s ease forwards;
}

@keyframes fadeInDrop {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-sort-option {
    padding: 10px 14px;
    color: rgba(234,234,234,0.7);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.custom-sort-option:hover,
.custom-sort-option.selected {
    background: rgba(156,125,74,0.15);
    color: var(--primary-color);
}

/* ============================================================
   FILTER CHIPS
   ============================================================ */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.filter-chip {
    background: rgba(156,125,74,0.08);
    color: rgba(234,234,234,0.65);
    padding: 7px 18px;
    border-radius: 25px;
    font-size: 0.82rem;
    border: 1px solid rgba(156,125,74,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #1a1a1a;
    font-weight: 600;
}

.filter-chip:focus-visible {
    outline: 2px solid #143d4a;
    outline-offset: 3px;
}

/* ============================================================
   SEARCH RESULT CARDS
   ============================================================ */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.search-result-item {
    background: linear-gradient(135deg, #1e1e1e, #252525);
    border: 1px solid rgba(156,125,74,0.2);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    animation: resultFadeIn 0.4s ease both;
}

@keyframes resultFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.search-result-item:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 16px 50px rgba(156,125,74,0.2);
}

.search-result-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.search-result-item:hover .search-result-image img {
    transform: scale(1.06);
}

.search-result-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-type {
    background: rgba(10,8,4,0.85);
    border: 1px solid rgba(156,125,74,0.4);
    color: var(--accent-color);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.badge-chef {
    background: linear-gradient(135deg, #d4af37, #c5a572);
    color: #1a1a1a;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.search-result-content {
    padding: 18px 20px;
}

a.search-result-item { color: inherit; text-decoration: none; }
a.search-result-item:focus-visible { outline: 3px solid #cf6345; outline-offset: 4px; }
.search-result-name a { color:inherit; text-decoration:none; }
.search-result-name a:hover { text-decoration:underline; }
.search-result-go { text-decoration:none; }
.search-result-badge { pointer-events:none; }
.search-result-placeholder { display: grid; place-items: center; height: 100%; font-size: 3rem; background: #e9f4f1; }
.search-result-package-note { margin: 0 0 8px; color: #63777a; font-size: .72rem; }
#searchLoadStatus { color: #9a482f; font-size: .85rem; }

.search-result-name {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 4px;
    font-weight: 700;
}

.search-result-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.search-result-price {
    background: var(--primary-color);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
}

.search-result-category-chip {
    background: rgba(156,125,74,0.12);
    border: 1px solid rgba(156,125,74,0.25);
    color: var(--accent-color);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.search-result-description {
    color: rgba(234,234,234,0.6);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(156,125,74,0.1);
}

.search-result-tags {
    color: rgba(234,234,234,0.3);
    font-size: 0.72rem;
}

.search-result-go {
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.search-result-item:hover .search-result-go {
    gap: 8px;
}

/* ============================================================
   NO RESULTS STATE
   ============================================================ */
.no-results-state {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
    animation: floatIcon 3s ease-in-out infinite;
}

.no-results-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.no-results-q { color: var(--accent-color); }

.no-results-sub {
    color: rgba(234,234,234,0.5);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.no-results-suggestions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 8px;
}

.suggestion-tag {
    background: rgba(156,125,74,0.1);
    border: 1px solid rgba(156,125,74,0.25);
    color: var(--accent-color);
    font-size: 0.88rem;
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}

.suggestion-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #1a1a1a;
    transform: translateY(-2px);
}

.no-results-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .search-page-hero { min-height: 55vh; }
    .search-results-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
}

@media (max-width: 768px) {
    .search-page-hero { min-height: 50vh; padding: 80px 16px 40px; }
    .results-meta-row { flex-direction: column; align-items: stretch; gap: 14px; }
    .results-sort-wrap { width: 100%; justify-content: space-between; }
    .custom-sort-dropdown { flex: 1; margin-left: 10px; }
    .custom-sort-selected { font-size: 0.8rem; }
    .search-results-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .no-results-links { flex-direction: column; align-items: stretch; gap: 12px; }
    .no-results-links a { width: 100%; text-align: center; margin: 0 !important; }
    .popular-card { padding: 6px 12px; font-size: 0.8rem; }
    .pop-icon { font-size: 0.9rem; }
    .filter-chip { padding: 6px 14px; font-size: 0.78rem; }
}

@media (max-width: 576px) {
    .search-page-hero { padding: 80px 16px 60px; height: auto; align-items: flex-start; }
    .search-hero-box { margin-bottom: 24px; }
    .search-hero-input-wrap { padding: 10px 16px; }
    .search-hero-input { font-size: 0.95rem; }
    .hero-title { font-size: 2rem !important; line-height: 1.2; }
    .hero-subtitle { font-size: 0.85rem !important; }
    
    /* Fix for Recent Searches layout on mobile */
    .recent-searches-wrap {
        position: relative;
        padding: 40px 16px 16px;
        justify-content: center;
    }
    .recent-searches-label {
        position: absolute;
        top: 14px;
        left: 16px;
    }
    .recent-clear-btn {
        position: absolute;
        top: 12px;
        right: 16px;
    }
    .recent-searches-chips {
        justify-content: center;
        width: 100%;
        flex: none;
    }

    .search-results-grid { grid-template-columns: 1fr; }
    .results-title { font-size: 1.3rem; }
    .suggestion-tag { padding: 6px 12px; font-size: 0.8rem; }
    .search-result-image { height: 160px; }
}

/* Search page uses the same coastal design system as the staff workspace. */
.search-page-hero {
    min-height: 540px;
    background:
        linear-gradient(90deg, rgba(8, 41, 51, .75), rgba(15, 60, 73, .48)),
        url('images/site/bg_image.png') center 55% / cover no-repeat !important;
}
.search-page-hero .hero-badge {
    color: #143d4a !important;
    background: rgba(255, 253, 248, .95) !important;
    border-color: rgba(255, 253, 248, .8) !important;
    border-radius: 999px;
}
.search-page-hero .hero-title { color: #fffdf8 !important; text-shadow: 0 4px 20px rgba(1, 25, 32, .32); }
.search-page-hero .hero-title::after { height: 4px; border-radius: 99px; background: #e56b4f; }
.search-page-hero .hero-title-accent { color: #ffd4c8 !important; }
.search-page-hero .hero-subtitle { color: rgba(255, 253, 248, .94) !important; }
.search-page-hero .search-hero-input-wrap {
    background: rgba(255, 253, 248, .96) !important;
    border-color: rgba(255, 253, 248, .9) !important;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(2, 31, 39, .18);
}
.search-page-hero .search-hero-input { color: #143d4a !important; }
.search-page-hero .search-hero-input::placeholder { color: #63777a; }
.search-page-hero .search-hero-icon, .search-page-hero .search-hero-clear { color: #e56b4f !important; }
.search-page-hero .popular-grid-label { color: rgba(255, 253, 248, .82) !important; }
.search-page-hero .popular-card {
    color: #143d4a !important;
    background: rgba(255, 253, 248, .92) !important;
    border-color: transparent !important;
    border-radius: 999px;
}
.search-page-hero .popular-card:hover { background: #e2f3f0 !important; }
.search-results-section { background: linear-gradient(135deg, #f8f1e5 0%, #e5f2ef 52%, #f9e5d8 100%) !important; }
.results-title, .search-result-name, .no-results-title { color: #143d4a !important; }
.results-query-text, .search-result-go, .no-results-q { color: #c9533b !important; }
.results-count-text, .search-result-description, .no-results-sub { color: #63777a !important; }
.search-result-item {
    background: rgba(255, 253, 248, .92) !important;
    border-color: rgba(20, 61, 74, .14) !important;
    box-shadow: 0 8px 24px rgba(20, 61, 74, .07) !important;
}
.search-result-item:hover { border-color: #5daeb1 !important; box-shadow: 0 14px 28px rgba(20, 61, 74, .13) !important; }
.search-result-price { background: #e56b4f !important; color: #fff !important; }
.search-result-category-chip, .filter-chip, .suggestion-tag {
    color: #36565d !important;
    background: #fffdf8 !important;
    border-color: rgba(20, 61, 74, .16) !important;
}
.filter-chip.active, .filter-chip:hover, .suggestion-tag:hover { background: #e56b4f !important; border-color: #e56b4f !important; color: #fff !important; }
.custom-sort-selected, .custom-sort-options { background: #fffdf8 !important; color: #36565d !important; border-color: rgba(20, 61, 74, .16) !important; }
.custom-sort-option { color: #36565d; }
.custom-sort-options { box-shadow: 0 8px 24px rgba(20, 61, 74, .16); }
.custom-sort-option:hover, .custom-sort-option.selected { background: #e2f3f0 !important; color: #143d4a !important; }
