/* Product Modal Styles */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    direction: ltr;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 1000px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

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

.product-modal-container {
    display: flex;
    flex-wrap: wrap;
}

.product-modal-image {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.product-modal-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.product-modal-details {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.product-modal-details h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    color: #333;
}

.product-modal-price {
    margin-bottom: 15px;
}

.product-modal-price .current-price {
    font-size: 24px;
    font-weight: bold;
    color: #e91e63;
    margin-right: 10px;
}

.product-modal-price .old-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.product-modal-rating {
    margin-bottom: 15px;
    color: #ffc107;
}

.product-modal-rating .rating-count {
    color: #666;
    margin-left: 5px;
}

.product-availability {
    margin-bottom: 15px;
    font-size: 16px;
    color: #4caf50;
}

.product-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

.product-description p {
    margin-bottom: 10px;
}

/* Product sizes and colors */
.product-sizes,
.product-colors {
    margin-bottom: 20px;
}

.product-sizes h4,
.product-colors h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
    font-family: 'Tajawal', sans-serif;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.size-option {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.size-option:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(233, 30, 99, 0.05);
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 0;
}

.size-option:hover:before {
    transform: translateY(0);
}

.size-option:hover {
    border-color: #e91e63;
    color: #e91e63;
}

.size-option.active {
    background-color: #e91e63;
    color: white;
    border-color: #e91e63;
    box-shadow: 0 2px 5px rgba(233, 30, 99, 0.3);
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #333;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e91e63;
}

.color-option:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s;
}

.color-option.active:after {
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(1);
}

.product-modal-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.quantity-input {
    width: 50px;
    height: 40px;
    text-align: center;
    border: none;
    border-right: 1px solid #ddd;
    border-left: 1px solid #ddd;
    font-size: 16px;
}

.add-to-cart-btn {
    background-color: #e91e63;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background-color: #d81b60;
}

.wishlist-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.wishlist-btn:hover {
    background-color: #ffebee;
    color: #e91e63;
    border-color: #e91e63;
}

/* Make modal responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .product-modal-container {
        flex-direction: column;
    }
    
    .product-modal-image, 
    .product-modal-details {
        min-width: 100%;
    }
}

/* Loading indicator in product modal */
.product-loading {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.product-loading p {
    color: #555;
    font-size: 16px;
    margin: 0;
}

.product-loading::after {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #ddd;
    border-top-color: #e91e63;
    margin: 15px auto 0;
    animation: spin 1s linear infinite;
}

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

/* Product variations */
.product-variations {
    margin-bottom: 20px;
}

.color-options,
.size-options {
    margin-bottom: 15px;
}

.color-options h4,
.size-options h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
    font-family: 'Tajawal', sans-serif;
}

.color-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #333;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e91e63;
}

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

.size-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.size-btn:hover {
    border-color: #e91e63;
    color: #e91e63;
}

.size-btn.active {
    background-color: #e91e63;
    color: white;
    border-color: #e91e63;
    box-shadow: 0 2px 5px rgba(233, 30, 99, 0.3);
} 