/* Product Modal Styles */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    padding: 20px;
}

.product-modal {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--dark-color);
    cursor: pointer;
    z-index: 10;
}

.product-modal-content {
    display: flex;
    flex-direction: row;
    padding: 30px;
}

.product-gallery {
    flex: 1;
    max-width: 50%;
    padding-left: 30px;
}

.main-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--light-gray);
    transition: border-color 0.3s ease;
}

.thumbnail:hover {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    flex: 1;
    max-width: 50%;
}

.product-details h2 {
    margin-bottom: 10px;
    color: var(--dark-color);
    font-size: 24px;
}

.product-modal-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-color);
}

.quantity-control {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.quantity-control label {
    margin-left: 15px;
    font-weight: 500;
}

.quantity-buttons {
    display: flex;
    align-items: center;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-buttons button {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--dark-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-buttons button:hover {
    background-color: var(--light-color);
}

.quantity-buttons span {
    width: 40px;
    text-align: center;
    font-weight: 500;
}

.product-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.add-to-cart-modal-btn {
    width: 100%;
    background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 15px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.add-to-cart-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 90, 118, 0.4);
}

/* Responsive styles */
@media (max-width: 768px) {
    .product-modal-content {
        flex-direction: column;
        padding: 20px;
    }
    
    .product-gallery,
    .product-details {
        max-width: 100%;
        padding-left: 0;
    }
    
    .product-gallery {
        margin-bottom: 30px;
    }
    
    .main-image {
        height: 250px;
    }
}

/* Checkout Modal Styles */
.checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    padding: 20px;
}

.checkout-modal {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

.checkout-modal h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

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

.checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.checkout-form input,
.checkout-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 16px;
}

.checkout-form .order-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

.checkout-form .order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 20px;
}

.checkout-actions {
    display: flex;
    gap: 15px;
}

.checkout-actions button {
    flex: 1;
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
}

.cancel-checkout-btn {
    background-color: var(--light-color);
    border: 1px solid var(--light-gray);
    color: var(--gray-color);
}

.complete-order-btn {
    background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
}