/* =============================================
   PRODUCT DETAILS - Talla Store S-Tier Styling
   ============================================= */

.product-gallery .main-image img {
    height: auto;
    max-height: 500px;
    object-fit: cover;
    width: 100%;
}

.gallery-thumbnails {
    max-width: 100%;
}

.gallery-thumb,
.gallery-side-thumbs img {
    border: 2px solid transparent !important;
    cursor: pointer;
    height: 80px;
    object-fit: cover;
    transition: all var(--talla-transition);
    width: 80px;
}

.gallery-side-thumbs img {
    border-radius: var(--talla-radius-md);
    height: 85px;
    opacity: 0.6;
}

.gallery-thumb:hover,
.gallery-thumb.border-primary,
.gallery-side-thumbs img.active,
.gallery-side-thumbs img:hover {
    border-color: var(--talla-color-primary) !important;
    opacity: 1;
    transform: scale(1.05);
}

.main-img-large {
    border-radius: var(--talla-radius-lg);
    height: 550px;
    object-fit: cover;
}

/* ===== Product Title ===== */
.product-title {
    color: #212529;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
}

/* ===== Rating Stars ===== */
.product-rating-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.product-rating-wrapper .star-rating {
    font-size: 1rem !important;
}

.product-rating-wrapper .rating-text {
    font-size: 0.9rem;
    color: #6c757d;
}

/* ===== Price Styling (متوسط الحجم) ===== */
.product-price-wrapper {
    margin-bottom: 16px;
}

.product-price-wrapper .price {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--talla-color-primary) !important;
}

.product-price-wrapper .price del {
    font-size: 1.1rem !important;
    color: var(--talla-color-secondary) !important;
    margin-left: 10px;
}

.product-price-wrapper .price ins {
    text-decoration: none;
}

/* ===== Short Description ===== */
.product-short-description {
    color: var(--talla-color-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ===== Color Swatches - دوائر الألوان الأنيقة ===== */
.color-swatches-wrapper {
    margin-bottom: 24px;
}

.color-swatches-wrapper label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
    margin-bottom: 10px;
    display: block;
}

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

.color-swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #e9ecef;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.color-swatch:hover {
    transform: scale(1.15);
    border-color: #212529;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.color-swatch.active {
    border-color: #212529;
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(33,37,41,0.15);
}

.color-swatch.active::after {
    content: "\F26A"; /* Bootstrap Icons check */
    font-family: "bootstrap-icons";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== Size Squares - المقاسات المربعة الإبداعية ===== */
.size-swatches-wrapper {
    margin-bottom: 24px;
}

.size-swatches-wrapper label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
    margin-bottom: 10px;
    display: block;
}

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

.size-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 48px;
    padding: 0 14px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background-color: #fff;
    color: #212529;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.size-swatch:hover {
    background-color: #212529;
    border-color: #212529;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33,37,41,0.2);
}

.size-swatch.active {
    background-color: #212529;
    border-color: #212529;
    color: #fff;
    box-shadow: 0 4px 12px rgba(33,37,41,0.25);
}

/* ===== Quantity Counter ===== */
.quantity-wrapper {
    margin-bottom: 20px;
}

.quantity-wrapper label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
    margin-bottom: 10px;
    display: block;
}

.qty-counter {
    display: inline-flex;
    align-items: center;
    border: 2px solid #dee2e6;
    overflow: hidden;
    background: #fff;
}

.qty-counter .qty-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f8f9fa;
    color: #212529;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-counter .qty-btn:hover {
    background: #212529;
    color: #fff;
}

.qty-counter .qty-btn:active {
    transform: scale(0.95);
}

.qty-counter .qty-input {
    width: 64px;
    height: 38px;
    border: none;
    border-left: 2px solid #dee2e6;
    border-right: 2px solid #dee2e6;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
    outline: none;
}

/* Hide number input spinners */
.qty-counter .qty-input::-webkit-inner-spin-button,
.qty-counter .qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-counter .qty-input[type=number] {
    -moz-appearance: textfield;
}

/* ===== Add to Cart Button ===== */
.add-to-cart-wrapper .add_to_cart_button,
.add-to-cart-wrapper .single_add_to_cart_button {
    height: 56px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.add-to-cart-wrapper .add_to_cart_button:hover,
.add-to-cart-wrapper .single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33,37,41,0.25);
}

/* ===== Product Meta ===== */
.product-meta {
    font-size: 0.9rem;
}

.product-meta p {
    margin-bottom: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .product-title {
        font-size: 1.7rem;
    }

    .product-price-wrapper .price {
        font-size: 1.4rem !important;
    }

    .product-gallery .main-image img {
        max-height: 300px;
    }

    .gallery-thumb {
        height: 60px;
        width: 60px;
    }

    .color-swatch {
        width: 34px;
        height: 34px;
    }

    .size-swatch {
        min-width: 44px;
        height: 42px;
        font-size: 0.8rem;
        padding: 0 10px;
    }

    .qty-counter .qty-btn {
        width: 42px;
        height: 42px;
    }

    .qty-counter .qty-input {
        width: 52px;
        height: 42px;
    }
}

@media (max-width: 576px) {
    .product-title {
        font-size: 1.4rem;
    }

    .product-price-wrapper .price {
        font-size: 1.2rem !important;
    }

    .main-img-large {
        height: 350px;
    }

    .color-swatch {
        width: 30px;
        height: 30px;
    }
}