/**
 * Xpert Checkout - Side Cart Styles
 */

/* ==========================================================================
   Overlay
   ========================================================================== */
.xpert-side-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99998;
}

.xpert-side-cart-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Side Cart Container
   ========================================================================== */
.xpert-side-cart {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

.xpert-side-cart.open {
    right: 0;
}

body.xpert-side-cart-open {
    overflow: hidden;
}

/* ==========================================================================
   Header
   ========================================================================== */
.xpert-side-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #000;
    color: #fff;
}

.xpert-side-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.xpert-side-cart-close {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #fff;
    transition: color 0.2s ease;
}

.xpert-side-cart-close:hover {
    color: #fb8146;
}

/* ==========================================================================
   Content
   ========================================================================== */
.xpert-side-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.xpert-side-cart-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Empty Cart */
.xpert-side-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.xpert-side-cart-empty svg {
    color: #ccc;
    margin-bottom: 20px;
}

.xpert-side-cart-empty p {
    font-size: 16px;
    margin-bottom: 20px;
}

.xpert-btn-continue {
    display: inline-block;
    padding: 12px 24px;
    background: #fb8146;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.xpert-btn-continue:hover {
    background: #e06a2e;
    color: #fff;
}

/* ==========================================================================
   Cart Items
   ========================================================================== */
.xpert-side-cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xpert-side-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.xpert-side-cart-item.removing {
    opacity: 0;
    transform: translateX(50px);
}

.xpert-cart-item-image {
    flex-shrink: 0;
}

.xpert-cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.xpert-cart-item-details {
    flex: 1;
    min-width: 0;
}

.xpert-cart-item-title {
    display: block;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.3;
}

.xpert-cart-item-title:hover {
    color: #fb8146;
}

.xpert-cart-item-price {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* Quantity Controls */
.xpert-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}

.xpert-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #000;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.xpert-qty-btn:hover {
    border-color: #fb8146;
    background: #fb8146;
    color: #fff;
}

.xpert-qty-input {
    width: 40px;
    height: 28px;
    text-align: center;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    background: #fff;
}

.xpert-qty-input:focus {
    outline: none;
    border-color: #fb8146;
}

/* Remove Button */
.xpert-cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.xpert-cart-item-remove:hover {
    color: #e74c3c;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.xpert-side-cart-footer {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

.xpert-side-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.xpert-subtotal-amount {
    font-weight: 700;
    font-size: 20px;
    color: #fb8146;
}

.xpert-side-cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xpert-btn-view-cart,
.xpert-btn-checkout {
    display: block;
    text-align: center;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.xpert-btn-view-cart {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.xpert-btn-view-cart:hover {
    background: #e5e5e5;
    color: #333;
}

.xpert-btn-checkout {
    background: #fb8104;
    color: #fff;
}

.xpert-btn-checkout:hover {
    background: #000;
    color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .xpert-side-cart {
        width: 100%;
        right: -100%;
    }
    
    .xpert-side-cart-header {
        padding: 15px;
    }
    
    .xpert-side-cart-content {
        padding: 15px;
    }
    
    .xpert-cart-item-image img {
        width: 70px;
        height: 70px;
    }
    
    .xpert-side-cart-footer {
        padding: 15px;
    }
}
