:root {
    --ascopes-search-primary: #ff4b00;
    --ascopes-search-dark: #111827;
    --ascopes-search-panel-bg: #ffffff;
    --ascopes-search-side-bg: #fbfbfc;
    --ascopes-search-border: #e5e7eb;
    --ascopes-search-muted: #667085;
    --ascopes-search-product-name: #09927f;
    --ascopes-search-price: #111827;
    --ascopes-search-button-bg: #ff4b00;
    --ascopes-search-button-text: #ffffff;
    --ascopes-search-stock-in: #16a34a;
    --ascopes-search-stock-out: #dc2626;
    --ascopes-search-overlay: rgba(17,24,39,.28);
    --ascopes-search-width: 920px;
    --ascopes-search-radius: 16px;
}
.ascopes-xsearch-overlay {
    position: fixed;
    inset: 0;
    background: var(--ascopes-search-overlay);
    z-index: 8998;
}
.ascopes-xsearch-panel {
    position: absolute;
    z-index: 8999;
    max-width: calc(100vw - 30px);
    background: var(--ascopes-search-panel-bg);
    border: 1px solid var(--ascopes-search-border);
    border-top: 3px solid var(--ascopes-search-primary);
    box-shadow: 0 22px 55px rgba(17,24,39,.24);
    border-radius: 0 0 var(--ascopes-search-radius) var(--ascopes-search-radius);
    overflow: hidden;
    font-family: inherit;
}
.ascopes-xsearch-panel.no-shadow {
    box-shadow: none;
}
.ascopes-xsearch-panel.is-loading:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ascopes-search-primary), transparent);
    animation: ascopesSearchLoading 1s infinite linear;
    z-index: 2;
}
@keyframes ascopesSearchLoading {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
.ascopes-xsearch-loading {
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ascopes-xsearch-loading span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--ascopes-search-primary);
    opacity: .35;
    animation: ascopesSearchDot .9s infinite alternate;
}
.ascopes-xsearch-loading span:nth-child(2) { animation-delay: .15s; }
.ascopes-xsearch-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes ascopesSearchDot {
    from { transform: translateY(0); opacity: .3; }
    to { transform: translateY(-8px); opacity: 1; }
}
.ascopes-xsearch-shell {
    display: grid;
    grid-template-columns: 230px 1fr;
    min-height: 285px;
}
.ascopes-xsearch-shell.no-side {
    grid-template-columns: 1fr;
}
.ascopes-xsearch-shell.no-side .ascopes-xsearch-main {
    padding-left: 26px;
    padding-right: 26px;
}
.ascopes-xsearch-shell.no-side .ascopes-xsearch-products {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.ascopes-xsearch-side {
    background: var(--ascopes-search-side-bg);
    border-right: 1px solid var(--ascopes-search-border);
    padding: 20px 18px 16px;
}
.ascopes-xsearch-side-section + .ascopes-xsearch-side-section {
    margin-top: 20px;
}
.ascopes-xsearch-side-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
}
.ascopes-xsearch-side-title h4,
.ascopes-xsearch-side h4 {
    color: var(--ascopes-search-dark);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    margin: 0;
}
.ascopes-xsearch-clear-recent {
    border: 0;
    background: transparent;
    color: var(--ascopes-search-primary);
    font-size: 12px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}
.ascopes-xsearch-clear-recent:hover {
    text-decoration: underline;
}
.ascopes-xsearch-term,
.ascopes-xsearch-category {
    display: table;
    border: 0;
    border-radius: 999px;
    padding: 7px 13px;
    margin: 0 0 8px;
    background: #f1f5f9;
    color: #526b68;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: all .16s ease;
}
.ascopes-xsearch-term:hover,
.ascopes-xsearch-category:hover {
    color: var(--ascopes-search-button-text);
    background: var(--ascopes-search-primary);
    text-decoration: none;
    transform: translateY(-1px);
}
.ascopes-xsearch-main {
    padding: 20px 22px 22px;
    min-width: 0;
}
.ascopes-xsearch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.ascopes-xsearch-head strong {
    color: var(--ascopes-search-dark);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
}
.ascopes-xsearch-head span {
    color: var(--ascopes-search-muted);
    font-weight: 500;
}
.ascopes-xsearch-head a {
    color: var(--ascopes-search-primary);
    font-size: 13px;
    text-decoration: none;
}
.ascopes-xsearch-head a:hover {
    text-decoration: underline;
}
.ascopes-xsearch-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 18px;
}
.ascopes-xsearch-product {
    min-width: 0;
    padding: 0 0 4px;
}
.ascopes-xsearch-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    text-decoration: none;
}
.ascopes-xsearch-product-image img {
    display: block;
    max-width: 100%;
    max-height: 116px;
    object-fit: contain;
}
.ascopes-xsearch-product-name {
    display: block;
    color: var(--ascopes-search-product-name);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    min-height: 36px;
    text-decoration: none;
}
.ascopes-xsearch-product-name:hover {
    color: var(--ascopes-search-primary);
    text-decoration: none;
}
.ascopes-xsearch-brand,
.ascopes-xsearch-product-category,
.ascopes-xsearch-desc,
.ascopes-xsearch-sku {
    color: var(--ascopes-search-muted);
    font-size: 12px;
    margin-top: 5px;
}
.ascopes-xsearch-brand {
    color: var(--ascopes-search-dark);
    font-weight: 700;
}
.ascopes-xsearch-product-category {
    font-style: italic;
}
.ascopes-xsearch-desc {
    line-height: 1.35;
    max-height: 34px;
    overflow: hidden;
}
.ascopes-xsearch-stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    margin-top: 6px;
}
.ascopes-xsearch-stock:before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}
.ascopes-xsearch-stock.is-in {
    color: var(--ascopes-search-stock-in);
}
.ascopes-xsearch-stock.is-out {
    color: var(--ascopes-search-stock-out);
}
.ascopes-xsearch-price {
    color: var(--ascopes-search-price);
    font-size: 13px;
    font-weight: 900;
    margin: 7px 0 10px;
}
.ascopes-xsearch-cart,
.ascopes-xsearch-view {
    margin-top: 9px;
}
.ascopes-xsearch-cart button,
.ascopes-xsearch-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 8px;
    border: 1px solid var(--ascopes-search-button-bg);
    background: var(--ascopes-search-button-bg);
    color: var(--ascopes-search-button-text);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s ease;
}
.ascopes-xsearch-cart button:hover,
.ascopes-xsearch-view:hover {
    opacity: .92;
    color: var(--ascopes-search-button-text);
    text-decoration: none;
}
.ascopes-xsearch-empty {
    grid-column: 1 / -1;
    color: var(--ascopes-search-muted);
    background: #f8fafc;
    border: 1px dashed #d0d5dd;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}
@media (max-width: 900px) {
    .ascopes-xsearch-shell {
        grid-template-columns: 1fr;
    }
    .ascopes-xsearch-side {
        border-right: 0;
        border-bottom: 1px solid var(--ascopes-search-border);
    }
    .ascopes-xsearch-products {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
}
@media (max-width: 640px) {
    .ascopes-xsearch-panel {
        position: fixed !important;
        max-width: none;
        max-height: calc(100vh - 90px);
        overflow: auto;
        border-radius: var(--ascopes-search-radius);
    }
    .ascopes-xsearch-shell,
    .ascopes-xsearch-shell.no-side {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .ascopes-xsearch-side {
        padding: 14px 14px 10px;
    }
    .ascopes-xsearch-side-section {
        margin: 0 0 12px;
    }
    .ascopes-xsearch-term,
    .ascopes-xsearch-category {
        display: inline-flex;
        margin: 0 6px 8px 0;
    }
    .ascopes-xsearch-main,
    .ascopes-xsearch-shell.no-side .ascopes-xsearch-main {
        padding: 16px;
    }
    .ascopes-xsearch-products,
    .ascopes-xsearch-shell.no-side .ascopes-xsearch-products {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .ascopes-xsearch-product {
        display: grid;
        grid-template-columns: 96px 1fr;
        column-gap: 12px;
        align-items: start;
    }
    .ascopes-xsearch-product-image {
        grid-row: span 5;
        height: 96px;
        margin-bottom: 0;
    }
    .ascopes-xsearch-product-image img {
        max-height: 92px;
    }
    .ascopes-xsearch-product-name {
        min-height: 0;
    }
}
