/* استایل صفحه جزئیات محصول — منتقل‌شده از <style> داخل قالب برای کش بهتر */

/* استایل‌های صفحه جزئیات محصول - مدرن و شلوغ */
.product-page {
    max-width: 1320px;
    margin: 30px auto;
    padding: 0 24px;
    direction: rtl;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb a { color: #6366f1; text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: #4f46e5; }
.breadcrumb svg { width: 14px; height: 14px; color: #cbd5e1; }

/* لایه اصلی محصول */
.product-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.1);
}

/* گالری تصاویر */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-image {
    width: 100%;
    height: 480px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    position: relative;
    transition: all 0.3s ease;
}

.main-image:hover {
    border-color: #6366f1;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.2);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.15s ease-out;
    transform-origin: center center;
    will-change: transform;
}

.main-image__zoom-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    pointer-events: none;
}

.main-image:hover .main-image__zoom-icon {
    opacity: 1;
    transform: scale(1.1);
}

.main-image__zoom-icon svg {
    width: 24px;
    height: 24px;
}

/* دکمه‌های قبلی/بعدی روی کادر اصلی (فقط وقتی بیش از یک عکس هست) */
.main-image__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.main-image__nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.07);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
}

.main-image__nav:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.55);
    outline-offset: 2px;
}

.main-image__nav svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.main-image__nav--prev { right: 12px; }
.main-image__nav--next { left: 12px; }

/* تصاویر کوچک */
.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.3s ease;
    position: relative;
}

.thumb.active, .thumb:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* بندانگشتی به‌صورت دکمه (دسترس‌پذیری صفحه‌کلید) — ریست استایل پیش‌فرض button */
button.thumb {
    padding: 0;
    font-family: inherit;
    font-size: 0;
    line-height: 0;
}

button.thumb:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.55);
    outline-offset: 2px;
}

/* اطلاعات محصول */
.product-info h1 {
    font-size: 1.6rem;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.product-brand {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-brand__badge {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* امتیاز محصول */
.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
}

.product-rating__stars {
    display: flex;
    gap: 2px;
}

.product-rating__stars svg {
    width: 22px;
    height: 22px;
    color: #f59e0b;
}

.product-rating__value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #92400e;
}

.product-rating__count {
    font-size: 0.85rem;
    color: #78350f;
}

.product-short-desc {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border-right: 4px solid #6366f1;
}

/* آمار */
.product-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #64748b;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-item svg { width: 16px; height: 16px; }

/* قیمت */
.product-price-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
}

.price-original {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.price-current {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1d4ed8;
}

.price-current small { font-size: 0.9rem; font-weight: 400; }

.discount-info {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* ===== پیام قیمت خرید نقدی (زیر قیمت اصلی — قیمت پایه خط نمی‌خورد) ===== */
.cash-price-note {
    margin-top: 10px;
    padding: 9px 14px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    color: #166534;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.8;
}

/* ===== انتخاب روش خرید (نقدی / اقساطی-اعتباری) ===== */
.pay-mode-box {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0 6px;
}

.pay-mode-box__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

.pay-mode-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.pay-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pay-mode-option:hover { border-color: #a5b4fc; }

.pay-mode-option.is-selected {
    border-color: #0d9488;
    background: #f0fdfa;
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.12);
}

/* رادیو مخفی — حالت انتخاب با خود input نگه داشته می‌شود (دسترس‌پذیر) */
.pay-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.pay-mode-option__radio {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    margin-top: 2px;
    transition: all 0.15s;
    box-shadow: inset 0 0 0 3px #fff;
}

.pay-mode-option.is-selected .pay-mode-option__radio {
    border-color: #0d9488;
    background: #0d9488;
}

.pay-mode-option__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.pay-mode-option__title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.6;
}

.pay-mode-option__price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f766e;
}

.pay-mode-option__desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
}

/* دکمه‌ها */
.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

/* ===== انتخاب رنگ محصول ===== */
.product-colors {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0 6px;
}

.product-colors__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.85rem;
    color: #334155;
}

.color-swatch:hover:not(:disabled) {
    border-color: #a5b4fc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.color-swatch.selected {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.color-swatch:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.7);
}

.color-swatch__dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), inset 0 0 4px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.color-swatch__badge {
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.color-stock-info {
    font-size: 0.82rem;
    color: #16a34a;
    margin-top: 10px;
    min-height: 1.2em;
}

.color-stock-info.out {
    color: #dc2626;
}

/* هایلایت خطا وقتی کاربر بدون انتخاب رنگ روی «افزودن به سبد» می‌زند */
.product-colors.needs-color {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    animation: product-colors-shake 0.4s ease-in-out 2;
}

@keyframes product-colors-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(7px); }
    75% { transform: translateX(-7px); }
}

.btn-add-cart {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Vazir', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-add-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* حالت «ابتدا رنگ انتخاب کنید»: ظاهر کم‌رنگ اما کلیک‌پذیر (بدون disabled واقعی) */
.btn-add-cart.is-needs-color {
    opacity: 0.55;
    cursor: pointer;
}

.btn-add-cart.is-needs-color:hover {
    opacity: 0.8;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-add-cart svg { width: 22px; height: 22px; }

.btn-like {
    padding: 16px 20px;
    background: #fff;
    color: #ef4444;
    border: 2px solid #fecaca;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-like:hover { background: #fef2f2; transform: translateY(-1px); }
.btn-like.liked { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-like svg { width: 22px; height: 22px; }

/* کارت ضمانت‌ها */
.guarantees-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.guarantees-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guarantees-card__title svg { width: 20px; height: 20px; }

.guarantees-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.guarantee-item:hover {
    background: #fff;
    transform: translateX(-4px);
}

.guarantee-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guarantee-item__icon svg { width: 22px; height: 22px; }

.guarantee-item--return .guarantee-item__icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.guarantee-item--authentic .guarantee-item__icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.guarantee-item--support .guarantee-item__icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.guarantee-item__text {
    flex: 1;
}

.guarantee-item__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.guarantee-item__desc {
    font-size: 0.78rem;
    color: #64748b;
}

/* متا اطلاعات */
.product-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.88rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label { color: #64748b; font-size: 0.8rem; }
.meta-value { color: #0f172a; font-weight: 500; }

/* توضیحات کامل */
.product-description {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.product-description h2 {
    font-size: 1.3rem;
    color: #0f172a;
    margin-bottom: 16px;
    position: relative;
    padding-right: 16px;
}

.product-description h2::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #764ba2 100%);
    border-radius: 9999px;
}

.product-description p {
    color: #475569;
    line-height: 1.9;
    margin-bottom: 12px;
}

/* ===== جدول مشخصات ===== */
.product-specifications {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.product-specifications h2 {
    font-size: 1.2rem;
    color: #0f172a;
    margin-bottom: 16px;
    position: relative;
    padding-right: 16px;
}

.product-specifications h2::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #764ba2 100%);
    border-radius: 9999px;
}

.specs-table {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.spec-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    border-bottom: 1px solid #f1f5f9;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row--alt {
    background: #f8fafc;
}

.spec-row__key {
    padding: 12px 16px;
    font-weight: 600;
    color: #4f46e5;
    font-size: 0.9rem;
    border-left: 1px solid #f1f5f9;
}

.spec-row__value {
    padding: 12px 16px;
    color: #1f2937;
    font-size: 0.92rem;
}

@media (max-width: 768px) {
    .spec-row {
        grid-template-columns: 1fr;
    }
    .spec-row__key {
        border-left: none;
        border-bottom: 1px solid #f1f5f9;
        background: #f1f5f9;
    }
}

/* ویدیو */
.product-video {
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.product-video video {
    width: 100%;
    border-radius: 8px;
}

/* ===== بخش نظرات ===== */
.reviews-section {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.08);
}

.reviews-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 16px;
}

.reviews-section__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviews-section__title svg {
    width: 28px;
    height: 28px;
    color: #f59e0b;
}

/* خلاصه امتیازات */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 28px;
}

.rating-summary__overall {
    text-align: center;
}

.rating-summary__value {
    font-size: 3rem;
    font-weight: 700;
    color: #92400e;
    line-height: 1;
}

.rating-summary__stars {
    display: flex;
    gap: 2px;
    justify-content: center;
    margin-top: 4px;
}

.rating-summary__stars svg { width: 20px; height: 20px; color: #f59e0b; }

.rating-summary__count {
    font-size: 0.85rem;
    color: #78350f;
    margin-top: 4px;
}

.rating-summary__bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.rating-bar__label {
    width: 60px;
    color: #78350f;
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating-bar__label svg { width: 14px; height: 14px; color: #f59e0b; }

.rating-bar__track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 9999px;
    overflow: hidden;
}

.rating-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.rating-bar__count {
    width: 30px;
    text-align: left;
    color: #78350f;
    font-weight: 600;
}

/* فرم ثبت نظر */
.review-form-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    border: 1px solid #e2e8f0;
}

.review-form-wrapper__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-form-wrapper__title svg { width: 22px; height: 22px; color: #6366f1; }

.review-form {
    display: grid;
    gap: 16px;
}

.review-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.review-form__group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #374151;
}

.review-form__group input,
.review-form__group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.92rem;
    background: #fff;
    transition: all 0.2s;
}

.review-form__group input:focus,
.review-form__group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ستاره‌دهی */
.star-rating {
    display: flex;
    gap: 4px;
    direction: ltr;
}

.star-rating__star {
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: #d1d5db;
    transition: all 0.2s;
}

.star-rating__star:hover,
.star-rating__star.active {
    color: #f59e0b;
    transform: scale(1.1);
}

.review-form__submit {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
}

.review-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.review-form__submit svg { width: 18px; height: 18px; }

/* لیست نظرات */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.review-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.review-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.review-card__info {
    flex: 1;
}

.review-card__name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-card__verified {
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.review-card__date {
    font-size: 0.78rem;
    color: #94a3b8;
}

.review-card__stars {
    display: flex;
    gap: 2px;
}

.review-card__stars svg { width: 16px; height: 16px; color: #f59e0b; }

.review-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}

.review-card__body {
    color: #475569;
    line-height: 1.7;
    font-size: 0.92rem;
}

/* پاسخ مدیر */
.review-card__admin-reply {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-right: 3px solid #2563eb;
    border-radius: 8px;
}

.review-card__admin-reply-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-card__admin-reply-header svg { width: 14px; height: 14px; }

.review-card__admin-reply-body {
    font-size: 0.88rem;
    color: #1e3a8a;
    line-height: 1.6;
}

/* پاسخ‌های کاربران */
.review-card__replies {
    margin-top: 12px;
    padding-right: 16px;
    border-right: 2px solid #f1f5f9;
}

.review-reply {
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.review-reply__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.review-reply__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.review-reply__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
}

.review-reply__date {
    font-size: 0.72rem;
    color: #94a3b8;
}

.review-reply__body {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}

/* دکمه پاسخ */
.review-card__reply-btn {
    margin-top: 12px;
    padding: 6px 14px;
    background: transparent;
    color: #6366f1;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.review-card__reply-btn:hover {
    background: #eff6ff;
}

.review-card__reply-btn svg { width: 14px; height: 14px; }

/* فرم پاسخ (مخفی) */
.reply-form {
    display: none;
    margin-top: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
}

.reply-form.active { display: block; }

.reply-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.reply-form input,
.reply-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.85rem;
}

.reply-form textarea {
    rows: 2;
    margin-bottom: 8px;
}

.reply-form__submit {
    padding: 8px 16px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
}

/* محصولات مشابه */
.related-products-section {
    margin-top: 50px;
}

.related-products-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-right: 16px;
}

.related-products-title::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #764ba2 100%);
    border-radius: 9999px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.related-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover img { transform: scale(1.08); }

.related-card__body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-card__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.related-card__price {
    margin-top: auto;
    font-size: 1rem;
    font-weight: 700;
    color: #4f46e5;
}

.related-card__price small { font-size: 0.75rem; font-weight: 400; color: #64748b; }

/* لایت‌باکس جدید نمایش تصویر محصول: زوم، چرخش، جابجایی، دانلود، رفتن به عکس بعدی/قبلی */
.product-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
}

.product-lightbox.active { display: block; }

.product-lightbox__topbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    z-index: 20;
}

.product-lightbox__counter {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 9999px;
}

.product-lightbox__actions {
    display: flex;
    gap: 8px;
}

.product-lightbox__btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.product-lightbox__btn:hover { background: rgba(99, 102, 241, 0.4); }
.product-lightbox__btn--close:hover { background: rgba(239, 68, 68, 0.3); border-color: rgba(239, 68, 68, 0.5); transform: rotate(90deg); }
.product-lightbox__btn svg { width: 20px; height: 20px; }

.product-lightbox__stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: zoom-out;
}

.product-lightbox__image {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    height: auto !important;
    max-width: 88vw !important;
    max-height: 80vh !important;
    object-fit: contain;
    transition: transform 0.2s ease;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
}

.product-lightbox__image.dragging { cursor: grabbing; transition: none; }

.product-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(15, 23, 42, 0.62);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 30;
    padding: 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.product-lightbox__nav:hover { background: rgba(99, 102, 241, 0.65); border-color: rgba(255, 255, 255, 0.7); }
.product-lightbox__nav:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.product-lightbox__nav svg { width: 26px; height: 26px; pointer-events: none; }
.product-lightbox__nav--prev { right: 24px; }
.product-lightbox__nav--next { left: 24px; }

.product-lightbox__bottombar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    padding: 8px;
    z-index: 20;
}

.product-lightbox__zoom-level {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 0 10px;
    min-width: 56px;
    justify-content: center;
}

.product-lightbox__hint {
    position: absolute;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 9999px;
    z-index: 20;
    white-space: nowrap;
}

/* نوار بندانگشتی کوچک داخل لایت‌باکس (فقط وقتی بیش از یک عکس هست) */
.product-lightbox__thumbs {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 25;
    max-width: 78vw;
    overflow-x: auto;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    scrollbar-width: thin;
}

.product-lightbox__thumb {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, transform 0.2s;
}

.product-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.product-lightbox__thumb.active,
.product-lightbox__thumb:hover {
    border-color: #fff;
    transform: translateY(-2px);
}

.product-lightbox__thumb:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .product-lightbox__nav { width: 40px; height: 40px; }
    .product-lightbox__nav--prev { right: 10px; }
    .product-lightbox__nav--next { left: 10px; }
    .product-lightbox__hint { display: none; }
    .product-lightbox__topbar { padding: 14px; }
    .product-lightbox__thumbs { display: none; }
    .main-image__nav { width: 36px; height: 36px; }
    .main-image__nav--prev { right: 8px; }
    .main-image__nav--next { left: 8px; }
}

@media (max-width: 992px) {
    .product-layout { grid-template-columns: 1fr; padding: 20px; }
    .main-image { height: 350px; }
}

@media (max-width: 768px) {
    .product-page { padding: 0 16px; }
    .product-info h1 { font-size: 1.3rem; }
    .price-current { font-size: 1.5rem; }
    .product-meta { grid-template-columns: 1fr; }
    .review-form__row { grid-template-columns: 1fr; }
    .rating-summary { flex-direction: column; gap: 16px; }
    .reviews-section { padding: 20px; }
}

/* ===== بخش پرسش‌های متداول (FAQ) ===== */
.product-faqs {
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    padding: 24px;
}

.product-faqs h2 {
    font-size: 1.15rem;
    color: #0f172a;
    margin-bottom: 16px;
    font-weight: 700;
}

.product-faqs__item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.product-faqs__question {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
    list-style: none;
}

.product-faqs__question::-webkit-details-marker { display: none; }
.product-faqs__question::before {
    content: "؟";
    display: inline-block;
    margin-left: 8px;
    color: #6366f1;
    font-weight: 800;
}

.product-faqs__answer {
    padding: 0 16px 14px;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ===== بخش مقالات مرتبط ===== */
.related-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.related-article-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-article-card:hover {
    border-color: #6366f1;
    box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.25);
}

.related-article-card img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-article-card h3 {
    font-size: 0.92rem;
    color: #0f172a;
    margin: 0 0 6px;
    font-weight: 700;
}

.related-article-card p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ===== محتوای HTML توضیحات محصول (خروجی ساخت محصول هوشمند) ===== */
.product-description__body h2 {
    font-size: 1.15rem;
    color: #0f172a;
    margin: 24px 0 10px;
}
.product-description__body h3 {
    font-size: 1.02rem;
    color: #1e293b;
    margin: 18px 0 8px;
}
.product-description__body h4 {
    font-size: .95rem;
    color: #1e293b;
    margin: 14px 0 6px;
}
.product-description__body p {
    color: #475569;
    line-height: 1.9;
    margin-bottom: 12px;
}
.product-description__body ul,
.product-description__body ol {
    padding-right: 22px;
    margin: 0 0 12px;
    color: #475569;
    line-height: 1.9;
}
.product-description__body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}
.product-description__body th,
.product-description__body td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: right;
}
.product-description__body a { color: #4f46e5; }

/* ===== تعداد + دکمه مشاهده سبد ===== */
.qty-stepper {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.qty-stepper__btn {
    width: 40px;
    border: none;
    background: #f8fafc;
    font-size: 1.2rem;
    color: #334155;
    cursor: pointer;
}
.qty-stepper__btn:hover { background: #eef2ff; color: #4f46e5; }
.qty-stepper input {
    width: 52px;
    border: none;
    text-align: center;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; }

.btn-view-cart {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border: 2px solid #4f46e5;
    border-radius: 12px;
    color: #4f46e5;
    background: #fff;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-view-cart:hover { background: #4f46e5; color: #fff; }
.btn-view-cart__count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-view-cart:hover .btn-view-cart__count { background: #fff; color: #4f46e5; }
