:root {
    --sb2g1-c1: #8feaff;
    --sb2g1-c2: #fff7a3;
    --sb2g1-c1-deep: #4dd8f0;
    --sb2g1-c2-deep: #e6d85a;
    --sb2g1-surface: #f7fcfe;
    --sb2g1-surface-wash: linear-gradient(160deg, rgba(143, 234, 255, 0.07) 0%, rgba(255, 247, 163, 0.05) 45%, #f7fcfe 100%);
    --sb2g1-header: linear-gradient(135deg, #0a1622 0%, #0f2836 48%, #123842 100%);
}

.sb2g1-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2147483640;
    padding: 8px 10px;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.sb2g1-bar.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sb2g1-bar.is-hiding {
    opacity: 0;
    transform: translateY(110%);
    transition: transform 0.3s ease-in, opacity 0.25s ease;
}

.sb2g1-bar__container {
    max-width: 580px;
    margin: 0 auto;
    padding: 10px 14px 6px;
    background: linear-gradient(135deg, rgba(143, 234, 255, 0.18), rgba(255, 247, 163, 0.15), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(143, 234, 255, 0.35);
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(143, 234, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sb2g1-bar.is-unlocked .sb2g1-bar__container {
    background: linear-gradient(135deg, rgba(255, 247, 163, 0.35), rgba(143, 234, 255, 0.18), rgba(255, 255, 255, 0.65));
    border-color: rgba(255, 247, 163, 0.5);
    box-shadow:
        0 4px 24px rgba(255, 247, 163, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sb2g1-bar__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sb2g1-bar__icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    animation: sb2g1-wobble 3s ease-in-out infinite;
}

@keyframes sb2g1-wobble {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(6deg) scale(1.05); }
    75% { transform: rotate(-6deg) scale(1.05); }
}

.sb2g1-bar__msg {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb2g1-bar.is-unlocked .sb2g1-bar__msg {
    color: #6a5f12;
    color: color-mix(in srgb, var(--sb2g1-c2-deep) 55%, #1e293b 45%);
}

.sb2g1-bar__dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.sb2g1-bar__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sb2g1-bar__dot.is-done {
    background: var(--sb2g1-c1);
    box-shadow: 0 0 6px rgba(143, 234, 255, 0.5);
    transform: scale(1.2);
}

.sb2g1-bar__dot.is-current {
    background: #fff;
    border: 2px solid var(--sb2g1-c1-deep);
    box-shadow: 0 0 0 2px rgba(143, 234, 255, 0.2);
    animation: sb2g1-pulse 1.8s ease-in-out infinite;
}

.sb2g1-bar.is-unlocked .sb2g1-bar__dot.is-done {
    background: var(--sb2g1-c2);
    box-shadow: 0 0 6px rgba(255, 247, 163, 0.6);
}

@keyframes sb2g1-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(143, 234, 255, 0.2); }
    50% { box-shadow: 0 0 0 5px rgba(143, 234, 255, 0.1); }
}

.sb2g1-bar__cta {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--sb2g1-c1), var(--sb2g1-c2));
    box-shadow: 0 2px 8px rgba(143, 234, 255, 0.35);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    line-height: 1.4;
    cursor: pointer;
}

.sb2g1-bar__cta:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(143, 234, 255, 0.45);
}

.sb2g1-bar.is-unlocked .sb2g1-bar__cta {
    background: linear-gradient(135deg, var(--sb2g1-c2), var(--sb2g1-c1));
    box-shadow: 0 2px 8px rgba(255, 247, 163, 0.4);
}

.sb2g1-bar.is-unlocked .sb2g1-bar__cta:hover {
    box-shadow: 0 6px 20px rgba(255, 247, 163, 0.5);
}

.sb2g1-bar__close {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.3);
    font-size: 14px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.sb2g1-bar__close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.5);
}

.sb2g1-bar__track {
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}

.sb2g1-bar__fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--sb2g1-c1-deep), var(--sb2g1-c1));
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sb2g1-bar.is-unlocked .sb2g1-bar__fill {
    background: linear-gradient(90deg, var(--sb2g1-c1), var(--sb2g1-c2));
}

.sb2g1-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483647;
    pointer-events: none;
    display: none;
}

.sb2g1-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483645;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    pointer-events: none;
    transition: background 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease, visibility 0s linear 0.35s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
}

.sb2g1-popup-overlay.is-open {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
    visibility: visible;
    transition: background 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease, visibility 0s linear 0s;
}

.sb2g1-popup {
    width: 100%;
    max-width: 720px;
    max-height: 80vh;
    background: var(--sb2g1-surface-wash);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(143, 234, 255, 0.3);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 40px rgba(143, 234, 255, 0.12), 0 -2px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

.sb2g1-popup.is-open {
    transform: translateY(0);
}

.sb2g1-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    background: var(--sb2g1-header);
    border-bottom: 2px solid rgba(143, 234, 255, 0.28);
    flex-shrink: 0;
}

.sb2g1-popup__title {
    font-size: 18px;
    font-weight: 700;
    color: #fafefe;
    text-shadow: 0 0 24px rgba(143, 234, 255, 0.15);
    margin: 0;
}

.sb2g1-popup__close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.sb2g1-popup__close:hover {
    background: rgba(143, 234, 255, 0.18);
    color: #fff;
    transform: rotate(90deg);
}

.sb2g1-popup__error {
    padding: 10px 24px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
    animation: sb2g1-slideDown 0.3s ease;
}

@keyframes sb2g1-slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sb2g1-popup__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px 24px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.sb2g1-popup__grid {
    display: grid;
    grid-template-columns: repeat(var(--sb2g1-cols, 3), 1fr);
    gap: 14px;
}

.sb2g1-popup__empty {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    padding: 40px 0;
    grid-column: 1 / -1;
}

.sb2g1-popup__loader {
    display: none;
    justify-content: center;
    padding: 20px;
}

.sb2g1-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(143, 234, 255, 0.25);
    border-top-color: var(--sb2g1-c1-deep);
    border-radius: 50%;
    animation: sb2g1-spin 0.7s linear infinite;
}

@keyframes sb2g1-spin {
    to { transform: rotate(360deg); }
}

.sb2g1-popup__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px 0 4px;
}

.sb2g1-popup__page-btn {
    padding: 8px 20px;
    border: 1px solid rgba(143, 234, 255, 0.3);
    background: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sb2g1-popup__page-btn:hover {
    background: rgba(143, 234, 255, 0.12);
    border-color: var(--sb2g1-c1);
}

.sb2g1-product-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.sb2g1-product-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 28px rgba(143, 234, 255, 0.2);
    border-color: rgba(143, 234, 255, 0.4);
}

.sb2g1-product-card.is-oos {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.sb2g1-product-card.is-selecting {
    opacity: 0.7;
    pointer-events: none;
    animation: sb2g1-cardPulse 0.8s ease infinite;
}

@keyframes sb2g1-cardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.97); }
}

.sb2g1-product-card.is-selected {
    border-color: var(--sb2g1-c1);
    box-shadow:
        0 0 0 2px rgba(143, 234, 255, 0.3),
        0 4px 16px rgba(143, 234, 255, 0.2),
        0 2px 12px rgba(255, 247, 163, 0.12);
}

.sb2g1-product-card__img {
    width: 100%;
    padding-top: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--sb2g1-surface);
    position: relative;
}

.sb2g1-product-card__info {
    padding: 10px 12px 12px;
}

.sb2g1-product-card__name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sb2g1-product-card__price {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sb2g1-product-card__price del {
    color: #cbd5e1;
    font-size: 11px;
}

.sb2g1-product-card__free {
    background: linear-gradient(135deg, var(--sb2g1-c2) 0%, var(--sb2g1-c2-deep) 100%);
    color: #1e293b;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.sb2g1-popup__success {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.sb2g1-popup__success.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.sb2g1-popup__success-content {
    text-align: center;
    animation: sb2g1-successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sb2g1-successPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.sb2g1-popup__success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sb2g1-c1) 0%, var(--sb2g1-c2) 100%);
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(143, 234, 255, 0.35);
}

.sb2g1-popup__success-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.sb2g1-free-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--sb2g1-c2) 0%, var(--sb2g1-c2-deep) 100%);
    color: #1e293b;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 6px;
    line-height: 1.4;
    text-transform: uppercase;
}

.sb2g1-free-cart-item td {
    background: rgba(255, 247, 163, 0.08) !important;
}

@media (max-width: 768px) {
    .sb2g1-popup {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
    }

    .sb2g1-popup__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .sb2g1-popup__header {
        padding: 14px 16px 10px;
    }

    .sb2g1-popup__body {
        padding: 12px 16px 20px;
    }

    .sb2g1-popup__title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .sb2g1-bar {
        padding: 6px 6px;
    }

    .sb2g1-bar__container {
        padding: 8px 10px 5px;
        border-radius: 14px;
    }

    .sb2g1-bar__icon {
        font-size: 16px;
    }

    .sb2g1-bar__msg {
        font-size: 11px;
    }

    .sb2g1-bar__cta {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .sb2g1-bar__dot {
        width: 6px;
        height: 6px;
    }

    .sb2g1-bar__close {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .sb2g1-bar__track {
        height: 2px;
        margin-top: 5px;
    }
}

@media (min-width: 769px) {
    .sb2g1-popup-overlay {
        align-items: center;
    }

    .sb2g1-popup {
        border-radius: 24px;
        max-height: 70vh;
    }
}

@media (prefers-color-scheme: dark) {
    .sb2g1-bar__container {
        background: rgba(15, 23, 42, 0.75);
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .sb2g1-bar.is-unlocked .sb2g1-bar__container {
        background: rgba(50, 40, 10, 0.7);
        border-color: rgba(255, 247, 163, 0.15);
    }

    .sb2g1-bar__msg { color: #f1f5f9; }
    .sb2g1-bar.is-unlocked .sb2g1-bar__msg { color: #fff7a3; }
    .sb2g1-bar__dot { background: rgba(255, 255, 255, 0.1); }
    .sb2g1-bar__close { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.3); }
    .sb2g1-bar__close:hover { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.6); }
    .sb2g1-bar__track { background: rgba(255, 255, 255, 0.06); }

    .sb2g1-popup {
        background: rgba(15, 23, 42, 0.92);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .sb2g1-popup__header {
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    .sb2g1-popup__title { color: #f1f5f9; }

    .sb2g1-popup__close {
        background: rgba(255, 255, 255, 0.06);
        color: #94a3b8;
    }

    .sb2g1-popup__close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f1f5f9;
    }

    .sb2g1-product-card {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .sb2g1-product-card:hover {
        border-color: rgba(143, 234, 255, 0.3);
        box-shadow: 0 8px 28px rgba(143, 234, 255, 0.12);
    }

    .sb2g1-product-card__name { color: #f1f5f9; }
    .sb2g1-product-card__img { background-color: #1e293b; }

    .sb2g1-popup__success {
        background: rgba(15, 23, 42, 0.95);
    }

    .sb2g1-popup__success-text { color: #f1f5f9; }

    .sb2g1-popup__error {
        background: rgba(127, 29, 29, 0.3);
        border-bottom-color: rgba(220, 38, 38, 0.15);
    }

    .sb2g1-popup__page-btn {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.06);
        color: var(--sb2g1-c1);
    }

    .sb2g1-popup__page-btn:hover {
        background: rgba(30, 41, 59, 1);
        border-color: var(--sb2g1-c1);
    }
}
