/**
 * Vue Cart Component Styles
 * Additional styles for Vue-specific features
 */

/* Ensure cart drawer uses the same animation as other pages */
.cart-drawer {
    /* Don't override the transition from components.css */
    /* Original CSS handles: right: -100% -> right: 0 with transition: right 0.28s ease */
}

/* Reset checkout button to NOT be full width */
.cart-drawer .cart-footer .checkout-btn {
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    line-height: 1 !important;
}

/* Cart Empty State */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.cart-empty p {
    font-size: 18px;
    color: #666;
}

/* Cart Item Styles */
.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-details h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

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

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

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

.qty-btn:hover:not(:disabled) {
    background: #000;
    color: #fff;
    border-color: #000;
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

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

/* Cart Item Total */
.cart-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cart-item-total p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.remove-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #999;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #ff4444;
    color: #fff;
    border-color: #ff4444;
}

/* Cart Footer */
.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}

.cart-total-final {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #000;
}

/* Checkout Button States */
.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.checkout-btn-disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.5;
}

.checkout-btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Clear Cart Button */
.clear-cart-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.clear-cart-btn:hover {
    background: #f5f5f5;
    color: #666;
    border-color: #999;
}

/* Overlay Animation */
.cart-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-details h4 {
        font-size: 14px;
    }

    .cart-item-price {
        font-size: 12px;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .qty-input {
        width: 40px;
        height: 28px;
        font-size: 12px;
    }
}

/* Vue Transition Classes (for future use) */
.cart-enter-active,
.cart-leave-active {
    transition: all 0.3s ease;
}

.cart-enter-from {
    opacity: 0;
    transform: translateX(100%);
}

.cart-leave-to {
    opacity: 0;
    transform: translateX(100%);
}