body.uwsc-open {
    overflow: hidden;
}

/* =========================================================
   UNIVERSAL WOO SIDE CART
   Redesigned to match TTE dashboard styling
========================================================= */

:root {
    --uwsc-glass-bg: rgba(255, 255, 255, 0.72);
    --uwsc-glass-bg-strong: rgba(255, 255, 255, 0.82);
    --uwsc-glass-bg-soft: rgba(255, 255, 255, 0.42);
    --uwsc-border: rgba(196, 214, 238, 0.85);
    --uwsc-border-light: rgba(255, 255, 255, 0.55);
    --uwsc-shadow: 0 18px 40px rgba(13, 50, 118, 0.10);
    --uwsc-shadow-soft: 0 10px 24px rgba(13, 50, 118, 0.08);
    --uwsc-shadow-strong: 0 18px 34px rgba(25, 146, 238, 0.22);
    --uwsc-text: #1c2d48;
    --uwsc-text-soft: #68768f;
    --uwsc-heading: #123f87;
    --uwsc-primary: #0f67d9;
    --uwsc-primary-dark: #0d3276;
    --uwsc-primary-light: #1992ee;
    --uwsc-gold: #f0a02e;
    --uwsc-gold-soft: #f8dca7;
    --uwsc-success-bg: #ecfdf3;
    --uwsc-success-text: #166534;
    --uwsc-error-bg: #fef2f2;
    --uwsc-error-text: #b91c1c;
    --uwsc-danger: #dc2626;
    --uwsc-radius-xs: 12px;
    --uwsc-radius-sm: 16px;
    --uwsc-radius: 22px;
    --uwsc-radius-lg: 28px;
    --uwsc-blur: 18px;
}

/* Keep wrapper above layout */
.uwsc-wrapper {
    position: relative;
    z-index: 9997;
}

/* Floating cart button */
.uwsc-open-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9997;
    border: 1px solid rgba(15, 103, 217, 0.18);
    border-radius: 999px;
    padding: 14px 20px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(248,250,255,0.86) 52%, rgba(220,231,249,0.85) 100%);
    color: var(--uwsc-heading);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 16px 34px rgba(13, 50, 118, 0.14),
        inset 0 1px 0 rgba(255,255,255,0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.uwsc-open-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 103, 217, 0.35);
    box-shadow:
        0 20px 38px rgba(13, 50, 118, 0.16),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

.uwsc-open-btn svg {
    color: var(--uwsc-primary);
    flex: 0 0 auto;
}

.uwsc-open-btn-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1992ee 0%, #0d6ad3 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 16px rgba(25, 146, 238, 0.24);
}

/* Overlay */
.uwsc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 32, 76, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 9998;
}

.uwsc-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.uwsc-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(400px, 100%);
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(245,249,255,0.96) 0%, rgba(236,243,252,0.94) 100%);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -16px 0 42px rgba(13, 50, 118, 0.15);
    border-left: 1px solid rgba(196, 214, 238, 0.8);
    backdrop-filter: blur(var(--uwsc-blur));
    -webkit-backdrop-filter: blur(var(--uwsc-blur));
}

.uwsc-sidebar.is-active {
    transform: translateX(0);
}

.uwsc-sidebar.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Header */
.uwsc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 22px 18px;
    margin: 18px 18px 0;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.80) 0%, rgba(248,250,255,0.72) 52%, rgba(220,231,249,0.78) 100%);
    border: 1px solid rgba(196, 214, 238, 0.9);
    box-shadow:
        0 18px 40px rgba(13, 50, 118, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: sticky;
    top: 18px;
    z-index: 4;
}

.uwsc-header h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--uwsc-heading);
}

.uwsc-close-btn {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(235, 193, 111, 0.55);
    border-radius: 18px;
    background: #f8dca7;
    color: #163c7a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(226, 177, 70, 0.12);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.uwsc-close-btn:hover {
    transform: translateY(-2px);
    background: #fde3b3;
    box-shadow: 0 14px 26px rgba(226, 177, 70, 0.16);
}

/* Notices */
.uwsc-notices-error {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 10001;
    max-width: min(420px, calc(100vw - 36px));
}

.uwsc-notices {
    padding: 14px 18px 0;
}

.uwsc-notice {
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    border: 1px solid transparent;
    box-shadow: var(--uwsc-shadow-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.uwsc-notice-success {
    background: rgba(236, 253, 243, 0.96);
    color: var(--uwsc-success-text);
    border-color: #bbf7d0;
}

.uwsc-notice-error {
    background: rgba(254, 242, 242, 0.96);
    color: var(--uwsc-error-text);
    border-color: #fecaca;
}

/* Body */
.uwsc-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

/* Empty state */
.uwsc-empty {
    text-align: center;
    padding: 62px 24px;
    color: var(--uwsc-text-soft);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.78) 0%, rgba(248,250,255,0.72) 52%, rgba(220,231,249,0.70) 100%);
    border: 1px solid rgba(196, 214, 238, 0.85);
    box-shadow:
        0 18px 40px rgba(13, 50, 118, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.uwsc-empty-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 16px;
    border-radius: 22px;
    background: var(--tte-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 18px 30px rgba(13, 50, 118, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

.uwsc-empty-icon svg {
    width: 34px;
    height: 34px;
}

.uwsc-empty p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--uwsc-text-soft);
}

/* Item card */
.uwsc-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.78) 0%, rgba(248,250,255,0.72) 52%, rgba(220,231,249,0.70) 100%);
    border: 1px solid rgba(196, 214, 238, 0.85);
    box-shadow:
        0 18px 40px rgba(13, 50, 118, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.uwsc-item:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 103, 217, 0.24);
    box-shadow:
        0 22px 42px rgba(13, 50, 118, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.68);
}

.uwsc-item:last-child {
    margin-bottom: 0;
}

.uwsc-item-image {
    align-self: start;
}

.uwsc-item-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(196, 214, 238, 0.78);
    box-shadow: 0 8px 18px rgba(13, 50, 118, 0.06);
}

.uwsc-item-content {
    min-width: 0;
}

.uwsc-item-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--uwsc-text);
    letter-spacing: -0.02em;
}

.uwsc-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--uwsc-text-soft);
}

.uwsc-item-meta span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(196, 214, 238, 0.75);
    line-height: 1.2;
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.uwsc-item-price,
.uwsc-line-total {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--uwsc-text-soft);
    font-weight: 500;
}

.uwsc-item-price .amount,
.uwsc-line-total .amount {
    color: var(--uwsc-heading);
    font-weight: 800;
}

/* Qty controls */
.uwsc-qty-row {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(196, 214, 238, 0.82);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.76);
    box-shadow:
        0 8px 18px rgba(13, 50, 118, 0.05),
        inset 0 1px 0 rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.uwsc-qty-btn {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--uwsc-heading);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.uwsc-qty-btn:hover {
    background: rgba(15, 103, 217, 0.08);
    color: var(--uwsc-primary);
}

.uwsc-qty-input {
    width: 54px;
    height: 40px;
    border: 0;
    text-align: center;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--uwsc-heading);
    -moz-appearance: textfield;
}

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

.uwsc-limit-hint {
    font-size: 11px;
    color: var(--uwsc-text-soft);
    margin-bottom: 8px;
    line-height: 1.45;
}

/* Remove button */
.uwsc-remove-btn {
    border: 0;
    background: transparent;
    color: var(--uwsc-danger);
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.uwsc-remove-btn:hover {
    color: #b91c1c;
    transform: translateY(-1px);
    text-decoration: underline;
}

/* Footer */
.uwsc-footer {
    padding: 18px;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 4;
    background:
        linear-gradient(180deg, rgba(245,249,255,0.72) 0%, rgba(236,243,252,0.95) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(196, 214, 238, 0.55);
}

.uwsc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--uwsc-text);
    padding: 18px 20px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.80) 0%, rgba(248,250,255,0.72) 52%, rgba(220,231,249,0.78) 100%);
    border: 1px solid rgba(196, 214, 238, 0.9);
    box-shadow:
        0 18px 40px rgba(13, 50, 118, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

.uwsc-total-row span {
    font-weight: 600;
    color: var(--uwsc-text-soft);
}

.uwsc-total-row strong,
.uwsc-total-row .amount {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--uwsc-heading);
}

.uwsc-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

.uwsc-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 58px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 0 20px;
    letter-spacing: -0.01em;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

/* Secondary button = same style family as upgrade pill */
.uwsc-btn-secondary {
    background: rgba(255,255,255,0.82);
    color: var(--uwsc-primary);
    border: 1.5px solid rgba(15, 103, 217, 0.22);
    box-shadow: 0 10px 22px rgba(15, 103, 217, 0.08);
}

.uwsc-btn-secondary:hover {
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 103, 217, 0.14);
    color: var(--uwsc-primary);
}

/* Primary button = same style family as shop CTA */
.uwsc-btn-primary {
    background: linear-gradient(135deg, #1992ee 0%, #0d6ad3 100%);
    color: #fff;
    border: none;
    box-shadow: 0 14px 28px rgba(25, 146, 238, 0.24);
}

.uwsc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(25, 146, 238, 0.30);
    color: #fff;
}

/* Scrollbar */
.uwsc-body::-webkit-scrollbar {
    width: 10px;
}

.uwsc-body::-webkit-scrollbar-track {
    background: transparent;
}

.uwsc-body::-webkit-scrollbar-thumb {
    background: rgba(15, 103, 217, 0.20);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.uwsc-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 103, 217, 0.32);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Mobile */
@media (max-width: 767px) {
    .uwsc-open-btn {
        right: 16px;
        bottom: 16px;
        padding: 12px 16px;
    }

    .uwsc-sidebar {
        width: 100%;
    }

    .uwsc-header {
        margin: 14px 14px 0;
        padding: 18px;
        border-radius: 22px;
    }

    .uwsc-header h3 {
        font-size: 20px;
    }

    .uwsc-body {
        padding: 14px;
    }

    .uwsc-footer {
        padding: 14px;
    }

    .uwsc-item {
        grid-template-columns: 82px 1fr;
        gap: 12px;
        padding: 14px;
        border-radius: 20px;
    }

    .uwsc-item-title {
        font-size: 14px;
    }

    .uwsc-total-row {
        padding: 16px 18px;
        border-radius: 20px;
    }

    .uwsc-actions {
        grid-template-columns: 1fr;
    }

    .uwsc-btn {
        min-height: 54px;
        border-radius: 18px;
        font-size: 15px;
    }
}