/* ════════════════════════════════
   CART SIDEBAR STYLES
   Include this CSS file in all pages
════════════════════════════════ */

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar Container */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.active {
    right: 0;
}

/* Cart Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e2e2e0;
}

.cart-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111111;
    margin: 0;
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #111111;
    padding: 5px;
    transition: color 0.2s;
    line-height: 1;
}

.cart-close:hover {
    color: #888888;
}

/* Cart Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888888;
}

.cart-empty i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #dddddd;
}

.cart-empty p {
    font-size: 14px;
    margin: 0;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e2e2e0;
}

.cart-item:last-of-type {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #111111;
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.cart-item-color {
    font-size: 13px;
    color: #888888;
    margin: 0 0 12px 0;
}

.cart-item-color span {
    color: #111111;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e2e2e0;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #111111;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.quantity-btn:hover {
    background: #f8f8f6;
}

.quantity-value {
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border-left: 1px solid #e2e2e0;
    border-right: 1px solid #e2e2e0;
    color: #111111;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #888888;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    padding: 0;
    transition: color 0.2s;
    font-family: inherit;
}

.cart-item-remove:hover {
    color: #e63946;
}

.cart-item-remove i {
    margin-right: 4px;
}

/* Voucher Banner */
.voucher-banner {
    background: #f8f8f6;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

.voucher-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voucher-banner-left i {
    font-size: 18px;
    color: #2d6a4f;
}

.voucher-banner-left span {
    font-size: 12px;
    color: #111111;
}

.voucher-view-btn {
    background: #111111;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    font-family: inherit;
}

.voucher-view-btn:hover {
    background: #333333;
}

/* Cart Footer */
.cart-footer {
    padding: 24px;
    border-top: 1px solid #e2e2e0;
    background: #ffffff;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cart-subtotal-label {
    font-size: 13px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-subtotal-value {
    font-size: 18px;
    font-weight: 700;
    color: #111111;
}

.cart-shipping-note {
    font-size: 12px;
    color: #888888;
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    background: #111111;
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background 0.3s;
}

.btn-checkout:hover {
    background: #222222;
}

.payment-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.payment-icons img {
    height: 20px;
    border-radius: 3px;
}

.btn-checkout > i {
    font-size: 14px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111111;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: #2d6a4f;
}

/* Cart Count Badge (for navbar) */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #2d6a4f;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ════════════════════════════════
   RESPONSIVE STYLES
════════════════════════════════ */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .cart-header {
        padding: 20px;
    }

    .cart-header h2 {
        font-size: 20px;
    }

    .cart-body {
        padding: 16px 20px;
    }

    .cart-footer {
        padding: 20px;
    }

    .cart-item {
        gap: 12px;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-item-image img {
        max-width: 50px;
        max-height: 50px;
    }

    .cart-item-name {
        font-size: 13px;
    }

    .cart-item-price {
        font-size: 14px;
    }

    .voucher-banner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .voucher-banner-left {
        flex-direction: column;
        gap: 6px;
    }
}