﻿/* =================================
   FONT IMPORT — Vazirmatn
================================= */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');


/* =================================
   ARIONepc PRODUCT DETAILS
================================= */

.product-details-page {
    width: 100%;
    background: #ffffff;
    padding: 25px 0 60px;
}


/* =================================
   GLOBAL FONT (فقط برای صفحه جزئیات)
================================= */

.product-details-page,
.product-details-page button,
.product-details-page input,
.product-details-page textarea,
.product-details-page select,
.product-details-page span,
.product-details-page strong,
.product-details-page p,
.product-details-page h1,
.product-details-page h2,
.product-details-page h3,
.product-details-page a,
.product-details-page div {
    font-family: 'Vazirmatn', 'IRANSans', 'IRANYekan', 'Segoe UI', Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* =================================
   BREADCRUMB
================================= */

.product-breadcrumb {
    width: calc(100% - 40px);
    max-width: 1450px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #8a938e;
    font-size: 13px;
}


    .product-breadcrumb a {
        color: var(--green-dark);
        font-weight: 700;
        text-decoration: none;
        transition: .2s;
    }

    .product-breadcrumb a:hover {
        color: var(--green);
    }


    .product-breadcrumb span {
        white-space: nowrap;
    }


/* =================================
   MAIN
================================= */

.product-main {
    width: calc(100% - 40px);
    max-width: 1450px;
    margin: auto;
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 45px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 7px 25px rgba(40,70,55,.045);
}


/* =================================
   GALLERY
================================= */

.product-gallery {
    min-width: 0;
}


.product-main-image {
    width: 100%;
    height: 470px;
    background: #f7f9f8;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


    .product-main-image img {
        width: 90%;
        height: 90%;
        object-fit: contain;
        transition: .3s;
    }


/* =================================
   THUMBNAILS
================================= */

.product-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}


.product-thumbnail {
    width: 70px;
    height: 70px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: white;
    cursor: pointer;
    transition: .2s;
}


    .product-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


    .product-thumbnail:hover,
    .product-thumbnail.active {
        border-color: var(--green);
        background: var(--green-light);
    }


/* =================================
   INFORMATION
================================= */

.product-information {
    padding: 15px 0;
}


.product-category {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 20px;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}


.product-information h1 {
    font-size: 30px;
    line-height: 1.6;
    color: #1e2c25;
    font-weight: 800;
    margin-bottom: 10px;
}


.product-code {
    color: #919a96;
    font-size: 12px;
    margin-bottom: 15px;
}


    .product-code strong {
        color: #647069;
    }


.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    font-size: 14px;
}


.rating-star {
    color: #f2b63f;
    font-size: 18px;
}


.product-rating strong {
    color: #344139;
}


.product-rating span:last-child {
    color: #8b938f;
}


.product-short-description {
    color: #68756f;
    font-size: 15px;
    line-height: 2;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf1ee;
}


/* =================================
   STATUS
================================= */

.product-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 700;
}

.product-statusR {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
    color: #dc2626;
    font-size: 14px;
    font-weight: 700;
}


.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(72,168,120,.2);
}

.status-dotR {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.2);
}


/* =================================
   TWO CARDS ROW
   (مشخصات فنی | قیمت و خرید)
================================= */

.specs-price-purchase-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
    align-items: start;
}

.specs-price-purchase-row.no-specs {
    grid-template-columns: 1fr;
}

.specs-price-purchase-row.no-specs .buy-card {
    max-width: 480px;
    width: 100%;
}


/* ─── کارت پایه ─── */
.info-card {
    background: #ffffff;
    border: 1.5px solid var(--green);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(72,168,120,.08);
}

.info-card-title {
    background: #eef2f6;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 14px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    letter-spacing: .2px;
}


/* ─── کارت مشخصات فنی ─── */
.specs-list {
    display: flex;
    flex-direction: column;
}

.spec-row-dyn {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    font-size: 13px;
    border-bottom: 1px solid #edf1ee;
}

.spec-row-dyn:last-child {
    border-bottom: none;
}

.spec-row-dyn span {
    background: #eef2f6;
    color: #475569;
    padding: 10px 12px;
    font-weight: 500;
}

.spec-row-dyn strong {
    background: #ffffff;
    color: #0f172a;
    padding: 10px 12px;
    font-weight: 700;
    word-break: break-word;
}


/* ─── کارت قیمت و خرید (ادغام شده) ─── */
.buy-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* بلوک قیمت */
.buy-price-block {
    text-align: center;
    padding-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
}

.buy-price-label {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.buy-price-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.buy-price-value strong {
    color: var(--green-dark);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
}

.buy-price-value span {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}


/* کنترل‌های خرید */
.buy-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buy-controls .quantity-control {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #fff;
}

.buy-controls .quantity-control button {
    width: 42px;
    height: 100%;
    border: none;
    background: #f1f5f9;
    color: var(--green-dark);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s;
}

.buy-controls .quantity-control button:hover {
    background: #e2e8f0;
}

.buy-controls .quantity-control input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: white;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    -moz-appearance: textfield;
}

.buy-controls .quantity-control input::-webkit-outer-spin-button,
.buy-controls .quantity-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.buy-controls .add-to-cart {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--green-dark);
    color: white;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .25s;
    letter-spacing: .2px;
}

.buy-controls .add-to-cart:hover {
    background: #3d9568;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(72,168,120,.25);
}

.buy-controls .add-to-cart:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* =================================
   LEGACY PRICE BOX / PURCHASE
   (نگه داشته شد برای صفحات دیگر که از این کلاس‌ها استفاده می‌کنند)
================================= */

.product-price-box {
    background: #f7faf8;
    border: 1px solid #e6eee9;
    border-radius: 15px;
    padding: 16px;
    margin-bottom: 17px;
}

.price-label {
    display: block;
    color: #8a938e;
    font-size: 12px;
    margin-bottom: 6px;
}

.product-detail-price {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

    .product-detail-price strong {
        color: #26332d;
        font-size: 25px;
        font-weight: 900;
    }

    .product-detail-price span {
        color: #737f78;
        font-size: 12px;
    }


.purchase-area {
    display: flex;
    gap: 11px;
}

.quantity-control {
    width: 125px;
    height: 52px;
    border: 1px solid var(--border);
    border-radius: 13px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

    .quantity-control button {
        width: 36px;
        height: 100%;
        border: none;
        background: #f7faf8;
        color: var(--green-dark);
        font-size: 21px;
        cursor: pointer;
    }

    .quantity-control input {
        flex: 1;
        min-width: 0;
        height: 100%;
        border: none;
        outline: none;
        background: white;
        text-align: center;
        font-size: 13px;
    }

.add-to-cart {
    flex: auto;
    height: 52px;
    border: none;
    border-radius: 13px;
    background: var(--green-dark);
    color: white;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: .25s;
}

    .add-to-cart:hover {
        background: #3d9568;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(72,168,120,.20);
    }


/* =================================
   SECTIONS
================================= */

.product-section {
    width: calc(100% - 40px);
    max-width: 1450px;
    margin: 30px auto 0;
}


.product-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
}

    .product-section-title h2 {
        font-size: 22px;
        color: var(--green-dark);
        font-weight: 800;
    }

    .product-section-title span {
        width: 35px;
        height: 3px;
        border-radius: 10px;
        background: var(--green);
    }


/* =================================
   LEGACY SPECIFICATIONS
================================= */

.specifications {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.spec-row {
    min-height: 55px;
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    border-bottom: 1px solid #edf1ee;
}

    .spec-row:last-child {
        border-bottom: none;
    }

    .spec-row span {
        height: 100%;
        display: flex;
        align-items: center;
        padding: 0 18px;
        background: #f8faf9;
        color: #7a8580;
        font-size: 13px;
    }

    .spec-row strong {
        padding: 0 18px;
        color: #3e4943;
        font-size: 13px;
    }


/* =================================
   DESCRIPTION
================================= */

.product-description {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 25px;
    color: #4b5563;
    font-size: 15px;
    line-height: 2.2;
}


/* =================================
   RELATED
================================= */

.related-section {
    margin-top: 40px;
}

    .related-section .products-track {
        overflow: visible;
    }


/* =================================
   MOBILE
================================= */

@media (max-width: 800px) {

    .product-details-page {
        padding-top: 15px;
    }

    .product-breadcrumb {
        width: calc(100% - 16px);
        overflow: hidden;
        font-size: 12px;
    }

    .product-main {
        width: calc(100% - 16px);
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 14px;
        border-radius: 17px;
    }

    .product-main-image {
        height: 320px;
    }

    .product-information {
        padding: 5px 2px;
    }

        .product-information h1 {
            font-size: 22px;
        }

    .product-short-description {
        font-size: 14px;
    }

    /* ─── دو کارت زیر هم در موبایل ─── */
    .specs-price-purchase-row,
    .specs-price-purchase-row.no-specs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .specs-price-purchase-row.no-specs .buy-card {
        max-width: 100%;
    }

    .info-card-title {
        font-size: 13px;
        padding: 10px 12px;
    }

    .spec-row-dyn {
        font-size: 13px;
    }

    .spec-row-dyn span,
    .spec-row-dyn strong {
        padding: 9px 11px;
    }

    .buy-price-value strong {
        font-size: 26px;
    }

    .buy-price-value span {
        font-size: 13px;
    }

    .buy-controls .quantity-control {
        height: 42px;
    }

    .buy-controls .add-to-cart {
        height: 46px;
        font-size: 14px;
    }

    .product-section {
        width: calc(100% - 16px);
        margin-top: 22px;
    }

    .product-section-title h2 {
        font-size: 19px;
    }

    .spec-row {
        grid-template-columns: 120px 1fr;
    }

        .spec-row span,
        .spec-row strong {
            font-size: 12px;
            padding: 0 12px;
        }

    .product-description {
        padding: 18px;
        font-size: 14px;
    }
}


.warranty-selector {
    margin-bottom: 14px;
}

.warranty-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 600;
}

.warranty-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.warranty-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: .15s;
}

    .warranty-option:hover {
        border-color: var(--green);
    }

    .warranty-option input {
        accent-color: var(--green-dark);
    }

        .warranty-option input:checked ~ .warranty-name {
            color: var(--green-dark);
            font-weight: 800;
        }

.warranty-name {
    font-size: 13px;
}

.warranty-extra {
    font-size: 11px;
    color: #8a938e;
    margin-right: auto;
}

/* بج وضعیت در کارت محصول (روی تصویر) */
.product-image {
    position: relative;
}

.product-condition-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* بج وضعیت در صفحه جزئیات (کنار دسته‌بندی) */
.product-condition-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

/* رنگ‌های مشترک */
.condition-new {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.condition-stock {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}