
html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
}

body {
    overflow: auto !important;
    height: auto !important;
    position: relative;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    background-color: var(--color-white);
    color: var(--color-black);
}

/* رفع مشکل هدر */
.header {
    background-color: var(--color-black) !important;
    backdrop-filter: none !important;
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
}

/* کانتینر اصلی */
.product-detail-container {
    padding-top: 80px;
    background-color: var(--color-white);
    min-height: 100vh;
}

.breadcrumb {
    max-width: 1400px;
    margin: 0 auto 1.5rem;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-gray);
    direction: rtl;
}

    .breadcrumb a {
        color: var(--color-gray);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .breadcrumb a:hover {
            color: var(--color-black);
        }

    .breadcrumb .current {
        color: var(--color-black);
        font-weight: 500;
    }

/* ===== طرح 3 ستونه ===== */
.product-detail-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    display: grid;
    grid-template-columns: 350px 1fr 320px;
    gap: 2rem;
    direction: rtl;
    align-items: start;
}

/* ===== ستون چپ: گالری و اکشن‌ها ===== */
.product-gallery-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-main {
    background: var(--color-gray-light);

    border-radius: 0px;
    overflow: hidden;
    position: relative;
    background: white;
}


.main-image-container {
    padding: 1.5rem;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

    .main-image-container img {
        max-width: 100%;
        max-height: 350px;
        object-fit: contain;
    }

/* دکمه‌های اکشن عمودی */
.gallery-actions {
    display: flex;
    
    gap: 0.75rem;
    margin-top: 1rem;
}

.action-btn {
    font-family:var(--primary-font);
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 4px;
    background: white;
    border: 2px solid #e0e0e0;
    
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-black);
    text-decoration: none;
   
}

    .action-btn:hover {
        border-color: var(--color-black);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .action-btn.active {
        border-color: var(--color-accent);
        color: var(--color-accent);
    }

    .action-btn i {
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
    }
.btn-add {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
    border-radius: 0px;
    background-color: gold;
}

.btn-add:hover
{
    background-color:orange;
}
.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid #e0e0e0;

    cursor: pointer;
    background: var(--color-gray-light);
    transition: all 0.2s ease;
    overflow: hidden;
}

    .thumbnail.active {
        border-color: var(--color-black);
    }

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .thumbnail:hover {
        border-color: var(--color-gray);
        transform: translateY(-1px);
    }

/* ===== ستون وسط: اطلاعات اصلی و ویژگی‌ها ===== */
.product-main-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-header {
    text-align: right;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-black);
    line-height: 1.3;
}

.product-category {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

.product-description {
    color: var(--color-gray);
    line-height: 1.6;
    font-size: 0.9rem;
    text-align: right;
    margin-bottom: 1rem;
}

/* انتخاب ویژگی‌ها */
.attribute-selection {
    margin: 1rem 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 1rem;
    border-radius: 0px;
}

.attribute-group {
    margin-bottom: 1rem;
    text-align: right;
}

    .attribute-group:last-child {
        margin-bottom: 0;
    }

.attribute-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-black);
    display: block;
}
.attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: right;
    border-radius: 0px;
}

.attribute-option {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid #dee2e6;
   
    padding: 0.375rem 0.75rem;
    background: white;
    min-width: 50px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
}

    .attribute-option:hover {
        border-color: #007bff;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
    }

    .attribute-option.active {
        background: #ffcb05;
        color: #000000;
    }

    .attribute-option.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: #f8f9fa;
    }

        .attribute-option.disabled:hover {
            border-color: #dee2e6;
            transform: none;
            box-shadow: none;
        }

    /* استایل‌های مخصوص رنگ */
    .attribute-option.color {
        padding: 0.25rem;
        width: 36px;
        height: 36px;
        min-width: 36px;
        display: flex;
        align-items: c
    }

        .attribute-option.color .color-swatch {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 1.5px solid #dee2e6;
            transition: all 0.2s ease;
        }

        .attribute-option.color.active .color-swatch {
            border-color: #007bff;
            transform: scale(1.1);
        }

        .attribute-option.color .option-text {
            display: none;
        }
        .attribute-option.color.active::after {
            content: '✓';
            position: absolute;
            top: -2px;
            right: -2px;
            background: #007bff;
            color: white;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            font-size: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }
.variation-details {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    padding: 0.75rem 1rem;
    border-radius: 0px;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

}

.selected-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius:0px;
}

.attribute-badge {
    background: #ffc107;
    color: white;
    padding: 0.25rem 0.5rem;

    font-size: 0.75rem;
    font-weight: 500;
}

.variation-pricing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#variation-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-black);
}

#variation-regular-price {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: line-through;
}

#variation-discount {
    background: #28a745;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 0px;
    font-size: 0.75rem;
    font-weight: 600;
}

.variation-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

#variation-stock-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}
#no-variation-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 0px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
    .attribute-option.size {
        min-width: 45px;
        font-weight: 600;
    }

    .attribute-option.material {
        text-transform: capitalize;
    }
/* ===== ستون راست: قیمت و خرید ===== */
.product-purchase-sidebar {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 0px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.price-section {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.current-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-black);
    display: block;
    margin-bottom: 0.5rem;
}

.original-price {
    font-size: 1.1rem;
    color: var(--color-gray);
    text-decoration: line-through;
    display: block;
    margin-bottom: 0.5rem;
}

.discount-badge {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0px;
    display: inline-block;
}

/* انتخاب تعداد */
.quantity-section {
    margin-bottom: 1.5rem;
}

.quantity-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-black);
    font-size: 0.9rem;
}

.quantity-selector {
    border: 1px solid #ced4da;

    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.quantity-btn {
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .quantity-btn:hover {
        background: #e9ecef;
    }

.quantity-input {
    border: none;
    width: 60px;
    height: 44px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    flex: 1;
}

    .quantity-input:focus {
        outline: none;
    }

/* دکمه‌های اقدام */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.add-to-cart-btn {
    background-color: orangered;
    color: var(--color-white);
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0px;
    width: 100%;
    font-family:var(--primary-font);
}

    .add-to-cart-btn:hover {
        background-color: var(--color-accent);
        transform: translateY(-2px);
    }

.buy-now-btn {
    background-color: transparent;
    color: var(--color-black);
    border: 2px solid var(--color-black);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0px;
    width: 100%;
    font-family: var(--primary-font);
}

    .buy-now-btn:hover {
        background-color: var(--color-black);
        color: var(--color-white);
        transform: translateY(-2px);
    }

/* اطلاعات متا */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

    .meta-item:last-child {
        border-bottom: none;
    }

.meta-label {
    font-weight: 600;
    color: var(--color-black);
    font-size: 0.85rem;
}

.meta-value {
    color: var(--color-gray);
    font-size: 0.8rem;
}

    .meta-value.in-stock {
        color: #28a745;
        font-weight: 600;
    }

    .meta-value.out-of-stock {
        color: #dc3545;
        font-weight: 600;
    }


.product-bottom-sections {
    max-width: 1400px;
    margin: 2rem auto 0;
  /*  padding: 0 2rem;*/
}

/* تب‌ها */
.product-tabs {
    border: 1px solid #e0e0e0;
    border-radius: 0px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.tabs-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    font-weight: 500;
}

    .tab-btn.active {
        color: #007bff;
        border-bottom-color: #007bff;
        background: white;
    }

    .tab-btn:hover:not(.active) {
        color: #495057;
        background: rgba(255, 255, 255, 0.5);
    }

.tabs-content {
    padding: 1.5rem;
    background: white;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

    .tab-panel.active {
        display: block;
    }

/* مشخصات فنی */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.spec-label {
    font-weight: 600;
    color: var(--color-black);
}

.spec-value {
    color: var(--color-gray);
}

/* نظرات کاربران */
.reviews-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0px;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
}

.average-rating {
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-black);
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #ddd;
    font-size: 1.2rem;
}

    .star.filled {
        color: #ffc107;
    }

.rating-count {
    color: #6c757d;
    font-size: 0.875rem;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.star-label {
    width: 60px;
    font-size: 0.8rem;
    color: #6c757d;
}

.bar {
    flex: 1;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 0px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background-color: #ffc107;
    border-radius: 0px;
    transition: width 0.3s ease;
}

.percentage {
    width: 30px;
    font-size: 0.8rem;
    color: #6c757d;
    text-align: left;
}

/* محصولات مرتبط */
.related-products {
    margin: 2rem 0;
}

.section-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: right;
    color: var(--color-black);
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.related-product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0px;
    text-align: right;
    transition: all 0.3s ease;
    overflow: hidden;
}

    .related-product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .related-product-card .product-image {
        padding: 1rem;
      
        height: 180px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

        .related-product-card .product-image img {
            max-width: 100%;
            max-height: 180px;
            object-fit: contain;
        }

    .related-product-card .product-info {
        padding: 1rem;
        gap: 0.5rem;
        text-align:center;
    }

    .related-product-card .product-name {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
        color: var(--color-black);
        line-height: 1.3;
        height:50px;
    }

    .related-product-card .product-spec {
        font-size: 0.75rem;
        color: var(--color-gray);
        margin-bottom: 0.75rem;
    }

    .related-product-card .product-price {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--color-black);
        justify-content: right;
        margin-bottom: 0.5rem;
    }

    .related-product-card .product-link {
        color: #f8f9fa;
        text-decoration: none;
        font-size: 0.8rem;
        display: block;
        margin-top: 0.5rem;
        font-weight: 500;
        transition: color 0.2s ease;
        border-radius:0px;
    }

        .related-product-card .product-link:hover {
            color: var(--color-accent);
        }

/* ===== کلاس‌های کمکی ===== */
.d-none {
    display: none !important;
}

.text-center {
    text-align: center !important;
}

.text-muted {
    color: #6c757d !important;
}

/* ===== انیمیشن‌ها ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== رسپانسیو ===== */
@media (max-width: 1200px) {
    .product-detail-content {
        grid-template-columns: 250px 1fr 350px;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-purchase-sidebar {
        position: static;
        order: 3;
    }

    .product-gallery-sidebar {
        order: 1;
    }

    .product-main-info {
        order: 2;
    }
}

@media (max-width: 768px) {
    .product-detail-container {
        padding-top: 70px;
    }

    .breadcrumb,
    .product-detail-content,
    .product-bottom-sections {
        padding: 0 1rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .tabs-header {
        flex-direction: column;
    }

    .tab-btn {
        flex: none;
        min-width: auto;
        border-bottom: none;
        border-right: 2px solid transparent;
        text-align: right;
    }

        .tab-btn.active {
            border-right-color: #007bff;
            border-bottom: none;
        }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .gallery-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    .attribute-selection {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .attribute-options {
        gap: 0.25rem;
        justify-content: flex-start;
    }

    .attribute-option {
        flex: 0 0 calc(33.333% - 0.25rem);
        max-width: calc(33.333% - 0.25rem);
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

        .attribute-option.color {
            flex: 0 0 calc(20% - 0.25rem);
            max-width: calc(20% - 0.25rem);
            width: 32px;
            height: 32px;
        }

            .attribute-option.color .color-swatch {
                width: 20px;
                height: 20px;
            }

    .variation-pricing {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .product-detail-content {
        gap: 1.5rem;
    }

    .main-image-container {
        min-height: 300px;
    }

        .main-image-container img {
            max-height: 250px;
        }

    .thumbnail {
        width: 50px;
        height: 50px;
    }

    .attribute-option {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* فعال کردن اسکرول با غلطک موس */

/* Add these color classes to your CSS */
.color-swatch.black {
    background-color: #000000;
}

.color-swatch.white {
    background-color: #ffffff;
    border-color: #ccc;
}

.color-swatch.silver {
    background-color: #c0c0c0;
}

.color-swatch.gray {
    background-color: #808080;
}

.color-swatch.red {
    background-color: #ff0000;
}

.color-swatch.blue {
    background-color: #0000ff;
}

.color-swatch.green {
    background-color: #008000;
}

.color-swatch.yellow {
    background-color: #ffff00;
}

.color-swatch.orange {
    background-color: #ffa500;
}

.color-swatch.purple {
    background-color: #800080;
}

.color-swatch.pink {
    background-color: #ffc0cb;
}

.color-swatch.brown {
    background-color: #a52a2a;
}

.color-swatch.gold {
    background-color: #ffd700;
}

.color-swatch.navy {
    background-color: #000080;
}

.color-swatch.maroon {
    background-color: #800000;
}

.color-swatch.teal {
    background-color: #008080;
}

.color-swatch.cyan {
    background-color: #00ffff;
}

.color-swatch.beige {
    background-color: #f5f5dc;
}

/* Compact Reviews Styles */
.compact-rating-bars {
    margin-top: 1rem;
}

.compact-rating-bar {
    font-size: 0.8rem;
}

.compact-star-label {
    color: #666;
    text-align: left;
}

.compact-bar {
    background-color: #e9ecef;
}

.compact-fill {
    background-color: #ffc107;
}

.compact-count {
    text-align: left;
}

/* Compact Rating Input */
.compact-rating-input {
    display: flex;
    gap: 0.25rem;
    direction: ltr;
    justify-content: flex-end;
}

.compact-star-label-btn {
    font-size: 1.5rem;
    transition: color 0.2s;
}

    .compact-star-label-btn:hover {
        color: #ffc107 !important;
    }

/* Compact Reviews List */
.compact-review-item {
    transition: background-color 0.2s;
}

    .compact-review-item:hover {
        background-color: #f8f9fa;
    }

.compact-review-content {
    margin-right: 40px;
}

.compact-review-comment {
    color: #444;
}

.compact-review-images img {
    transition: transform 0.2s;
}

    .compact-review-images img:hover {
        transform: scale(1.05);
    }

.compact-star.filled {
    color: #ffc107;
}

.compact-star {
    color: #ddd;
}

/* Form Controls */
.form-control-sm {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .compact-review-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .compact-rating-input {
        justify-content: center;
    }
}

/* Read More Link */
.read-more {
    text-decoration: none;
    font-size: 0.8rem;
}

    .read-more:hover {
        text-decoration: underline;
    }

/* More Images Count */
.more-images-count {
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.8;
}

    .more-images-count:hover {
        opacity: 1;
    }

/* Helpful Buttons */
.compact-review-helpful .btn {
    font-size: 0.75rem;
}

/* Avatar Styles */
.compact-reviewer-avatar {
    font-weight: 600;
    background-color: #007bff;
}
/* ===== Compact Reviews Styles ===== */
.compact-rating-bars {
    margin-top: 1rem;
}

.compact-rating-bar {
    font-size: 0.8rem;
}

.compact-star-label {
    color: #666;
    text-align: left;
}

.compact-bar {
    background-color: #e9ecef;
}

.compact-fill {
    background-color: #ffc107;
}

.compact-count {
    text-align: left;
}

/* Compact Rating Input */
.compact-rating-input {
    display: flex;
    gap: 0.25rem;
    direction: ltr;
    justify-content: flex-end;
}

.compact-star-label-btn {
    font-size: 1.5rem;
    transition: color 0.2s;
    cursor: pointer;
}

    .compact-star-label-btn:hover {
        color: #ffc107 !important;
    }

/* Compact Reviews List */
.compact-review-item {
    transition: background-color 0.2s;
}

    .compact-review-item:hover {
        background-color: #f8f9fa;
    }

.compact-review-content {
    margin-right: 40px;
}

.compact-review-comment {
    color: #444;
}

.compact-review-images img {
    transition: transform 0.2s;
}

    .compact-review-images img:hover {
        transform: scale(1.05);
    }

.compact-star.filled {
    color: #ffc107;
}

.compact-star {
    color: #ddd;
}

/* Form Controls */
.form-control-sm {
    font-size: 0.875rem;
}

/* Read More Link */
.read-more {
    text-decoration: none;
    font-size: 0.8rem;
    cursor: pointer;
}

    .read-more:hover {
        text-decoration: underline;
    }

/* More Images Count */
.more-images-count {
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.8;
}

    .more-images-count:hover {
        opacity: 1;
    }

/* Helpful Buttons */
.compact-review-actions .btn {
    font-size: 0.75rem;
}

.helpful-btn.active {
    color: #007bff;
    border-color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .compact-review-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .compact-rating-input {
        justify-content: center;
    }
}

.desc_text{
    font-size:14px;
    text-align:justify;
}















#reviews {
    max-height: 800px; /* Adjust as needed */
    overflow-y: auto;
    padding: 15px;
}



/* Fix star rating display */
.compact-star-label-btn {
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
    padding: 0 2px;
}

    .compact-star-label-btn.text-warning {
        color: #ffc107 !important;
    }
/* Attribute selection styling */
.attribute-option {
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin: 4px;
    transition: all 0.2s;
}

    .attribute-option:hover {
        border-color: #0d6efd;
        background-color: #f8f9fa;
    }

    .attribute-option.active {
        border-color: #d7d7d7 !important;
        background-color: #d7d7d7;
        color: #20467d;
    }

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    border: 1px solid #ddd;
}

.selection-required {
    color: #dc3545;
    font-size: 0.9em;
}

/* Quantity selector */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 150px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .quantity-btn:hover {
        background-color: #f8f9fa;
    }

    .quantity-btn:active {
        background-color: #e9ecef;
    }

.quantity-input {
    width: 60px;
    height: 40px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 1rem;
}

    .quantity-input:focus {
        outline: none;
    }

/* Action buttons */
.btn-action {
    padding: 12px 24px;
    font-weight: 500;
    margin-bottom: 8px;
    width: 100%;
    border-radius:0px;
}

/* Reviews styling */
.compact-star-label-btn {
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
    padding: 0 2px;
}

    .compact-star-label-btn.text-warning {
        color: #ffc107 !important;
    }

.compact-review-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

    .compact-review-item:last-child {
        border-bottom: none;
    }

/* Product layout */
.product-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}



/* Gallery */


.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    border: 2px solid transparent;
    border-radius: 0px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

    .thumbnail:hover {
        border-color: #ddd;
    }

    .thumbnail.active {
        border-color: #ffc107;
    }

/* Product info */
.product-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.product-title {
    font-size: 1.8rem;
    line-height: 1.3;
}

/* Action card */
.action-card {
    background: #f8f9fa;
    border-radius: 0px;
    padding: 25px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.price-display {
    background: white;
    padding: 20px;
    border-radius: 0px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: #dc3545;
}

.original-price {
    font-size: 1.2rem;
    color: #6c757d;
    text-decoration: line-through;
}

.discount-badge {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 0px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Variation summary */
.variation-summary {
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
}

.no-variation-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    color: #721c24;
    margin-bottom: 20px;
}

/* Tabs */
.product-tabs {
    margin-top: 40px;
}

.tabs-header {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
}

    .nav-tabs .nav-link:hover {
        color: #0d6efd;
        background: transparent;
    }

    .nav-tabs .nav-link.active {
        color: #0d6efd;
        background: white;
        border-bottom: 3px solid #0d6efd;
    }

.tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
   
    min-height: 300px;
}

/* Related products */
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-product-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

    .related-product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

/* Responsive styles for product detail page */

/* Base mobile-first adjustments */
.product-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    width: 100%;
}

/* Responsive grid layout */
.product-detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Tablet breakpoint */
@media (min-width: 768px) {
    .product-detail-content {
        grid-template-columns: 1fr 1fr;
    }

    .product-gallery-column {
        grid-column: 1 / 3;
    }
}

/* Desktop breakpoint */
@media (min-width: 992px) {
    .product-detail-content {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .product-gallery-column {
        grid-column: 1;
    }

    .product-info-column {
        grid-column: 2;
    }

    .product-action-column {
        grid-column: 3;
    }
}

/* Gallery responsiveness */
.gallery-main {
    max-width: 100%;
    overflow: hidden;
}

    .gallery-main img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
}

@media (min-width: 768px) {
    .thumbnail {
        width: 80px;
        height: 80px;
    }
}

/* Price display responsiveness */
.price-display {
    padding: 15px;
    text-align: center;
}

.current-price {
    font-size: 1.5rem;
    font-weight: bold;
}

@media (min-width: 768px) {
    .current-price {
        font-size: 2rem;
    }
}

/* Attribute selection responsiveness */
.attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attribute-option {
    flex: 1 0 auto;
    min-width: 80px;
    text-align: center;
    padding: 10px;
    margin: 2px;
}

@media (min-width: 768px) {
    .attribute-option {
        min-width: 100px;
    }
}

/* Quantity selector fix */
.quantity-selector {
    display: flex;
    max-width: 150px;
    margin: 0 auto;
}

.quantity-input {
    width: 60px;
    flex: 1;
}

/* Action buttons responsiveness */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .action-buttons .btn {
        width: 100%;
        padding: 10px;
        border-radius:0px !important;
        margin:2px;
    }

@media (min-width: 768px) {
    .action-buttons {
        flex-direction: row;
    }

        .action-buttons .btn {
            width: auto;
            flex: 1;
        }
}

/* Product tabs responsiveness */
.product-tabs {
    overflow-x: auto;
}

.tabs-header {
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    min-width: 100%;
}

    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 12px 15px;
        font-size: 14px;
    }

@media (min-width: 768px) {
    .nav-tabs .nav-link {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* Reviews section responsiveness */
.compact-reviews-summary {
    margin-bottom: 20px;
}

.compact-add-review {
    margin-bottom: 20px;
}

.compact-reviews-list {
    max-height: 600px;
    overflow-y: auto;
}

/* Related products grid */
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

@media (max-width: 767px) {
    .related-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 2fr));
        gap: 10px;
    }
}

/* Fix text overflow */
.product-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.desc_text {
    text-align: justify;
    line-height: 1.8;
}

/* Fix mobile menu for product detail */
@media (max-width: 767px) {
    .breadcrumb {
        font-size: 12px;
        flex-wrap: wrap;
    }

    .product-header {
        padding: 15px 0;
    }

    .product-title {
        font-size: 1.3rem;
        line-height: 1.4;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* Fix review form on mobile */
    .compact-add-review {
        padding: 15px;
    }

        .compact-add-review .form-control {
            font-size: 14px;
        }

    /* Fix tab content padding */
    .tab-content {
        padding: 15px;
    }

    /* Fix action card padding */
    .action-card {
        padding: 15px;
    }
}

/* Fix for very small screens */
@media (max-width: 480px) {
    .product-detail-container {
        padding: 10px;
    }

    .gallery-thumbnails {
        justify-content: flex-start;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }

    .attribute-option {
        min-width: 70px;
        padding: 8px 5px;
        font-size: 13px;
    }

    .current-price {
        font-size: 1.3rem;
    }

    .btn-action {
        padding: 10px;
        font-size: 14px;
    }
}

/* Fix for landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .product-detail-content {
        display: flex;
        flex-wrap: wrap;
    }

    .product-gallery-column {
        flex: 0 0 40%;
    }

    .product-info-column,
    .product-action-column {
        flex: 0 0 30%;
    }

    .gallery-main img {
        max-height: 300px;
    }
}

/* Fix for iOS Safari input zoom */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Improve touch targets for mobile */
@media (max-width: 767px) {
    .btn,
    .attribute-option,
    .thumbnail,
    .nav-link {
        min-height: 44px; /* Apple's recommended minimum touch target */
       /* display: flex;*/
        align-items: center;
        justify-content: center;
    }

    .quantity-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Fix for fixed header overlap */
body {
    padding-top: 50px; /* Height of your fixed header */
}

@media (max-width: 767px) {
    body {
        padding-top: 40px;
    }
}

/* Loading state improvements */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

@media (max-width: 767px) {
    .spinner-border {
        width: 1.5rem;
        height: 1.5rem;
    }
}








/* Specifications Tab Styling */
.price-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

    .price-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

.selected-variation-card {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.1) 100%);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.variation-detail-item {
    padding: 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 0px;
}

.detail-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.variations-table-container .table th {
    font-weight: 600;
    font-size: 0.9rem;
    background-color: #f8f9fa;
}

.variations-table-container .table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.variation-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .variation-row:hover {
        background-color: rgba(13, 110, 253, 0.05) !important;
    }

    .variation-row.table-success {
        background-color: rgba(25, 135, 84, 0.1) !important;
        border-left: 3px solid #198754;
    }

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

.spec-card {
    transition: box-shadow 0.3s ease;
}

    .spec-card:hover {
        box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    }

.price-cell {
    min-width: 100px;
}

.bg-gradient-primary-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .variations-table-container .table {
        font-size: 0.8rem;
    }

    .variations-table-container .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
}

.three-d-section {
    margin-top: 30px;
}

.three-d-container {
    background: #f8f9fa;
    transition: all 0.3s ease;
}

    .three-d-container:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.three-d-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
}

    .three-d-image-wrapper img {
        transition: transform 0.3s ease;
    }

    .three-d-image-wrapper:hover img {
        transform: scale(1.02);
    }

.three-d-info {
    padding: 20px;
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    /* این خطوط برای زیبایی و هم‌ترازی آیکون و متن است */
    padding: 10px 0; /* کمی پدینگ برای زیبایی */
    border-bottom: 1px solid #eee; /* خط جداکننده */
    margin-bottom: 10px; /* فاصله از محتوا */
}

    .collapsible-header h4 {
        margin: 0; /* حذف مارجین اضافی h4 */
        display: flex;
        align-items: center;
    }

    .collapsible-header .collapse-icon {
        transition: transform 0.3s ease-in-out;
        margin-left: 8px; /* فاصله آیکون از متن (در RTL) */
        font-size: 0.9em; /* کمی کوچکتر کردن آیکون */
    }

        .collapsible-header .collapse-icon.collapsed {
            transform: rotate(-90deg);
        }

.collapsible-content {
    display: none; /* پیش‌فرض بسته */
    overflow: hidden; /* برای انیمیشن‌های آینده (اختیاری) */
    /* padding-top: 10px; */ /* اگر لازم دیدید، پدینگ بالا را برگردانید */
    transition: all 0.3s ease-in-out; /* برای انیمیشن‌های آینده (اختیاری) */
}

/* برای استایل‌دهی بهتر به attribute-options */
.attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* فاصله بین گزینه‌ها */
}

.attribute-option {
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 0px;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
    /*display: flex;*/
    align-items: center;
}

    .attribute-option:hover {
        background-color: #e2e6ea;
        border-color: #b0b4b8;
    }

    .attribute-option.selected { /* اگر کلاسی برای انتخاب دارید */
        background-color: #007bff;
        color: white;
        border-color: #007bff;
    }

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
    margin-left: 8px; /* فاصله از متن (در RTL) */
}

.selection-required {
    color: red;
    font-size: 0.9em;
    margin-right: 5px; /* فاصله ستاره از متن */
}



/*اسکرول*/

.specifications-scroll::-webkit-scrollbar {
    width: 6px;
}

.specifications-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

    .specifications-scroll::-webkit-scrollbar-thumb:hover {
        background: #999;
    }



.nav-tabsX {
    position: sticky;
    top: 0;
    z-index: 15;
    background: #fff;
    padding-top: 5px;
}



.tab-scroll-body {
    max-height: 40vh; 
    overflow-y: auto;
    padding: 15px;
}


@media (min-width: 992px) {
    .tab-scroll-body {
        max-height: 50vh; 
    }
}


@media (max-width: 767px) {
    .tab-scroll-body {
        max-height: 35vh; 
    }
}
.row-related {
    --bs-gutter-x 1.5rem : 1.5rem;
    --bs-gutter-y: 0;
   /* display: flex;*/
    flex-wrap: wrap;
  
}