/**
 * WooCommerce Cart Addon Styles
 * Custom styles for cart and checkout pages
 */

/* Cart Page Enhancements */
.woocommerce-cart .cart_totals {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.woocommerce-cart .cart_item {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.woocommerce-cart .product-remove a {
    background: #dc3545;
    color: white !important;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.woocommerce-cart .product-remove a:hover {
    background: #c82333;
}

/* Checkout Page Enhancements */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.woocommerce-checkout .form-row {
    margin-bottom: 15px;
}

.woocommerce-checkout .input-text {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    width: 100%;
    transition: border-color 0.3s ease;
}

.woocommerce-checkout .input-text:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Modern Style */
.cart-style-modern .woocommerce-cart .cart_totals {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cart-style-modern .woocommerce-cart .cart_totals h2 {
    color: white;
}

.cart-style-modern .woocommerce-checkout .woocommerce-billing-fields,
.cart-style-modern .woocommerce-checkout .woocommerce-shipping-fields {
    border: 2px solid #667eea;
}

/* Minimal Style */
.cart-style-minimal .woocommerce-cart .cart_totals {
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: none;
}

.cart-style-minimal .woocommerce-checkout .woocommerce-billing-fields,
.cart-style-minimal .woocommerce-checkout .woocommerce-shipping-fields {
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: none;
}

/* Cross-sells Products */
.cross-sells {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cross-sells h2 {
    margin-bottom: 20px;
    color: #333;
}

.cross-sells .product {
    text-align: center;
    margin-bottom: 20px;
}

.cross-sells .product img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce-cart .cart_totals,
    .woocommerce-checkout .woocommerce-billing-fields,
    .woocommerce-checkout .woocommerce-shipping-fields {
        padding: 15px;
    }
    
    .woocommerce-cart .cart_item {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
}

/* Loading States */
.woocommerce-cart.loading,
.woocommerce-checkout.loading {
    opacity: 0.6;
    pointer-events: none;
}

.woocommerce-cart.loading::after,
.woocommerce-checkout.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-info {
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.woocommerce-cart .woocommerce-message,
.woocommerce-checkout .woocommerce-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.woocommerce-cart .woocommerce-error,
.woocommerce-checkout .woocommerce-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.woocommerce-cart .woocommerce-info,
.woocommerce-checkout .woocommerce-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}



/* Force list format for WooCommerce Blocks product details */
    .wc-block-components-product-details {
        display: block !important;
        flex-direction: column !important;
    }
    
    .wc-block-components-product-details > * {
        display: list-item !important;
        list-style-type: none !important;
        margin-bottom: 8px !important;
    }
    
    .wc-block-components-product-details > *:not(:last-child)::after {
        content: "" !important;
        display: none !important;
    }
    
    /* Hide the slash separators */
    .wc-block-components-product-details span[aria-hidden="true"] {
        display: none !important;
    }
    
.wc-block-components-product-details > * {
    display: list-item !important;
    margin-bottom: 5px !important;
}