/* Cart Page Styles */

.cart-item {
    animation: slideIn 0.3s ease-out;
}

/* WooCommerce Cart Table Overrides */
.woocommerce-cart-form__contents {
    border: none !important;
}

.woocommerce-cart-form__contents .cart_item {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-cart-form__contents .cart_item td {
    border: none !important;
    padding: 0 !important;
}

/* Hide default WooCommerce cart table styling */
.woocommerce table.shop_table {
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    border: none !important;
    padding: 0 !important;
    vertical-align: top !important;
}

.cart-item.removing {
    animation: slideOut 0.3s ease-out forwards;
}

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

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-100%);
        height: 0;
        margin: 0;
        padding: 0;
    }
}

.quantity-btn {
    transition: all 0.2s;
}

.quantity-btn:hover {
    transform: scale(1.05);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-btn:disabled:hover {
    transform: none;
}

.free-delivery-progress {
    background: linear-gradient(to right, #10b981 0%, #10b981 var(--progress, 0%), #e5e7eb var(--progress, 0%));
    transition: background 0.3s ease;
}

.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Product image container styles */
.product-card .w-full.h-32 {
    position: relative;
}

.product-card .w-full.h-32 img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Notification Styles */
.notification {
    animation: slideInFromRight 0.3s ease-out;
}

.notification.hide {
    animation: slideOutToRight 0.3s ease-out forwards;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Custom scrollbar for product sections */
#cheapProducts::-webkit-scrollbar,
#recommendedProducts::-webkit-scrollbar {
    height: 6px;
}

#cheapProducts::-webkit-scrollbar-track,
#recommendedProducts::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

#cheapProducts::-webkit-scrollbar-thumb,
#recommendedProducts::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

#cheapProducts::-webkit-scrollbar-thumb:hover,
#recommendedProducts::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Empty cart state */
.empty-cart {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}