/* =========================================
   KhodroSup Single Product Page
========================================= */

.product-page{

    width:95%;

    max-width:1400px;

    margin:30px auto;

}


/* =========================================
   PRODUCT TOP
========================================= */

.product-top{

    display:flex;

    align-items:flex-start;

    gap:50px;

    background:#fff;

    padding:35px;

    border-radius:20px;

    box-shadow:0 5px 25px rgba(0,0,0,.08);

}


/* =========================================
   PRODUCT GALLERY
========================================= */

.product-gallery{

    width:480px;

    flex-shrink:0;

}


/* =========================================
   MAIN IMAGE AREA
========================================= */

.main-image-wrapper{

    position:relative;

    width:100%;

    aspect-ratio:1 / 1;

    display:flex;

    align-items:center;

    justify-content:center;

}


.main-image{

    width:100%;

    aspect-ratio:1 / 1;

    background:#f8f8f8;

    border-radius:18px;

    display:flex;

    align-items:center;

    justify-content:center;

    overflow:hidden;

    border:1px solid #eee;

}


.main-image img{

    width:100% !important;

    height:100% !important;

    object-fit:contain !important;

    padding:20px;

    border-radius:18px;

    display:block;

}


/* =========================================
   GALLERY ARROWS
========================================= */

.gallery-arrow{

    position:absolute;

    z-index:5;

    top:50%;

    transform:translateY(-50%);

    width:45px;

    height:45px;

    border-radius:50%;

    background:rgba(0,0,0,.65);

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:22px;

    cursor:pointer;

    transition:.25s;

}


.gallery-arrow:hover{

    background:#d60000;

    transform:translateY(-50%) scale(1.08);

}


.gallery-prev{

    right:15px;

}


.gallery-next{

    left:15px;

}


/* =========================================
   THUMBNAILS
========================================= */

.product-thumbs{

    display:flex;

    align-items:center;

    justify-content:flex-start;

    gap:12px;

    margin-top:15px;

    overflow-x:auto;

    padding:5px 2px 10px;

}


.product-thumbs::-webkit-scrollbar{

    height:5px;

}


.product-thumbs::-webkit-scrollbar-thumb{

    background:#ccc;

    border-radius:10px;

}


.product-thumb{

    width:78px;

    height:78px;

    min-width:78px;

    padding:0;

    background:#f8f8f8;

    border:2px solid transparent;

    border-radius:10px;

    overflow:hidden;

    cursor:pointer;

    transition:.25s;

}


.product-thumb:hover{

    border-color:#aaa;

}


.product-thumb.active{

    border-color:#d60000;

}


.product-thumb img{

    width:100%;

    height:100%;

    object-fit:contain;

    display:block;

}


/* =========================================
   PRODUCT INFO
========================================= */

.product-info{

    flex:1;

    min-width:0;

}


.product-info h1{

    font-size:30px;

    font-weight:800;

    color:#222;

    margin-bottom:20px;

    line-height:1.8;

}


.product-code{

    font-size:14px;

    color:#777;

    margin-bottom:10px;

}


.product-code strong{

    color:#444;

}


.product-price{

    font-size:27px;

    font-weight:bold;

    color:#198754;

    margin:20px 0;

}


.discount{

    display:inline-block;

    background:#fff3f3;

    color:#d60000;

    border-radius:8px;

    padding:8px 15px;

    margin-bottom:15px;

}


.stock{

    margin:15px 0;

}


.available{

    display:inline-block;

    background:#198754;

    color:#fff;

    padding:7px 16px;

    border-radius:30px;

    font-size:14px;

}


.unavailable{

    display:inline-block;

    background:#dc3545;

    color:#fff;

    padding:7px 16px;

    border-radius:30px;

    font-size:14px;

}


/* =========================================
   OUTDATED PRICE
========================================= */

.price-outdated{

    color:#c00;

    font-weight:700;

    background:rgba(204,0,0,.04);

    border-right:4px solid #c00;

    padding:10px 14px;

    margin:15px 0;

    border-radius:6px;

}


/* =========================================
   QUANTITY
========================================= */

.quantity{

    display:flex;

    align-items:center;

    gap:10px;

    margin-bottom:15px;

}


.quantity input{

    width:90px;

    height:45px;

    border:1px solid #ddd;

    border-radius:8px;

    text-align:center;

    font-size:16px;

}


/* =========================================
   BUY BUTTON
========================================= */

.product-buy{

    margin-top:20px;

}


.product-buy .btn-main{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    min-height:50px;

    padding:13px 30px;

}


/* =========================================
   WISHLIST
========================================= */

.btn-wishlist{

    display:block;

    margin-top:15px;

    background:#fff;

    color:#d60000;

    border:1px solid #d60000;

    border-radius:10px;

    padding:11px 20px;

}


.btn-wishlist:hover{

    background:#d60000;

    color:#fff;

}


/* =========================================
   MODERN RED-GOLD PRODUCT TABS & DESCRIPTION
========================================= */

/* ۱. بدنه اصلی باکس توضیحات و تب‌ها */
.product-description {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-top: 35px;
    position: relative;
}

/* ۲. نوار ظریف و مدرن قرمز-طلایی در بالاترین قسمت باکس */
.product-description::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #d4af37 0%, #990000 50%, #d4af37 100%);
    z-index: 2;
}

/* ۳. نوار بالای تب‌ها */
.product-description-header,
.product-tabs,
.tab-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 15px 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-tabs::-webkit-scrollbar {
    display: none;
}

/* ۴. استایل دکمه‌ها و عناوین تب‌ها */
.product-description-header h2,
.product-description-header a,
.tab-btn,
.tab-item {
    padding: 15px 22px;
    font-size: 14.5px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    margin: 0;
}

/* ۵. حالت هوور */
.product-description-header h2:hover,
.tab-btn:hover,
.tab-item:hover {
    color: #990000;
    background: rgba(153, 0, 0, 0.02);
}

/* ۶. تب فعال (Selected Tab) */
.product-description-header h2.active,
.product-description-header a.active,
.tab-btn.active,
.tab-item.active {
    color: #990000 !important;
    font-weight: 800 !important;
    background: #ffffff !important;
    border-bottom: 3px solid #d4af37 !important; /* خط زیرین طلایی لوکس */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
}

/* =========================================
   MODERN INNER CONTENT STYLING (محتوای داخل تب‌ها)
========================================= */

/* بدنه اصلی متن داخل تب */
.product-description-text,
.tab-content {
    padding: 35px 30px;
    color: #2d3748;
    font-size: 15px;
    line-height: 2.2;
    background: #ffffff;
}

/* ۱. تیترهای داخل متن (با نوار قرمز عمودی لوکس) */
.product-description-text h3,
.tab-content h3,
.product-description-text h4,
.tab-content h4 {
    font-size: 16.5px;
    font-weight: 800;
    color: #1a202c;
    margin: 22px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-description-text h3::before,
.tab-content h3::before,
.product-description-text h4::before,
.tab-content h4::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #990000; /* قرمز خودروساپ */
    border-radius: 4px;
}

/* ۲. لیست ویژگی‌ها با بولت تیک طلایی (✓) */
.product-description-text ul,
.tab-content ul {
    list-style: none;
    padding-right: 0;
    margin: 15px 0;
}

.product-description-text li,
.tab-content li {
    position: relative;
    padding-right: 26px;
    margin-bottom: 12px;
    font-size: 14.5px;
    color: #4a5568;
}

.product-description-text li::before,
.tab-content li::before {
    content: "✓";
    position: absolute;
    right: 0;
    top: 0;
    color: #d4af37; /* طلایی لوکس */
    font-weight: 900;
    font-size: 15px;
}

/* ۳. استایل شیک جدول مشخصات فنی (تک‌رنگ/راه‌راه با ستون عناوین قرمز-طلایی) */
.product-description-text table,
.tab-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.product-description-text table tr:nth-child(even),
.tab-content table tr:nth-child(even) {
    background-color: #f8fafc;
}

.product-description-text table tr:nth-child(odd),
.tab-content table tr:nth-child(odd) {
    background-color: #ffffff;
}

.product-description-text table td,
.product-description-text table th,
.tab-content table td,
.tab-content table th {
    padding: 14px 18px;
    font-size: 14px;
    text-align: right;
    border-bottom: 1px solid #edf2f7;
}

.product-description-text table tr:last-child td {
    border-bottom: none;
}

/* ستون سمت راست جدول (عناوین مشخصات) */
.product-description-text table td:first-child,
.tab-content table td:first-child {
    width: 30%;
    font-weight: 700;
    color: #990000;
    background: rgba(153, 0, 0, 0.03);
    border-left: 1px solid #edf2f7;
}

/* ۴. باکس‌های ویژه و نکات کلیدی (Callout Box طلایی) */
.product-description-text blockquote,
.tab-content blockquote,
.product-info-box {
    background: #fffdf5;
    border-right: 4px solid #d4af37;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #744210;
    font-size: 14px;
    line-height: 1.9;
}


/* =========================================
   RELATED PRODUCTS
========================================= */

.related-products{

    margin-top:40px;

}


.related-products-header{

    margin-bottom:20px;

}


.related-products-header h2{

    font-size:27px;

    font-weight:800;

}

/* =========================================
   RELATED SLIDER & MODERN CARD (طرح دیجی‌کالا)
========================================= */

.related-products-wrapper{
    position:relative;
    display:flex;
    align-items:center;
    gap:12px;
}

.related-slider{
    display:flex;
    gap:14px;
    overflow-x:auto;
    scroll-behavior:smooth;
    scrollbar-width:none;
    flex:1;
    padding:10px 5px 20px;
}

.related-slider::-webkit-scrollbar{
    display:none;
}

/* کارت محصول مدرن دسکتاپ */
.related-product-card{
    width:180px;
    min-width:180px;
    background:#fff;
    border-radius:14px;
    overflow:hidden;
    border:1px solid #e2e8f0;
    box-shadow:none;
    transition:all .25s ease;
    display:flex;
    flex-direction:column;
}

.related-product-card:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    border-color:#cbd5e1;
}

.related-image{
    width:100%;
    aspect-ratio:1 / 1;
    background:#fff;
    overflow:hidden;
    border-bottom:1px solid #f1f5f9;
}

.related-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:10px;
    display:block;
}

.related-info{
    padding:12px 10px;
    display:flex;
    flex-direction:column;
    flex-grow:1;
}

.related-info h3{
    font-size:13px;
    font-weight:700;
    line-height:1.6;
    min-height:42px;
    max-height:42px;
    margin-bottom:10px;
    color:#334155;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    text-align:right;
}

.related-price{
    color:#198754;
    font-size:14.5px;
    font-weight:800;
    margin-top:auto;
    margin-bottom:0;
    text-align:center;
}

/* حذف دکمه آبی برای کل صفحات */
.related-btn{
    display:none !important;
}


/* =========================================
   RELATED ARROWS
========================================= */

.related-arrow{

    width:42px;

    height:42px;

    min-width:42px;

    border-radius:50%;

    background:#d60000;

    color:#fff;

    font-size:18px;

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

}


.related-arrow:hover{

    background:#a80000;

}


.no-related-products{

    background:#fff;

    padding:25px;

    border-radius:15px;

    color:#777;

}

/* =========================================
   RESPONSIVE & MOBILE SLIDER (طرح دیجی‌کالا)
========================================= */

@media(max-width:1000px){

    .product-top{

        flex-direction:column;

        align-items:center;

    }

    .product-gallery{

        width:100%;

        max-width:600px;

    }

    .product-info{

        width:100%;

        text-align:right;

    }

}

@media(max-width:768px){

    .product-page{

        width:95%;

        margin:15px auto;

    }

    .product-top{

        padding:18px;

        gap:20px;

        border-radius:14px;

    }

    .product-gallery{

        width:100%;

    }

    .main-image-wrapper{

        width:100%;

    }

    .gallery-arrow{

        width:36px;

        height:36px;

        font-size:16px;

    }

    .gallery-prev{

        right:6px;

    }

    .gallery-next{

        left:6px;

    }

    .product-thumb{

        width:60px;

        height:60px;

        min-width:60px;

    }

    .product-info h1{

        font-size:20px;

    }

    .product-price{

        font-size:20px;

    }

    /* --- تغییرات اختصاصی اسلایدر موبایل --- */

    .related-products{

        margin-top:25px;

    }

    .related-products-header h2{

        font-size:18px;

        font-weight:800;

        margin-bottom:12px;

    }

    /* ۱. مخفی کردن فلش‌های چپ و راست در موبایل */

    .related-arrow{

        display:none !important;

    }

    .related-products-wrapper{

        gap:0;

    }

    /* ۲. نرم‌سازی اسکرول افقی با انگشت */

    .related-slider{

        gap:10px;

        padding:5px 2px 15px 2px;

        -webkit-overflow-scrolling:touch;

        scroll-snap-type:x mandatory;

    }

    /* ۳. کارت محصول فشرده دیجی‌کالایی */

    .related-product-card{

        width:142px;

        min-width:142px;

        border-radius:12px;

        border:1px solid #e2e8f0;

        box-shadow:none;

        background:#fff;

        scroll-snap-align:start;

        display:flex;

        flex-direction:column;

    }

    .related-product-card:hover{

        transform:none;

        box-shadow:none;

    }

    .related-image{

        background:#fff;

        border-bottom:1px solid #f1f5f9;

    }

    .related-image img{

        padding:8px;

    }

    .related-info{

        padding:10px 8px;

        display:flex;

        flex-direction:column;

        flex-grow:1;

    }

    .related-info h3{

        font-size:11.5px;

        font-weight:600;

        line-height:1.5;

        min-height:35px;

        max-height:35px;

        margin-bottom:8px;

        color:#334155;

        display:-webkit-box;

        -webkit-line-clamp:2;

        -webkit-box-orient:vertical;

        overflow:hidden;

        text-align:right;

    }

    .related-price{

        font-size:12.5px;

        font-weight:800;

        color:#198754;

        margin-bottom:0;

        margin-top:auto;

        text-align:center;

    }

    /* ۴. مخفی کردن دکمه آبی در موبایل */

    .related-btn{

        display:none !important;

    }

}