:root {
    --scm-navy: #0A0E19;
    --scm-navy-2: #101627;
    --scm-steel: #7C8798;
    --scm-steel-line: #232B3D;
    --scm-gold: #F5C800;
    --scm-gold-2: #C99A00;
    --scm-white: #FFFFFF;
}

.scm-search {
    position: relative;
    z-index: 999999;
    max-width: 640px;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.scm-search-bar {
    display: flex;
    background: var(--scm-navy-2);
    border: 1px solid var(--scm-steel-line);
    border-radius: 2px;
}

.scm-search-input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--scm-white);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 16px 18px;
    outline: none;
}

.scm-search-input::placeholder {
    color: var(--scm-steel);
}

.scm-search-btn {
    flex: none;
    background: var(--scm-gold);
    color: var(--scm-navy);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.scm-search-btn:hover {
    background: var(--scm-gold-2);
}

.scm-search-results {
    position: fixed;
    z-index: 999999;
    background: var(--scm-navy-2);
    border: 1px solid var(--scm-steel-line);
    border-radius: 2px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    min-height: 620px;
    max-height: min(420px, 70vh);
    overflow-y: auto;
}

.scm-search-results.d-none {
    display: none;
}

/* Bootstrap-equivalent position utilities, defined locally rather than
   pulling the full Bootstrap CDN bundle onto the live front-end (which
   would reset table/heading/link/button styling sitewide). Same class
   names and behavior as Bootstrap 5 — used purely for positioning the
   dropdown, toggled by search.js. */
.position-fixed {
    position: fixed !important;
}
.start-50 {
    left: 50% !important;
}
.translate-middle-x {
    transform: translateX(-50%) !important;
}

.scm-search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--scm-white);
    border-bottom: 1px solid var(--scm-steel-line);
    transition: background-color 0.1s ease;
}

.scm-search-item:last-child {
    border-bottom: none;
}

.scm-search-item:hover,
.scm-search-item:focus {
    background: rgba(245, 200, 0, 0.08);
}

.scm-search-item--disabled {
    cursor: default;
    opacity: 0.6;
}

.scm-search-item--disabled:hover {
    background: transparent;
}

.scm-search-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 2px;
    flex: none;
    background: var(--scm-navy);
}

.scm-search-thumb--empty {
    display: block;
}

.scm-search-item-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scm-search-item-title {
    display: block;
    width: 100%;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scm-search-item-type {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 10.5px;
    color: var(--scm-steel);
}

.scm-search-item-meta {
    flex: none;
    font-weight: 700;
    color: var(--scm-gold);
    font-size: 14px;
}

.scm-search-empty {
    padding: 16px 18px;
    color: var(--scm-steel);
    font-size: 14px;
}

/* ---- Responsive layout switch ----
   Mobile (< 780px): flat row list, as built originally.
   Desktop (>= 780px): two-column panel — text suggestions on the left,
   an image grid of results on the right (a la major storefront search UX). */

.scm-search-desktop-panel {
    display: none;
}

@media (min-width: 780px) {
    .scm-search-mobile-list {
        display: none;
    }

    .scm-search-results {
        max-height: calc(100vh - 24px);
        overflow: hidden;
    }

    .scm-search-desktop-panel {
        display: grid;
        grid-template-columns: 230px 1fr;
        gap: 0;
    }

    .scm-search-side-col {
        padding: 20px 18px;
        border-right: 1px solid var(--scm-steel-line);
    }

    .scm-search-main-col {
        padding: 20px 24px;
        min-width: 0;
        max-height: min(520px, 60vh);
        overflow-y: auto;
    }

    .scm-search-col-label {
        font-family: 'IBM Plex Mono', monospace;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-size: 11px;
        color: var(--scm-gold);
        margin-bottom: 14px;
    }

    .scm-suggestion-link {
        display: block;
        color: var(--scm-white);
        text-decoration: none;
        font-size: 14px;
        padding: 8px 0;
        line-height: 1.4;
    }

    .scm-suggestion-link:hover {
        color: var(--scm-gold);
    }

    .scm-search-group {
        margin-bottom: 22px;
    }

    .scm-search-group:last-child {
        margin-bottom: 0;
    }

    .scm-search-group-label {
        font-family: 'IBM Plex Mono', monospace;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-size: 10.5px;
        color: var(--scm-steel);
        border-bottom: 1px solid var(--scm-steel-line);
        padding-bottom: 8px;
        margin-bottom: 14px;
    }

    .scm-search-products-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .scm-product-card {
        display: flex;
        flex-direction: column;
        text-decoration: none;
        color: var(--scm-white);
    }

    .scm-product-thumb {
        display: block;
        width: 100%;
        height: 90px;
        background: var(--scm-navy);
        border-radius: 2px;
        overflow: hidden;
        margin-bottom: 8px;
    }

    .scm-product-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .scm-product-title {
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .scm-product-meta {
        font-weight: 700;
        color: var(--scm-gold);
        font-size: 12.5px;
        margin-top: 4px;
    }

    .scm-search-footer {
        grid-column: 1 / -1;
        border-top: 1px solid var(--scm-steel-line);
        text-align: center;
        padding: 12px;
        font-family: 'IBM Plex Mono', monospace;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        font-size: 11px;
        color: var(--scm-steel);
    }
}

/* Light variant additions for the desktop panel */
.scm-search--light .scm-search-side-col {
    border-right-color: #EFEBDF;
}
.scm-search--light .scm-search-col-label {
    color: var(--scm-gold-2);
}
.scm-search--light .scm-suggestion-link {
    color: var(--scm-navy);
}
.scm-search--light .scm-search-group-label {
    color: #9A9488;
    border-bottom-color: #EFEBDF;
}
.scm-search--light .scm-product-card {
    color: var(--scm-navy);
}
.scm-search--light .scm-product-thumb {
    background: #F3F1EA;
}
.scm-search--light .scm-search-footer {
    border-top-color: #EFEBDF;
    color: #9A9488;
}

/* Optional light variant: <div class="scm-search scm-search--light"> */
.scm-search--light .scm-search-bar {
    background: var(--scm-white);
    border-color: #DDD8C9;
}
.scm-search--light .scm-search-input {
    color: var(--scm-navy);
}
.scm-search--light .scm-search-input::placeholder {
    color: #9A9488;
}
.scm-search-results.scm-search--light {
    background: var(--scm-white);
    border-color: #DDD8C9;
}
.scm-search--light .scm-search-item {
    color: var(--scm-navy);
    border-bottom-color: #EFEBDF;
}
.scm-search--light .scm-search-item-type {
    color: #9A9488;
}

/* Icon-only search button on mobile -- hides the text label, shows just
   the magnifying glass icon, and shrinks the button to a compact tap
   target. Desktop keeps the original text button unchanged. */
.scm-search-btn-icon {
    display: none;
}

.scm-search-btn-icon {
    display: none;
}

@media (max-width: 779px) {
	.scm-search-input {
		font-size:13px;
	}
    .scm-search-btn-text {
        display: none;
    }
    .scm-search-btn-icon {
        display: block;
        width: 15px;
        height: 15px;
        fill: currentColor;
    }
    .scm-search-btn {
        padding: 0 10px;
    }
    .scm-search {
        max-width: 100%;
        width: 100%;
        flex: 1 1 100%;
        order: 10;
    }
	.scm-search-results {
    width: 90% !important;
    margin: 0 20px;
    left: 0 !important;
}
}