@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600&display=swap');

/* ── Default / fullwidth wrap ── */
.bss-wrap {
    position: relative;
    font-family: 'Figtree', sans-serif;
    width: 100%;
    max-width: 600px;
    z-index: 9990;
}
.bss-style-fullwidth { max-width: 100% !important; }
.bss-style-minimal   { max-width: 400px; }

.bss-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: border-color .2s, box-shadow .2s;
}
.bss-wrap.active .bss-input-wrap {
    border-color: #111;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.bss-icon-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    transition: color .2s;
    z-index: 1;
}
.bss-wrap .bss-input {
    width: 100%;
    padding: 13px 40px 13px 46px;
    border: none;
    outline: none;
    font-family: 'Figtree', sans-serif;
    font-size: 14px;
    color: #111;
    background: transparent;
    letter-spacing: .02em;
    position: relative;
    z-index: 2;
}
.bss-wrap .bss-input::placeholder { color: #aaa; }
.bss-wrap .bss-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: none;
    z-index: 2;
}
.bss-clear.visible { display: block !important; }
.bss-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 9989;
}
.bss-backdrop.visible { display: block; }

/* ── Dropdown (default style) ── */
.bss-wrap .bss-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    z-index: 9991;
    max-height: 520px;
    overflow-y: auto;
}
.bss-wrap .bss-dropdown:empty { display: none; }

/* ── Icon trigger ── */
.bss-icon-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    padding: 4px;
    transition: opacity .2s;
    background: none;
    border: none;
}
.bss-icon-trigger:hover { opacity: .7; }

/* ── Icon overlay – fullscreen ── */
.bss-icon-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 99999;
    background: #fff;
    flex-direction: column;
}
.bss-icon-overlay.open {
    display: flex;
}
.bss-modal {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bss-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 56px;
    min-height: 56px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.bss-modal-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bss-modal-input-wrap svg { color: #aaa; flex-shrink: 0; }
.bss-modal-input-wrap .bss-input {
    flex: 1;
    padding: 0;
    font-size: 15px;
    border: none;
    outline: none;
    font-family: 'Figtree', sans-serif;
    background: transparent;
    color: #111;
}
.bss-modal-input-wrap .bss-input::placeholder { color: #bbb; }
.bss-modal-input-wrap .bss-clear {
    background: none;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: none;
    position: static;
    transform: none;
}
.bss-modal-cancel {
    font-family: 'Figtree', sans-serif;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .15s;
}
.bss-modal-cancel:hover { color: #111; }
.bss-icon-overlay .bss-dropdown {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}
.bss-icon-overlay .bss-dropdown:empty { display: block; }

/* ── Shared product styles ── */
.bss-col-right { padding: 12px 0; }
.bss-col-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #aaa;
    padding: 0 16px 8px;
}
.bss-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    transition: background .12s;
}
.bss-product-item:hover { background: #f8f8f8; }
.bss-prod-img {
    width: 52px;
    height: 64px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f5f5f3;
}
.bss-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.bss-prod-info { flex: 1; min-width: 0; }
.bss-prod-brand {
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 2px;
}
.bss-prod-name {
    font-size: 13px;
    color: #111;
    line-height: 1.35;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bss-prod-price { font-size: 13px; font-weight: 500; color: #111; }
.bss-prod-price del { color: #bbb; font-weight: 400; font-size: 11px; margin-right: 3px; }
.bss-prod-price ins { text-decoration: none; color: #c0392b; }

.bss-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 16px;
    background: #fafafa;
}
.bss-see-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #111;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 500;
}
.bss-see-all-count { font-size: 11px; color: #888; font-weight: 400; text-transform: none; }
.bss-loading {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #aaa;
    font-size: 13px;
}
.bss-spinner {
    width: 16px;
    height: 16px;
    border: 1.5px solid #e0e0e0;
    border-top-color: #111;
    border-radius: 50%;
    animation: bss-spin .6s linear infinite;
}
@keyframes bss-spin { to { transform: rotate(360deg); } }
.bss-empty {
    padding: 32px 20px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
}
.bss-empty-title { font-size: 13px; color: #666; }
