:root {
    --ozsc-panel-bg: #ffffff;
    --ozsc-panel-text: #111111;
    --ozsc-panel-border: #eeeeee;
    --ozsc-btn-primary-bg: #25d366;
    --ozsc-btn-primary-text: #ffffff;
    --ozsc-btn-primary-border: #25d366;
    --ozsc-btn-secondary-bg: #111111;
    --ozsc-btn-secondary-text: #ffffff;
    --ozsc-btn-secondary-border: #111111;
    --ozsc-btn-light-bg: #f7f7f7;
    --ozsc-btn-light-text: #111111;
    --ozsc-btn-light-border: #eeeeee;
    --ozsc-badge-bg: #ff3b30;
    --ozsc-badge-text: #ffffff;
    --ozsc-floating-bg: #111111;
    --ozsc-floating-icon: #ffffff;
    --ozsc-radius: 14px;
    --ozsc-drawer-width: 380px;
    --ozsc-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    --ozsc-float-x: 18px;
    --ozsc-float-y: 18px;
    --ozsc-float-size: 56px;
}

html.ozsc-drawer-open,
body.ozsc-drawer-open {
    overflow-x: hidden !important;
}

/* ── Overlay ─────────────────────────────────────────── */

.ozsc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9998;
}

.ozsc-overlay.ozsc-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ozsc-overlay.ozsc-overlay-hidden {
    display: none;
}

/* ── Drawer ──────────────────────────────────────────── */

.ozsc-drawer {
    position: fixed !important;
    top: 0;
    right: 0;
    width: var(--ozsc-drawer-width);
    max-width: 100vw;
    height: 100%;
    background: var(--ozsc-panel-bg);
    color: var(--ozsc-panel-text);
    box-shadow: var(--ozsc-shadow);
    display: flex;
    flex-direction: column;
    border-radius: var(--ozsc-radius) 0 0 var(--ozsc-radius);
    transform: translateX(100%) !important;
    transition: transform 0.25s ease, visibility 0.25s ease;
    visibility: hidden !important;
    overflow: hidden;
    z-index: 9999;
}

.ozsc-drawer.ozsc-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    overflow: visible;
}

.ozsc-drawer.ozsc-left {
    left: 0;
    right: auto;
    transform: translateX(-100%) !important;
    border-radius: 0 var(--ozsc-radius) var(--ozsc-radius) 0;
}

.ozsc-drawer.ozsc-left.ozsc-open {
    transform: translateX(0) !important;
}

/* ── Header ──────────────────────────────────────────── */

.ozsc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ozsc-panel-border);
    flex-shrink: 0;
}

.ozsc-title {
    margin: 0;
    font-size: 18px;
}

.ozsc-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--ozsc-panel-text);
    line-height: 1;
    padding: 0;
}

/* ── Content (scrollable body) ───────────────────────── */

.ozsc-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 16px;
    min-height: 0;
}

.ozsc-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Cart Item row ───────────────────────────────────── */

.ozsc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ozsc-panel-border);
    transition: background 0.15s ease;
    border-radius: 6px;
}

.ozsc-item-thumb-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

a.ozsc-item-name {
    color: inherit;
    text-decoration: none;
}

a.ozsc-item-name:hover {
    text-decoration: underline;
}

.ozsc-empty {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--ozsc-panel-border);
    opacity: 0.6;
}

/* ── Thumbnail wrapper ───────────────────────────────── */

.ozsc-item-thumb-wrap {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ozsc-panel-border);
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ozsc-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ozsc-item-placeholder {
    width: 28px;
    height: 28px;
    display: block;
}

/* ── Item info (name) ────────────────────────────────── */

.ozsc-item-info {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ozsc-item-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

/* ── Quantity control ─────────────────────────────────── */

.ozsc-qty-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--ozsc-panel-border);
}

.ozsc-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--ozsc-btn-secondary-bg);
    color: var(--ozsc-btn-secondary-text);
    cursor: pointer;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: none;
    -webkit-user-select: none;
    user-select: none;
}

.ozsc-qty-btn:hover {
    opacity: 1;
}

.ozsc-qty-btn:active {
    opacity: 1;
}

.ozsc-qty-input {
    width: 44px;
    height: 28px;
    border: none;
    border-left: 1px solid var(--ozsc-panel-border);
    border-right: 1px solid var(--ozsc-panel-border);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--ozsc-panel-text);
    background: var(--ozsc-panel-bg);
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
}

.ozsc-qty-input::-webkit-outer-spin-button,
.ozsc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ozsc-qty-wrap.ozsc-qty-updating {
    opacity: 1;
    pointer-events: auto;
}

/* ── Remove button ───────────────────────────────────── */

.ozsc-item-remove {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ozsc-remove-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--ozsc-panel-border);
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: var(--ozsc-panel-text);
    transition: background 0.15s ease;
}

.ozsc-remove-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ozsc-remove-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

/* ── Empty CTA ───────────────────────────────────────── */

.ozsc-empty-cta {
    margin-top: 16px;
}

/* ── Footer (fixed bottom) ───────────────────────────── */

.ozsc-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--ozsc-panel-border);
    display: grid;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────── */

.ozsc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: var(--ozsc-radius);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.ozsc-btn:hover {
    opacity: 0.88;
}

.ozsc-btn-primary {
    background: var(--ozsc-btn-primary-bg);
    color: var(--ozsc-btn-primary-text);
    border-color: var(--ozsc-btn-primary-border);
}

.ozsc-btn-secondary {
    background: var(--ozsc-btn-secondary-bg);
    color: var(--ozsc-btn-secondary-text);
    border-color: var(--ozsc-btn-secondary-border);
}

.ozsc-btn-light {
    background: var(--ozsc-btn-light-bg);
    color: var(--ozsc-btn-light-text);
    border-color: var(--ozsc-btn-light-border);
}

/* ── Floating Action Button (FAB) ────────────────────── */

.ozsc-floating {
    position: fixed;
    width: var(--ozsc-float-size);
    height: var(--ozsc-float-size);
    border-radius: 999px;
    border: none;
    background: var(--ozsc-floating-bg);
    color: var(--ozsc-floating-icon);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    animation: ozsc-fab-pulse 3s ease-in-out infinite;
}

@keyframes ozsc-fab-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(17, 17, 17, 0.35);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(17, 17, 17, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(17, 17, 17, 0);
    }
}

.ozsc-corner-bottom-right {
    right: var(--ozsc-float-x);
    bottom: var(--ozsc-float-y);
}

.ozsc-corner-bottom-left {
    left: var(--ozsc-float-x);
    bottom: var(--ozsc-float-y);
    right: auto;
}

.ozsc-corner-top-right {
    right: var(--ozsc-float-x);
    top: var(--ozsc-float-y);
    bottom: auto;
}

.ozsc-corner-top-left {
    left: var(--ozsc-float-x);
    top: var(--ozsc-float-y);
    right: auto;
    bottom: auto;
}

body.ozsc-drawer-open .ozsc-floating {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ozsc-floating-icon {
    font-size: 20px;
    color: var(--ozsc-floating-icon);
}

.ozsc-floating-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

/* ── Badge ───────────────────────────────────────────── */

.ozsc-badge {
    background: var(--ozsc-badge-bg);
    color: var(--ozsc-badge-text);
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 6px;
    min-width: 18px;
    text-align: center;
}

.ozsc-floating .ozsc-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    margin-left: 0;
    min-width: 18px;
}

/* ── Shortcode button ────────────────────────────────── */

.ozsc-shortcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--ozsc-panel-border);
    background: var(--ozsc-panel-bg);
    padding: 10px 12px;
    border-radius: var(--ozsc-radius);
    cursor: pointer;
}

.ozsc-shortcode-icon {
    font-size: 16px;
}

.ozsc-shortcode-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

/* ── Warning dot ─────────────────────────────────────── */

.ozsc-has-warning:not(.ozsc-floating) {
    position: relative;
}

.ozsc-has-warning::after {
    content: "";
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #f7b500;
    border: 2px solid var(--ozsc-panel-bg);
}

.ozsc-shortcode-link,
.ozsc-open-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Seller panel ────────────────────────────────────── */

.ozsc-seller-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ozsc-seller-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ozsc-seller-title {
    font-weight: 600;
}

.ozsc-seller-list {
    display: grid;
    gap: 12px;
}

.ozsc-seller-card {
    border: 1px solid var(--ozsc-panel-border);
    border-radius: var(--ozsc-radius);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ozsc-seller-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ozsc-seller-number {
    opacity: 0.7;
    font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 600px) {
    .ozsc-drawer {
        --ozsc-drawer-width: 92vw;
        max-width: 92vw;
    }
    .ozsc-content {
        padding: 10px 12px;
    }
    .ozsc-header {
        padding: 14px 12px;
    }
    .ozsc-footer {
        padding: 12px;
        grid-template-columns: 1fr;
    }
    body.ozsc-drawer-open .ozsc-floating {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .ozsc-item {
        gap: 8px;
        padding: 8px 0;
    }
    .ozsc-item-thumb-wrap {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    .ozsc-item-name {
        font-size: 13px;
        line-height: 1.3;
    }
    .ozsc-qty-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
    .ozsc-qty-input {
        width: 40px;
        height: 26px;
        font-size: 12px;
    }
    .ozsc-item-placeholder {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 360px) {
    .ozsc-drawer {
        --ozsc-drawer-width: 100vw;
        max-width: 100vw;
        border-radius: 0;
    }
    .ozsc-item-thumb-wrap {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border-radius: 6px;
    }
    .ozsc-item {
        gap: 6px;
    }
    .ozsc-item-name {
        font-size: 12.5px;
    }
    .ozsc-remove-btn {
        width: 26px;
        height: 26px;
    }
}
