/* =========================================================
   PRODUCT GALLERY
   ========================================================= */

.product-gallery {
    width: 100%;
}


    /* =========================================================
   MAIN IMAGE
   ========================================================= */

    .product-gallery .main-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        position: relative;
        overflow: hidden;
        background: #f8f9fa;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: zoom-in;
    }


        /*
    قاب اصلی همیشه اندازه ثابتی دارد.
    بنابراین نسبت تصویر محصول باعث جابه‌جایی Layout نمی‌شود.
*/

        .product-gallery .main-image img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
            transition: transform 0.3s ease;
        }


            /* Zoom */

            .product-gallery .main-image img.zoomed {
                transform: scale(1.5);
                cursor: zoom-out;
            }


    /* =========================================================
   THUMBNAILS
   ========================================================= */

    .product-gallery .thumbnails {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 16px;
        justify-content: flex-start;
    }


    /*
    button استفاده شده تا thumbnail
    از نظر دسترسی و کلیک رفتار بهتری داشته باشد.
*/

    .product-gallery .thumbnail-item {
        flex: 0 0 80px;
        width: 80px;
        height: 80px;
        padding: 0;
        border: 2px solid transparent;
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
        cursor: pointer;
        transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    }


        /* Thumbnail Image */

        .product-gallery .thumbnail-item img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            border-radius: 6px;
        }


        /* Active Thumbnail */

        .product-gallery .thumbnail-item.active {
            border-color: var(--primary-color);
        }


        /* Hover */

        .product-gallery .thumbnail-item:hover {
            border-color: var(--secondary-color);
            transform: translateY(-2px);
        }


        /* Focus برای موبایل و دسترسی */

        .product-gallery .thumbnail-item:focus-visible {
            outline: 2px solid var(--primary-color);
            outline-offset: 2px;
        }


/* =========================================================
   PRODUCT INFO
   ========================================================= */

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.product-price .current-price {
    font-weight: bold;
}

.product-price .original-price {
    font-size: 1.2rem;
}

.discount-badge {
    font-size: 0.9rem;
    font-weight: bold;
}


/* =========================================================
   QUANTITY
   ========================================================= */

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

    .quantity-selector .btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.quantity-input {
    width: 70px;
    text-align: center;
    font-weight: bold;
}


/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.action-buttons .btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}


/* =========================================================
   PRODUCT TABS
   ========================================================= */

.product-tabs .nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

    .product-tabs .nav-tabs .nav-link {
        border: none;
        color: var(--text-light);
        font-weight: 500;
        padding: 1rem 1.5rem;
        position: relative;
    }

        .product-tabs .nav-tabs .nav-link.active {
            color: var(--primary-color);
            background: none;
            border-bottom: 3px solid var(--primary-color);
        }

        .product-tabs .nav-tabs .nav-link:hover {
            color: var(--primary-color);
        }


/* =========================================================
   RATING
   ========================================================= */

.rating-bars .progress {
    height: 8px;
}

.rating-bar-item {
    font-size: 0.9rem;
}


/* =========================================================
   REVIEW STARS
   ========================================================= */

.star-label {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

    .star-label:hover,
    .star-label:hover ~ .star-label {
        color: #ffc107;
    }

.rating-input input:checked ~ .star-label {
    color: #ffc107;
}

.rating-input input:checked + .star-label {
    color: #ffc107;
}


/* =========================================================
   PRODUCT FEATURES
   ========================================================= */

.product-features li {
    font-size: 0.95rem;
}

.features-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 10px 0;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    transition: all 0.2s;
}

    .feature-tag:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

.feature-label {
    font-weight: 600;
    color: #495057;
    margin-left: 4px;
}

.feature-value {
    color: #212529;
}

.fa-circle-check {
    color: #28a745;
    font-size: 14px;
}


/* =========================================================
   SHARE BUTTONS
   ========================================================= */

.share-buttons .btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
    color: #666;
}

    .share-buttons .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

        .share-buttons .btn:hover .fa-whatsapp {
            color: #25d366;
        }

        .share-buttons .btn:hover .fa-telegram {
            color: #0088cc;
        }

        .share-buttons .btn:hover .fa-instagram {
            color: #e4405f;
        }

        .share-buttons .btn:hover .fa-link {
            color: #6c757d;
        }


/* =========================================================
   RELATED PRODUCTS
   ========================================================= */

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}


/* =========================================================
   ARTIST STORY
   ========================================================= */

.artist-story .card {
    border-right: 4px solid var(--primary-color);
}


/* =========================================================
   COLOR OPTIONS
   ========================================================= */

.color-option {
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

    .color-option:hover {
        transform: scale(1.1);
    }

    .color-option.selected {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.3);
    }


/* =========================================================
   SIZE OPTIONS
   ========================================================= */

.size-option {
    min-width: 60px;
    text-align: center;
}


/* =========================================================
   REVIEW
   ========================================================= */

.review-item .review-header {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.review-response {
    border-right: 3px solid var(--primary-color);
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: bold;
}


/* =========================================================
   TOAST
   ========================================================= */

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

    .toast-notification.success {
        background: #4caf50;
        color: white;
    }

    .toast-notification.error {
        background: #dc3545;
        color: white;
    }

    .toast-notification.show {
        transform: translateX(0);
        opacity: 1;
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .product-detail {
        padding-top: 25px !important;
        padding-bottom: 25px !important;
    }


    /* Main image */

    .product-gallery .main-image {
        aspect-ratio: 1 / 1;
        width: 100%;
        border-radius: 10px;
    }

        .product-gallery .main-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }


    /* Thumbnails */

    .product-gallery .thumbnails {
        justify-content: flex-start;
        gap: 8px;
        margin-top: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 2px 2px 8px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .product-gallery .thumbnail-item {
        flex: 0 0 68px;
        width: 68px;
        height: 68px;
        border-radius: 7px;
    }


    /* Product title */

    .product-title {
        font-size: 1.8rem;
    }


    /* Action buttons */

    .action-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }


    /* Features */

    .features-wrapper {
        gap: 8px;
    }

    .feature-tag {
        font-size: 13px;
        padding: 6px 10px;
    }


    /* Tabs */

    .product-tabs .nav-tabs .nav-link {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .product-gallery .main-image {
        aspect-ratio: 1 / 1;
    }

    .product-gallery .thumbnail-item {
        flex-basis: 62px;
        width: 62px;
        height: 62px;
    }
}
