

:root {
    --srch-brand: #ef5526;
    --srch-brand-dark: #d8451f;
    --srch-brand-soft: #fff5f0;
    --srch-text: #1f2937;
    --srch-text-muted: #6b7280;
    --srch-border: #e5e7eb;
    --srch-border-soft: #f1f3f5;
    --srch-bg: #ffffff;
    --srch-bg-soft: #f7f8fa;
    --srch-radius: 14px;
    --srch-radius-pill: 999px;
    --srch-ease: cubic-bezier(.22, 1, .36, 1);
}


#searchForm.header-search {
    position: relative !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 720px !important;
    min-width: 0 !important;
    margin: 0 24px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

#searchForm.header-search .form-control,
#searchForm.header-search input#search {
    height: 44px !important;
    width: 100% !important;
    padding: 0 54px 0 20px !important;
    margin: 0 !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--srch-text) !important;
    background: var(--srch-bg) !important;
    border: 1px solid var(--srch-border) !important;
    border-radius: var(--srch-radius-pill) !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color .18s var(--srch-ease),
                box-shadow .18s var(--srch-ease) !important;
}

#searchForm.header-search input#search::placeholder {
    color: #9ca3af !important;
}

#searchForm.header-search input#search:hover {
    border-color: #d1d5db !important;
}

#searchForm.header-search input#search:focus {
    border-color: var(--srch-brand) !important;
    box-shadow: 0 0 0 3px rgba(239, 85, 38, .12) !important;
}

#searchForm.header-search .btn.btn-search {
    position: absolute !important;
    top: 50% !important;
    right: 5px !important;
    transform: translateY(-50%);
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--srch-brand) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    box-shadow: 0 4px 10px -4px rgba(239, 85, 38, .55);
    transition: background .18s var(--srch-ease), transform .15s var(--srch-ease);
}

#searchForm.header-search .btn.btn-search:hover {
    background: var(--srch-brand-dark) !important;
    transform: translateY(-50%) scale(1.06);
}

#searchForm.header-search .btn.btn-search i,
#searchForm.header-search .btn.btn-search .w-icon-search {
    font-size: 14px !important;
    color: #fff !important;
    line-height: 1 !important;
}


#searchDropdown.search-dropdown {
    position: fixed !important;
    top: 80px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(920px, 90vw) !important;
    max-width: 90vw !important;
    max-height: calc(100vh - 120px) !important;
    background: var(--srch-bg) !important;
    border: 1px solid var(--srch-border) !important;
    border-radius: 16px !important;
    padding: 0 !important;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .22),
                0 8px 16px -8px rgba(15, 23, 42, .08) !important;
    z-index: 9999 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transform-origin: top center;
    display: none;        
    flex-direction: column;
    
}


.search-modal-header {
    display: block;
    padding: 0;
    background: transparent;
}

.search-modal-input-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.search-modal-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
    transition: color .15s var(--srch-ease);
}

.search-modal-input-wrap:focus-within .search-modal-icon {
    color: var(--srch-brand);
}

.search-modal-input {
    width: 100%;
    height: 60px;
    padding: 0 24px 0 52px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--srch-text);
    background: #ffffff;
    border: none;
    border-radius: 16px 16px 0 0;   
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    display: block;
    margin: 0;
    transition: background .15s var(--srch-ease);
}

.search-modal-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-modal-input:focus {
    background: #fffaf7;
}


.search-rainbow-line {
    height: 4px;
    width: 100%;
    margin: 0;
    background: #ef5526;
    border-radius: 0;
    flex-shrink: 0;
}


.search-dropdown-grid {
    padding: 22px 24px 24px !important;
    overflow-y: auto;
    flex: 1 1 auto;
}


#searchForm.header-search input#search,
#searchForm.header-search .btn.btn-search {
    transition: opacity .22s cubic-bezier(.4, 0, .2, 1),
                transform .22s cubic-bezier(.4, 0, .2, 1) !important;
}

body.search-open #searchForm.header-search input#search,
body.search-open #searchForm.header-search .btn.btn-search {
    opacity: 0 !important;
    transform: scale(0.95) !important;
    pointer-events: none !important;
}

body.search-open #searchForm.header-search .btn.btn-search {
    transform: translateY(-50%) scale(0.92) !important;   
}


.search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 9990;
    display: none;
    animation: srchFadeIn .18s var(--srch-ease) both;
}

.search-backdrop.active {
    display: block;
}

@keyframes srchFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}


body.search-open .header-middle,
body.search-open .header .header-left,
body.search-open .header .inner-wrap,
body.search-open .header-middle .container,
body.search-open #searchForm.header-search {
    position: relative !important;
    z-index: 9995 !important;
}

body.search-open #searchForm.header-search input#search {
    border-color: var(--srch-brand) !important;
    box-shadow: 0 0 0 3px rgba(239, 85, 38, .15),
                0 8px 24px -8px rgba(15, 23, 42, .15) !important;
}

body.search-open .header-right,
body.search-open .top-bar,
body.search-open .header-bottom,
body.search-open .header-bottom.sticky-content,
body.search-open .header-bottom.fix-top,
body.search-open .header-bottom.sticky-header {
    position: relative !important;
    z-index: 0 !important;
}


body.search-open .main-nav,
body.search-open .mega-fixed-dropdown {
    z-index: 0 !important;
}


body.search-open {
    overflow: hidden;
}

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


.search-dropdown-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 0;
}

.search-left {
    padding: 0 18px 0 20px;
    border-right: 1px solid var(--srch-border-soft);
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.search-right {
    padding: 0 20px 0 18px;
    min-width: 0;
}

.search-section h5 {
    margin: 0 0 12px;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.2;
    border: none;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.search-section-header h5 { margin: 0; }

#clearSearchHistoryBtn {
    background: transparent !important;
    border: none !important;
    padding: 4px 0 !important;
    color: var(--srch-brand) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: color .15s var(--srch-ease);
}

#clearSearchHistoryBtn:hover {
    color: var(--srch-brand-dark) !important;
    text-decoration: underline;
    background: transparent !important;
}

.search-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-item {
    list-style: none;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    background: var(--srch-bg-soft);
    border: 1px solid var(--srch-border);
    border-radius: 999px;
    transition: background .15s var(--srch-ease), border-color .15s var(--srch-ease);
}

.search-history-item:hover {
    background: var(--srch-brand-soft);
    border-color: var(--srch-brand);
}

.search-history-term {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 4px 7px 13px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--srch-text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    min-width: 0;
}

.search-history-term i {
    color: #9ca3af;
    font-size: 11px;
    flex: 0 0 auto;
}

.search-history-term span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
    min-width: 0;
}

.search-history-remove {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s var(--srch-ease), background .15s var(--srch-ease);
    flex: 0 0 auto;
}

.search-history-remove i { font-size: 11px; }

.search-history-remove:hover {
    color: #fff;
    background: var(--srch-brand);
}


.suggestion-didyoumean .suggestion-icon i { color: var(--srch-brand); }
.suggestion-didyoumean strong { color: var(--srch-brand); font-weight: 700; }

.popular-searches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-search-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--srch-bg-soft);
    color: var(--srch-text);
    border: 1px solid var(--srch-border);
    border-radius: var(--srch-radius-pill);
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    transition: background .15s var(--srch-ease),
                color .15s var(--srch-ease),
                border-color .15s var(--srch-ease);
}

.popular-search-pill i {
    font-size: 10px;
    color: #9ca3af;
    transition: color .15s var(--srch-ease);
}

.popular-search-pill:hover {
    background: var(--srch-brand-soft);
    color: var(--srch-brand-dark);
    border-color: rgba(239, 85, 38, .3);
}

.popular-search-pill:hover i {
    color: var(--srch-brand);
}


.recently-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 420px;
    overflow-y: auto;
    margin: 0 -6px;
    padding: 0 6px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.recently-viewed-list::-webkit-scrollbar { width: 6px; }
.recently-viewed-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
.recently-viewed-list::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

.recently-viewed-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    text-decoration: none !important;
    color: inherit !important;
    transition: background .15s var(--srch-ease);
}

.recently-viewed-card:hover {
    background: var(--srch-brand-soft);
}

.rv-image {
    width: 56px;
    height: 56px;
    background: var(--srch-bg-soft);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    box-sizing: border-box;
}

.rv-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.rv-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rv-title {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--srch-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rv-price {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--srch-brand);
    letter-spacing: 0;
}

.rv-cart {
    width: 36px;
    height: 36px;
    border: 1px solid var(--srch-border);
    background: #fff;
    color: var(--srch-text);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s var(--srch-ease),
                color .15s var(--srch-ease),
                border-color .15s var(--srch-ease),
                transform .15s var(--srch-ease);
    flex: 0 0 auto;
}

.rv-cart i { font-size: 13px; }

.rv-cart:hover {
    background: var(--srch-brand);
    color: #fff;
    border-color: var(--srch-brand);
    transform: scale(1.05);
}

.recently-viewed-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 12px;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    background: var(--srch-bg-soft);
    border-radius: 10px;
}

.recently-viewed-empty i { font-size: 14px; }

.suggestions-list {
    list-style: none;
    margin: 0 -8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.suggestions-list::-webkit-scrollbar { width: 6px; }
.suggestions-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }

.suggestions-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 7px 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: var(--srch-text);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 8px;
    transition: background .15s var(--srch-ease), color .15s var(--srch-ease);
}

.suggestion-icon,
.suggestion-thumb {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

.suggestion-icon {
    color: #9ca3af;
    font-size: 13px;
    background: transparent;
    transition: color .15s var(--srch-ease);
}

.suggestion-icon i { font-size: 13px; }

.suggestion-thumb {
    background: var(--srch-bg-soft);
    padding: 3px;
    border: 1px solid var(--srch-border-soft);
}

.suggestion-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.suggestion-thumb i {
    color: #cbd5e1;
    font-size: 16px;
}

.suggestion-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-item:hover {
    background: var(--srch-brand-soft);
    color: var(--srch-brand-dark);
}

.suggestion-item:hover .suggestion-icon {
    color: var(--srch-brand);
}

.suggestion-item:hover .suggestion-thumb {
    border-color: rgba(239, 85, 38, .25);
}

.suggestions-empty {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}


@media (max-width: 767.98px) {
    #searchDropdown.search-dropdown {
        width: min(95vw, 100%) !important;
    }

    .search-dropdown-grid {
        grid-template-columns: 1fr;
    }

    .search-left {
        border-right: none;
        border-bottom: 1px solid var(--srch-border-soft);
        padding: 0 16px 16px;
    }

    .search-right {
        padding: 16px 16px 0;
    }
}

@media (max-width: 991.98px) {
    #searchForm.header-search {
        margin: 0 12px !important;
    }
}


.header-middle {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #fff;
    transition: box-shadow .25s ease;
    will-change: box-shadow;
}

    .header-middle.is-stuck {
        box-shadow: 0 4px 16px rgba(17, 24, 39, .08);
    }

.top-bar {
    position: relative;
    z-index: 1;
}

.header,
.page-wrapper,
body,
html {
    overflow: visible !important;
}

.search-dropdown,
.header-location-dropdown {
    z-index: 1060;
}

