/* Cart Modal Core Styles */
.cart-modal {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    right: 0;
}

/* Cart Header Styles */
.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background);
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.cart-close {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-close:hover {
    background: var(--primary-color);
    color: var(--background);
    transform: scale(1.1);
}

/* Cart Items Container */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Individual Cart Item Styles */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

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

.item-details {
    flex: 1;
}

.item-details h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.quantity-controls button {
    background: var(--background);
    border: 1px solid var(--primary-color);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.quantity-controls button:hover {
    background: var(--primary-color);
    color: var(--background);
    transform: translateY(-2px);
}

.quantity-controls button:active {
    transform: scale(0.95);
}

.quantity-controls span {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Remove Item Button */
.remove-item {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    background: rgba(255, 68, 68, 0.1);
    transform: scale(1.1);
}

.remove-item:active {
    transform: scale(0.95);
}

/* Price Display */
.item-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Cart Footer */
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--background);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* Checkout Button */
.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.2);
}

.checkout-btn:active {
    transform: translateY(0);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .cart-modal {
        width: 100%;
        max-width: none;
    }

    .cart-item {
        flex-direction: column;
        padding: 0.75rem;
    }

    .cart-item img {
        width: 100%;
        height: 200px;
    }

    .quantity-controls {
        flex-wrap: wrap;
    }

    .quantity-controls button {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }

    .quantity-controls span {
        font-size: 1.2rem;
    }

    .remove-item {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }

    .cart-header {
        padding: 1rem;
    }

    .cart-header h2 {
        font-size: 1.2rem;
    }

    .cart-footer {
        padding: 1rem;
    }

    .checkout-btn {
        padding: 1.2rem;
        font-size: 1.1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .quantity-controls button:active,
    .remove-item:active,
    .checkout-btn:active {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

