/* ============================================================
   CART SIDEBAR STYLES
   Add this CSS to your style.css file
   ============================================================ */

/* Cart Overlay - MUST be fixed */
.cart-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(20, 53, 82, 0.6);
    z-index: 9998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar - MUST be fixed, slides from LEFT */
.cart-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 400px;
    max-width: 90%;
    height: 100% !important;
    height: 100vh !important;
    background-color: #FFFFFF;
    z-index: 9999 !important;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.active {
    transform: translateX(0);
}

/* Cart Header */
.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px;
    background-color: #143552;
    color: #FFFFFF;
    flex-shrink: 0;
}

.cart-sidebar-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-title-ar {
    font-family: 'Amiri', serif;
    font-size: 20px;
    font-weight: 400;
    direction: rtl;
}

.cart-title-en {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.cart-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.cart-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cart Body */
.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    background-color: #F5F5F5;
}

/* Empty Cart */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    padding: 40px 24px;
    text-align: center;
}

.cart-empty-icon {
    color: #9A9A9A;
    margin-bottom: 20px;
    opacity: 0.5;
}

.cart-empty-text {
    font-size: 18px;
    font-weight: 500;
    color: #143552;
    margin-bottom: 8px;
}

.cart-empty-subtext {
    font-size: 14px;
    font-weight: 300;
    color: #9A9A9A;
    margin-bottom: 28px;
}

.cart-empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #FFFFFF;
    background-color: #143552;
    padding: 14px 36px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cart-empty-btn:hover {
    background-color: #541622;
}

/* Cart Items */
.cart-items-list {
    padding: 0;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background-color: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-item-image {
    width: 80px;
    height: 100px;
    background-color: #DBD4C6;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.cart-item-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #143552 0%, #1a4a6e 100%);
    color: #FFFFFF;
    padding: 8px;
}

.cart-item-image-placeholder .placeholder-brand {
    font-family: 'Amiri', serif;
    font-size: 9px;
    opacity: 0.8;
}

.cart-item-image-placeholder .placeholder-name {
    font-size: 7px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #143552;
    margin-bottom: 2px;
}

.cart-item-name-ar {
    font-family: 'Amiri', serif;
    font-size: 12px;
    color: #9A9A9A;
    direction: rtl;
    display: inline-block;
}

.cart-item-volume {
    font-size: 11px;
    color: #9A9A9A;
    margin-top: 4px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #9A9A9A;
    padding: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cart-item-remove:hover {
    color: #541622;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #143552;
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 16px;
    background: none;
    border: none;
    color: #143552;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.quantity-btn:hover {
    background-color: #DBD4C6;
}

.quantity-value {
    width: 36px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: #143552;
    border-left: 1px solid rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

/* Cart Footer */
.cart-sidebar-footer {
    padding: 24px;
    background-color: #FFFFFF;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-subtotal-label {
    font-size: 14px;
    font-weight: 400;
    color: #5A5A5A;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cart-subtotal-value {
    font-size: 20px;
    font-weight: 600;
    color: #143552;
}

.cart-shipping-note {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 400;
    color: #59663D;
    margin-bottom: 20px;
    padding: 10px 14px;
    background-color: rgba(89, 102, 61, 0.08);
    border-radius: 6px;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #143552;
    background: none;
    border: 1.5px solid #143552;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cart-view-btn:hover {
    background-color: #143552;
    color: #FFFFFF;
}

.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #FFFFFF;
    background-color: #143552;
    border: none;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cart-checkout-btn:hover {
    background-color: #541622;
}

/* Toast Notification */
.cart-toast {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background-color: #143552;
    color: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000 !important;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.cart-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background-color: #59663D;
    border-radius: 50%;
    flex-shrink: 0;
}

.cart-toast-message {
    font-size: 14px;
    font-weight: 400;
}

/* Body Lock */
body.cart-open {
    overflow: hidden !important;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .cart-sidebar-header {
        padding: 20px;
    }
    
    .cart-item {
        padding: 16px 20px;
    }
    
    .cart-sidebar-footer {
        padding: 20px;
    }
    
    .cart-toast {
        left: 16px !important;
        right: 16px !important;
        bottom: 16px !important;
    }
}
