/* SmartSearch 2026-11-12. Цвета через переменные — на другом сайте достаточно переопределить --ss-accent. */
.ss-form {
    --ss-accent: #F60;
    --ss-accent-soft: #FFF1E6;
    --ss-text: #222;
    --ss-muted: #7A7A7A;
    --ss-line: #E8E8E8;
    --ss-bg: #FFF;
    --ss-hover: #FFF6EE;
    --ss-mark: #FFE0C2;
    --ss-sale: #D0021B;
}
.ss-mbar { display: none; }
.ss-form.ss-open { z-index: 10010000; }
.ss-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    background: rgba(20, 20, 20, .35);
}
.ss-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 10010001;
    width: 920px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--ss-bg);
    color: var(--ss-text);
    border: 1px solid var(--ss-line);
    border-top: 2px solid var(--ss-accent);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
}
.ss-progress {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 2px;
    margin-bottom: -2px;
    background: transparent;
    overflow: hidden;
}
.ss-loading .ss-progress::after {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    background: var(--ss-accent);
    animation: ss-run 1s ease-in-out infinite;
}
@keyframes ss-run { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.ss-list {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
}
.ss-list.ss-one { grid-template-columns: minmax(0, 1fr); }
.ss-col { min-width: 0; padding: 10px 12px 12px; }
.ss-left { background: #FAFAFA; border-right: 1px solid var(--ss-line); }
.ss-one .ss-left { border-right: 0; }
.ss-fixed, .ss-all { grid-column: 1 / -1; }
.ss-sec + .ss-sec { margin-top: 12px; }
.ss-h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 4px 6px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ss-muted);
}
.ss-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--ss-text);
    text-decoration: none;
    cursor: pointer;
}
.ss-opt:hover, .ss-opt.ss-act { background: var(--ss-hover); color: var(--ss-text); }
.ss-opt.ss-act { box-shadow: inset 0 0 0 1px var(--ss-accent); }
.ss-mark { background: var(--ss-mark); color: inherit; border-radius: 2px; padding: 0; }
.ss-cat-t { flex: 1; min-width: 0; }
.ss-n {
    flex: 0 0 auto;
    color: var(--ss-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.ss-q::before {
    content: '';
    flex: 0 0 14px;
    height: 14px;
    border: 2px solid #BBB;
    border-radius: 50%;
    box-sizing: border-box;
}
.ss-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.ss-chip {
    display: inline-flex;
    gap: 6px;
    min-height: 32px;
    padding: 4px 6px 4px 12px;
    border: 1px solid var(--ss-line);
    border-radius: 16px;
    background: var(--ss-bg);
}
.ss-brand { padding-right: 12px; }
.ss-hist-rm {
    padding: 0 6px;
    border: 0;
    background: none;
    color: var(--ss-muted);
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.ss-hist-rm:hover { color: var(--ss-accent); }
.ss-clear { font-size: 11px; letter-spacing: .04em; text-transform: none; }
.ss-prod { gap: 12px; padding: 6px 8px; }
.ss-img {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #F3F3F3;
    overflow: hidden;
}
.ss-img img { display: block; width: 48px; height: 48px; object-fit: contain; }
.ss-ptxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ss-ptitle {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ss-pmeta { font-size: 12px; color: var(--ss-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-price {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    white-space: nowrap;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.ss-price b { font-size: 15px; }
.ss-price s { color: var(--ss-muted); font-size: 11px; }
.ss-sale b { color: var(--ss-sale); }
.ss-fixed {
    margin: 10px 12px 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--ss-accent-soft);
    font-size: 13px;
}
.ss-none { padding: 18px 8px; color: var(--ss-muted); }
.ss-all {
    justify-content: space-between;
    margin: 0;
    padding: 11px 18px;
    border-top: 1px solid var(--ss-line);
    border-radius: 0;
    color: var(--ss-accent);
    font-weight: 700;
}
.ss-all:hover, .ss-all.ss-act { color: var(--ss-accent); }
.ss-kbd { color: var(--ss-muted); font-weight: 400; font-size: 12px; }
.ss-skeleton {
    height: 160px;
    border-radius: 6px;
    background: linear-gradient(90deg, #F2F2F2 25%, #FAFAFA 50%, #F2F2F2 75%) 0 0 / 200% 100%;
    animation: ss-sk 1.2s linear infinite;
}
@keyframes ss-sk { to { background-position: -200% 0; } }

/* ---------- мобильный: поиск на весь экран ---------- */
@media (max-width: 768px) {
    html.ss-lock, html.ss-lock body { overflow: hidden; }
    .ss-form.ss-open {
        position: fixed !important;
        inset: 0;
        z-index: 10010000;
        margin: 0 !important;
        padding: 10px 12px 10px 56px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
        background: var(--ss-bg);
        height: auto;
    }
    .ss-form.ss-open input[name="search"] {
        height: 44px;
        line-height: 42px;
        font-size: 16px;
        padding-right: 44px;
        border-color: var(--ss-accent);
        border-radius: 8px;
    }
    .ss-form.ss-open [type="submit"] {
        top: calc(24px + env(safe-area-inset-top, 0px));
        right: 26px;
    }
    .ss-form.ss-open .ss-mbar {
        display: block;
        position: absolute;
        left: 6px;
        top: calc(10px + env(safe-area-inset-top, 0px));
    }
    .ss-back {
        width: 44px;
        height: 44px;
        border: 0;
        background: none;
        cursor: pointer;
        position: relative;
    }
    .ss-back::before {
        content: '';
        position: absolute;
        left: 17px;
        top: 16px;
        width: 11px;
        height: 11px;
        border-left: 2px solid var(--ss-text);
        border-bottom: 2px solid var(--ss-text);
        transform: rotate(45deg);
    }
    .ss-panel {
        position: absolute;
        top: calc(64px + env(safe-area-inset-top, 0px));
        left: 0 !important;
        right: 0;
        bottom: 0;
        width: auto !important;
        max-width: none;
        max-height: none;
        border: 0;
        border-top: 1px solid var(--ss-line);
        border-radius: 0;
        box-shadow: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .ss-list { grid-template-columns: minmax(0, 1fr); }
    .ss-left { background: none; border-right: 0; padding-bottom: 0; }
    .ss-opt { min-height: 44px; }
    .ss-chip { min-height: 36px; }
    .ss-kbd { display: none; }
    .ss-all { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .ss-loading .ss-progress::after, .ss-skeleton { animation: none; }
}
