/* ========================================
   GlideCart - WooCommerce Cart Drawer
======================================== */

:root,
#wsc-drawer {
    --wsc-bg-color: #ffffff;
    --wsc-text-color: #111111;
    --wsc-btn-bg: #111111;
    --wsc-btn-text: #ffffff;
    box-sizing: border-box;
}

#wsc-drawer * {
    box-sizing: border-box;
}


/* Overlay */

.wsc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 99998;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

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


/* Drawer */

.wsc-drawer {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    width: 420px;
    max-width: 100%;

    background: var(--wsc-bg-color, #ffffff);
    color: var(--wsc-text-color, #111111);

    z-index: 99999;

    display: flex;
    flex-direction: column;

    box-shadow:
        -10px 0 40px rgba(0, 0, 0, 0.15);

    transform: translateX(100%);

    transition:
        transform 0.3s ease;
}

.wsc-drawer.wsc-active {
    transform: translateX(0);
}


/* Header */

.wsc-header {
    min-height: 70px;

    padding: 18px 20px;

    border-bottom: 1px solid #0001;

    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-shrink: 0;
}

.wsc-title {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 20px;
    font-weight: 700;
    color: var(--wsc-text-color, #111111);
}

.wsc-cart-count {
    min-width: 24px;
    height: 24px;

    padding: 0 6px;

    border-radius: 50%;

    background: var(--wsc-btn-bg, #111111);
    color: var(--wsc-btn-text, #ffffff);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 600;
}

.wsc-cart-count:empty,
.wsc-cart-count[style*="display: none"],
.wsc-cart-count[style*="display:none"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.wsc-close {
    border: 0;
    background: transparent;

    width: 38px;
    height: 38px;

    padding: 0;

    cursor: pointer;

    font-size: 30px;
    line-height: 1;

    color: var(--wsc-text-color, #111111);

    display: flex;
    align-items: center;
    justify-content: center;
}

.wsc-close:hover {
    opacity: 0.7;
}


/* Cart content */

.wsc-cart-content {
    flex: 1;

    overflow-y: auto;

    padding: 10px 20px;
}


/* Cart item */

.wsc-cart-item {
    display: flex;

    gap: 14px;

    padding: 18px 0;

    border-bottom: 1px solid #0001;
}

.wsc-item-image {
    width: 82px;
    min-width: 82px;
    height: 82px;

    overflow: hidden;

    border-radius: 8px;

    background: #f7f7f7;
}

.wsc-item-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}


/* Item content */

.wsc-item-content {
    flex: 1;
    min-width: 0;
}

.wsc-item-top {
    display: flex;

    justify-content: space-between;

    gap: 10px;
}

.wsc-item-name {
    font-size: 14px;
    line-height: 1.4;

    font-weight: 600;
    color: var(--wsc-text-color, #111111);
}

.wsc-item-name a {
    color: var(--wsc-text-color, #111111);
    text-decoration: none;
}

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

.wsc-remove {
    flex-shrink: 0;

    border: 0;
    background: transparent;

    cursor: pointer;

    font-size: 22px;

    line-height: 1;

    color: #888;

    padding: 0;
}

.wsc-remove:hover {
    color: #e53935;
}


/* Variation */

.wsc-variation {
    margin-top: 5px;

    font-size: 12px;

    color: #777;
}

.wsc-variation dl {
    margin: 0;
}

.wsc-variation dt,
.wsc-variation dd {
    display: inline;

    margin: 0;
}


/* Bottom */

.wsc-item-bottom {
    margin-top: 12px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;
}


/* Quantity */

.wsc-quantity {
    display: inline-flex;

    align-items: center;

    border: 1px solid #dddddd;

    border-radius: 6px;

    overflow: hidden;
    background-color: #FFF;
}

.wsc-quantity button {
    width: 30px;
    height: 30px;

    padding: 0;

    border: 0;

    background: #43454b;

    cursor: pointer;

    font-size: 16px;

    display: flex;
    align-items: center;
    justify-content: center;
}
.wsc-quantity button:hover {
    background: #505359;
}

.wsc-qty {
    width: 30px;

    text-align: center;

    font-size: 13px;
    color: var(--wsc-text-color, #111111);
    background: transparent;
}


/* Price */

.wsc-item-price {
    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;
    color: var(--wsc-text-color, #111111);
}


/* Footer */

.wsc-footer {
    flex-shrink: 0;

    padding: 20px;

    border-top: 1px solid rgba(0, 0, 0, 0.08);

    background: var(--wsc-bg-color, #ffffff);
    color: var(--wsc-text-color, #111111);
}

.wsc-subtotal {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 16px;

    font-size: 16px;
    color: var(--wsc-text-color, #111111);
}

.wsc-subtotal strong {
    font-size: 18px;
    color: var(--wsc-text-color, #111111);
}


/* Buttons */

.wsc-actions {
    display: grid;

    grid-template-columns: 1fr;

    gap: 10px;
}

.wsc-actions a,
.wsc-actions button,
.wsc-actions .wsc-checkout {
    min-height: 48px;

    padding: 12px;

    border-radius: 6px;

    text-align: center;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: inherit;
    line-height: 24px;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

.wsc-view-cart {
    border: 1px solid #111111;

    color: #111111;

    background: #ffffff;
}

.wsc-view-cart:hover {
    background: #f5f5f5;
}

.wsc-checkout {
    border: 1px solid var(--wsc-btn-bg, #111111);

    background: var(--wsc-btn-bg, #111111);

    color: var(--wsc-btn-text, #ffffff);

    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.wsc-checkout:hover {
    filter: brightness(0.88);
    opacity: 0.95;
    background: var(--wsc-btn-bg, #111111);
    color: var(--wsc-btn-text, #ffffff);
}

.wsc-checkout:disabled,
.wsc-checkout.disabled,
.wsc-checkout[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
    pointer-events: none;
}

.wsc-checkout * {
    pointer-events: none;
}

.wsc-rzp-error {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    color: #e2401c;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}


/* Secure checkout */

.wsc-secure {
    margin-top: 14px;

    text-align: center;

    font-size: 11px;

    color: #777;
}


/* Empty */

.wsc-empty-cart {
    min-height: 300px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 40px 20px;
}

.wsc-empty-icon {
    font-size: 50px;

    margin-bottom: 15px;
}

.wsc-empty-cart h3 {
    margin: 0 0 8px;

    font-size: 20px;
    color: var(--wsc-text-color, #111111);
}

.wsc-empty-cart p {
    margin: 0 0 20px;

    color: #777;
}

.wsc-continue-shopping {
    border: 1px solid var(--wsc-btn-bg, #111111);

    background: var(--wsc-btn-bg, #111111);

    color: var(--wsc-btn-text, #ffffff);

    padding: 12px 20px;

    border-radius: 6px;

    cursor: pointer;

    font-size: 14px;
}

.wsc-continue-shopping:hover {
    filter: brightness(0.88);
}


/* Loading */

.wsc-cart-trigger {
    cursor: pointer;
}

button.single_add_to_cart_button.loading,
.add_to_cart_button.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.wsc-loading {
    opacity: 0.5;

    pointer-events: none;
}

.wsc-item-updating {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.wsc-quantity button:disabled,
.wsc-remove:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}


/* Mobile */

@media (max-width: 600px) {

    .wsc-drawer {
        width: 85%;
    }

    .wsc-header {
        min-height: 60px;

        padding: 15px;
    }

    .wsc-cart-content {
        padding: 5px 15px;
    }

    .wsc-footer {
        padding: 15px;
    }

    .wsc-item-image {
        width: 70px;
        min-width: 70px;
        height: 70px;
    }

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

}