.custom-cart-modal {
    display: none; /* Domyślnie ukryty */
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    align-content: center;
    align-items: center;
}

.custom-cart-modal.show {
    align-items: center;
    display: flex !important;
}

.custom-cart-modal .modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-cart-modal .close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    z-index: 1;
}

.custom-cart-modal .close-modal:hover {
    color: #333;
}

.custom-cart-modal .product-info {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.custom-cart-modal .product-image {
    flex: 0 0 200px;
}

.custom-cart-modal .product-image img {
    max-width: 100%;
    height: auto;
}

.custom-cart-modal .product-details {
    flex: 1;
}

.custom-cart-modal .product-title {
    font-size: 24px;
    margin: 0 0 10px;
}

.custom-cart-modal .product-price {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.custom-cart-modal .variations_form {
    margin-bottom: 20px;
}

.custom-cart-modal .variations {
    width: 100%;
    margin-bottom: 15px;
}

.custom-cart-modal .variations select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}



.custom-add-to-cart.loading,
.add-to-cart-variation.loading {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.custom-add-to-cart.loading::after,
.add-to-cart-variation.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

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

/* Responsywność */
@media (max-width: 768px) {
    #custom-cart-modal .modal-content {
        margin: 5% auto;
        width: 95%;
    }

    #custom-cart-modal .modal-content .product-info {
        display: flex;
        align-items: center;
        text-align: center;
        flex-direction: column;
    }

    #custom-cart-modal .modal-content .product-image {
        justify-content: center;
        display: flex;
        flex: 0 0 auto;
        text-align: center;
    }
    #custom-cart-modal .modal-content .product-image img{
        max-width: 200px;
    }
    #custom-cart-modal .modal-content .product-details {
        text-align: center;
    }

    #custom-cart-modal .modal-content .button {
        width: 100%;
    }
}