/* Product Details Page Styles */

.product-images .main-image-container {
    padding: 20px;
}

.product-images .main-image-container img {
    transition: transform 0.3s ease;
}

.product-images .thumbnail-img {
    transition: all 0.3s ease;
    opacity: 0.7;
}

.product-images .thumbnail-img:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: #212529 !important;
}

.product-images .thumbnail-img.active {
    opacity: 1;
    border-color: #212529 !important;
    border-width: 2px !important;
}

/* Color and Size Selection */
.color-option {
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    background: #f8f9fa;
    border-color: #212529 !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-option.selected {
    background: #212529;
    color: white;
    border-color: #212529 !important;
}

.color-option.selected .color-swatch {
    border-color: white !important;
}

.size-option {
    min-width: 60px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 5px;
}
#btn-add-cart.disabled {
    pointer-events: none;
    opacity: .65;
}

    .size-option:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-radius: 5px;
    }

.size-option.selected {
    background: #212529;
    color: white;
    border-color: #212529;
    border-radius:5px;
}

/* Quantity Input */
#product-quantity {
    -moz-appearance: textfield;
}

#product-quantity::-webkit-outer-spin-button,
#product-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Quantity Selection - RTL/LTR Support */
.quantity-selection .input-group {
    direction: ltr;
}

/* الأزرار سودا بنص أبيض */
.quantity-selection #btn-qty-minus,
.quantity-selection #btn-qty-plus {
    background-color: #212529;
    color: #fff;
    border-color: #212529;
    font-weight: bold;
}

.quantity-selection #btn-qty-minus:hover,
.quantity-selection #btn-qty-plus:hover {
    background-color: #000;
    border-color: #000;
}

/* في العربي (RTL): + يمين، - شمال */
[dir="rtl"] .quantity-selection .input-group {
    direction: rtl;
    flex-direction: row-reverse;
}

[dir="rtl"] .quantity-selection #btn-qty-plus {
    order: 1; /* + على اليمين */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

[dir="rtl"] .quantity-selection #product-quantity {
    order: 2; /* في الوسط */
    text-align: center;
}

[dir="rtl"] .quantity-selection #btn-qty-minus {
    order: 3; /* - على الشمال */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Add to Cart Button */
#btn-add-cart {
    transition: all 0.3s ease;
}

#btn-add-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#btn-add-cart:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#btn-wishlist {
    transition: all 0.3s ease;
}

#btn-wishlist:hover {
    transform: scale(1.1);
    color: #dc3545;
    border-color: #dc3545;
}

#btn-wishlist.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Product Tabs */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #212529;
    border-bottom-color: #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #212529;
    background: transparent;
    border-bottom-color: #212529;
    font-weight: 600;
}

/* RTL Support */
[dir="rtl"] .product-info {
    text-align: right;
}

[dir="rtl"] .breadcrumb {
    padding-right: 0;
}

[dir="rtl"] .d-flex.gap-2 {
    direction: rtl;
}

[dir="rtl"] .text-end {
    text-align: right !important;
}

[dir="rtl"] .color-option,
[dir="rtl"] .size-option {
    direction: rtl;
}

[dir="rtl"] .badge {
    right: auto;
    left: 0;
}

[dir="rtl"] .product-price,
[dir="rtl"] .product-title,
[dir="rtl"] .stock-status,
[dir="rtl"] .trust-badges {
    text-align: right;
}

[dir="ltr"] .text-start {
    text-align: left !important;
}

[dir="ltr"] .product-price,
[dir="ltr"] .product-title,
[dir="ltr"] .stock-status,
[dir="ltr"] .trust-badges {
    text-align: left;
}

/* Star Rating (Interactive) */
.star-rating {
    direction: ltr;
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 2rem;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label.star {
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input[type="radio"]:checked ~ label.star,
.star-rating label.star:hover,
.star-rating label.star:hover ~ label.star {
    color: #ffc107;
}

/* Responsive */
@media (max-width: 991px) {
    .product-images .main-image-container {
        padding: 10px;
    }
    
    .product-images .main-image-container img {
        max-height: 400px !important;
    }
}

@media (max-width: 575px) {
    .color-option {
        min-width: auto;
        font-size: 0.875rem;
    }
    
    .size-option {
        min-width: 50px;
        font-size: 0.875rem;
    }
    
    .product-title {
        font-size: 1.5rem !important;
    }
}

