/* =====================================================
   product.css — استایل صفحه اختصاصی محصول
   ===================================================== */

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 960px) { .product-layout { grid-template-columns: 1fr; } }

/* ---- گالری ---- */
.product-gallery { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 960px) { .product-gallery { position: static; } }
.gallery-main {
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 14px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumb {
    width: 64px; height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    opacity: .7;
    transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.is-active { opacity: 1; border-color: var(--magenta-500); }

/* ---- اطلاعات و فرم سفارش ---- */
.product-info h1 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 10px; }
.product-rating { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-700); margin-bottom: 18px; }
.stars { color: #f5b301; letter-spacing: 1px; }
.product-short-desc { color: var(--ink-700); margin-bottom: 24px; }

/* ---- گروه‌های متغیر ---- */
.option-group { margin-bottom: 24px; }
.option-group > label.group-label {
    display: block;
    font-weight: 700;
    font-size: 14.5px;
    margin-bottom: 12px;
}
.option-group .required-mark { color: var(--magenta-500); }

.option-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.option-card {
    position: relative;
    border: 1.5px solid var(--paper-line);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
    background: var(--paper-050);
}
.option-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-card:hover { border-color: var(--magenta-500); }
.option-card.is-selected { border-color: var(--magenta-500); background: #fdf1f8; }
.option-card .modifier {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--ink-700);
    margin-top: 2px;
}

.option-select, .option-text {
    width: 100%;
    max-width: 340px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--paper-line);
    font-family: inherit;
    font-size: 14.5px;
    background: var(--paper-050);
}

/* ---- جعبه قیمت و ثبت سفارش ---- */
.order-box {
    background: var(--paper-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 30px;
}
.price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}
.price-row .price-label { font-size: 13.5px; color: var(--ink-700); }
.price-row .price-value { font-size: 24px; font-weight: 800; color: var(--ink-900); }
.price-row .price-value.is-quote { font-size: 15px; color: var(--magenta-600); }

.file-upload-field {
    border: 1.5px dashed var(--paper-line);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    font-size: 13.5px;
    color: var(--ink-700);
    margin-bottom: 18px;
    background: var(--paper-050);
}
.file-upload-field input { margin-top: 8px; }

/* ---- تب‌ها (مشخصات / دیدگاه‌ها) ---- */
.product-tabs { margin-top: 70px; }
.tab-buttons { display: flex; gap: 6px; border-bottom: 2px solid var(--paper-line); margin-bottom: 28px; }
.tab-btn {
    padding: 12px 22px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink-700);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    background: none;
    border-top: 0; border-inline: 0;
}
.tab-btn.is-active { color: var(--magenta-500); border-bottom-color: var(--magenta-500); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* جدول مشخصات فنی */
.spec-table { width: 100%; border-collapse: collapse; max-width: 640px; }
.spec-table tr { border-bottom: 1px solid var(--paper-line); }
.spec-table td { padding: 12px 4px; font-size: 14px; }
.spec-table td:first-child { color: var(--ink-700); width: 40%; }
.spec-table td:last-child { font-weight: 600; }

/* ---- دیدگاه‌ها ---- */
.review-item { padding: 20px 0; border-bottom: 1px solid var(--paper-line); }
.review-item:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-head strong { font-size: 14.5px; }
.review-date { font-size: 12px; color: var(--ink-700); }
.review-comment { font-size: 14.5px; color: var(--ink-700); }

.rating-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    font-size: 26px;
}
.rating-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-picker label { cursor: pointer; color: #ddd; transition: color .1s ease; }
.rating-picker input:checked ~ label,
.rating-picker label:hover,
.rating-picker label:hover ~ label { color: #f5b301; }

/* ---- محصولات مرتبط ---- */
.related-products-title { font-size: 18px; margin: 70px 0 20px; }

/* صفحهٔ جزئیات محصول — همان هویت سرمه‌ای/طلایی کاتالوگ */
body.page-product {
    --product-bg: #070811;
    --product-surface: #111621;
    --product-text: #f6f2e9;
    --product-muted: #a9adba;
    --product-gold: #e8c45e;
    --product-line: rgba(255,255,255,.11);
    background: var(--product-bg);
    color: var(--product-text);
}
body.page-product .site-header { background: rgba(7,11,19,.88); border-bottom: 1px solid var(--product-line); box-shadow: none; }
body.page-product .brand-name, body.page-product .nav-icon-btn { color: var(--product-text); }
body.page-product .brand-tag, body.page-product .nav-link { color: var(--product-muted); }
body.page-product .brand-mark { background: linear-gradient(135deg, #f7d775, #aa8126); box-shadow: 0 0 0 5px rgba(232,196,94,.1); }
body.page-product .brand-mark::before, body.page-product .brand-mark::after { display: none; }
body.page-product .nav-panel { background: rgba(255,255,255,.04); border-color: var(--product-line); }
body.page-product .nav-actions { border-color: var(--product-line); }
body.page-product .nav-link:hover, body.page-product .nav-link.is-active { color: #f7d775; background: rgba(232,196,94,.1); }
body.page-product .nav-cta, body.page-product .btn-primary { background: linear-gradient(135deg, #f7d775, var(--product-gold)); color: #17130b; box-shadow: 0 10px 28px rgba(232,196,94,.17); }
body.page-product .breadcrumb-bar { background: #0d111b; border-color: var(--product-line); }
body.page-product .breadcrumb-light, body.page-product .breadcrumb-light a { color: var(--product-muted); }
body.page-product .breadcrumb-light a:hover { color: #f7d775; }
body.page-product .gallery-main { border: 1px solid var(--product-line); border-radius: 24px; background: var(--product-surface); box-shadow: 0 20px 45px rgba(0,0,0,.25); }
body.page-product .gallery-thumb { border-color: transparent; background: var(--product-surface); }
body.page-product .gallery-thumb.is-active { border-color: var(--product-gold); }
body.page-product .product-info { padding: 8px 0; }
body.page-product .product-info h1 { color: var(--product-text); font-size: clamp(30px, 4vw, 42px); line-height: 1.28; }
body.page-product .product-rating, body.page-product .product-short-desc { color: var(--product-muted); }
body.page-product .option-group > label.group-label { color: var(--product-text); }
body.page-product .option-group .required-mark { color: #f7d775; }
body.page-product .option-card { color: var(--product-text); background: rgba(255,255,255,.04); border-color: var(--product-line); }
body.page-product .option-card:hover, body.page-product .option-card.is-selected { border-color: var(--product-gold); background: rgba(232,196,94,.1); }
body.page-product .option-card .modifier { color: var(--product-muted); }
body.page-product .option-select, body.page-product .option-text,
body.page-product .form-field input, body.page-product .form-field textarea { color: var(--product-text); background: rgba(255,255,255,.045); border-color: var(--product-line); }
body.page-product .order-box { background: linear-gradient(135deg, #182232, #11131d); border: 1px solid rgba(232,196,94,.22); border-radius: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.19); }
body.page-product .price-row .price-label { color: var(--product-muted); }
body.page-product .price-row .price-value { color: #f7d775; }
body.page-product .price-row .price-value.is-quote { color: #f7d775; }
body.page-product .file-upload-field { color: var(--product-muted); background: rgba(255,255,255,.035); border-color: var(--product-line); }
body.page-product .product-tabs { padding: 32px; background: var(--product-surface); border: 1px solid var(--product-line); border-radius: 22px; }
body.page-product .tab-buttons { border-color: var(--product-line); }
body.page-product .tab-btn { color: var(--product-muted); }
body.page-product .tab-btn.is-active { color: #f7d775; border-color: var(--product-gold); }
body.page-product .spec-table tr, body.page-product .review-item { border-color: var(--product-line); }
body.page-product .spec-table td:first-child, body.page-product .review-date, body.page-product .review-comment, body.page-product .hint { color: var(--product-muted); }
body.page-product .related-products-title { color: var(--product-text); font-size: 24px; }
body.page-product .product-card { background: linear-gradient(145deg, #151a27, #0c0f18); border-color: var(--product-line); box-shadow: none; }
body.page-product .product-card:hover { border-color: rgba(232,196,94,.55); box-shadow: 0 18px 40px rgba(0,0,0,.25); }
body.page-product .product-body h3 { color: var(--product-text); }
body.page-product .product-price { color: #f7d775; background: rgba(232,196,94,.1); }
body.page-product .btn-dark { background: rgba(255,255,255,.1); color: var(--product-text); border-color: var(--product-line); }
@media (max-width: 600px) { body.page-product .product-tabs { padding: 20px; border-radius: 18px; } }
html[data-theme="light"] body.page-product { --product-bg: #f6f3ec; --product-surface: #fff; --product-text: #192031; --product-muted: #627083; --product-line: rgba(25,32,49,.13); background: var(--product-bg); }
html[data-theme="light"] body.page-product .site-header { background: rgba(255,255,255,.88); }
html[data-theme="light"] body.page-product .brand-name, html[data-theme="light"] body.page-product .nav-icon-btn { color: var(--product-text); }
html[data-theme="light"] body.page-product .nav-panel { background: rgba(25,32,49,.035); }
html[data-theme="light"] body.page-product .breadcrumb-bar { background: #eeece6; }
html[data-theme="light"] body.page-product .gallery-main, html[data-theme="light"] body.page-product .product-tabs { background: #fff; box-shadow: 0 12px 32px rgba(29,35,48,.08); }
html[data-theme="light"] body.page-product .option-card, html[data-theme="light"] body.page-product .option-select, html[data-theme="light"] body.page-product .option-text, html[data-theme="light"] body.page-product .form-field input, html[data-theme="light"] body.page-product .form-field textarea { background: #fff; }
html[data-theme="light"] body.page-product .order-box { background: linear-gradient(135deg, #f7efd8, #fff); }
html[data-theme="light"] body.page-product .product-card { background: #fff; }
