/* Custom Cart Modal Styles - Save as custom-cart-modal.css in your theme's css folder */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    z-index: 99999;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-modal.active {
    display: block;
    opacity: 1;
}

.cart-container-modal {
    width: 50%;
    max-width: 1200px;
    margin: 2rem auto;
    background-color: white;
    padding: 20px 50px 20px 50px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.cart-modal.active .cart-container-modal {
    transform: translateY(0);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.cart-body {
    padding: 1.5rem;
}

.cart-items {
    display: grid;
    gap: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    position: relative;
}

/* Stylish separator between items */
.cart-item:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
}

/* Hover effect with slight highlight */
.cart-item:hover {
    background-color: #f9f9f9;
}

/* First item gets extra top space */
.cart-item:first-child {
    padding-top: 0;
}

.item-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.item-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.item-price {
    font-weight: 600;
    color: #333;
    margin: 0.25rem 0;
}

.item-sku {
    font-size: 0.8rem;
    color: #141414;
    background-color: #e2e2e2;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.25rem;
}

.item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-btn {

    border: 1px solid rgb(226, 226, 226);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: black;
}
.quantity-btn .minus
{
    color: #000  !important;
}

.quantity-btn .plus
{
    color: #000  !important;
}


.quantity-btn:hover {
    background-color: #3882f0 !important;
    border:none;
}

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

.quantity-value {
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}

.remove-btn {
    background: none !important;
    text-decoration: none !important;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: #c0392b;
    text-decoration: underline;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: grid;
    gap: 1rem;
}

.cart-whatsapp-btn {
    padding: 1rem;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 1rem;
    width: 100% !important;
}

.cart-whatsapp-btn:hover {
    background-color: #1da851;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.summary-total {
    font-weight: 600;
    font-size: 1.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.checkout-btn {
    padding: 1rem;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkout-btn:hover {
    background-color: #333;
}

.empty-cart {
    text-align: center;
    padding: 3rem 0;
}

.empty-cart h3 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.empty-cart-btn {
    padding: 0.75rem 1.5rem;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.empty-cart-btn:hover {
    background-color: #333;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
}

.loading-spinner::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto;
    }
    
    .item-controls {
        grid-column: span 2;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 1rem;
        border-top: 1px solid #f0f0f0;
        margin-top: 1rem;
    }
    
    .cart-container-modal {
        width: 100%;
        margin: 1rem auto;
        padding: 2px 3px 2px 3px !important;
    }
    
    .cart-item:not(:last-child)::after {
        left: 0;
        right: 0;
    }
}