﻿/* =====================================================================
   product-extras.css  —  صفحهٔ محصول فرااکسیژن
   فقط کلاس‌های با پیشوند pd- را استایل می‌دهد؛ بعد از Product.css بارگذاری شود.
   ===================================================================== */
.pd-page {
    --pd-red: var(--primary-red, #E53E3E);
    --pd-red-dark: #C53030;
    --pd-navy: #0f2d5e;
    --pd-border: var(--gray-200, #E5E7EB);
    --pd-soft: var(--gray-50, #F9FAFB);
    --pd-text: var(--gray-800, #1F2937);
    --pd-muted: var(--gray-600, #4B5563);
    --pd-radius: 18px;
    padding-top: 12px;
    padding-bottom: 96px;
    color: var(--pd-text);
}

/* ---------- مسیر صفحه ---------- */
.pd-breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0;
    font-size: 13px;
    color: var(--pd-muted);
}
.pd-breadcrumb li + li::before {
    content: "/";
    margin-inline-end: 6px;
    color: var(--gray-300, #D1D5DB);
}
.pd-breadcrumb a { color: inherit; text-decoration: none; }
.pd-breadcrumb a:hover { color: var(--pd-red); }

/* ---------- بخش بالایی: گالری | اطلاعات | خرید ---------- */
.pd-top {
    display: grid;
    grid-template-columns: minmax(0, 4.2fr) minmax(0, 5fr) minmax(0, 3.4fr);
    gap: 28px;
    align-items: start;
}

/* گالری */
.pd-gallery { position: sticky; top: 110px; }
.pd-gallery-main {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    box-shadow: 0 8px 24px rgba(15, 45, 94, .06);
}
.pd-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.pd-thumbs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
}
.pd-thumb {
    width: 72px;
    height: 72px;
    padding: 4px;
    background: #fff;
    border: 2px solid var(--pd-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, transform .2s;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.is-active { border-color: var(--pd-red); }
.pd-thumb:focus-visible, .pd-tab:focus-visible, .pd-btn-buy:focus-visible, .pd-btn-outline:focus-visible {
    outline: 3px solid rgba(229, 62, 62, .4);
    outline-offset: 2px;
}

/* اطلاعات */
.pd-title {
    font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem);
    line-height: 1.6;
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--gray-900, #111827);
}
.pd-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    font-size: 13px;
    color: var(--pd-muted);
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--pd-border);
}
.pd-rating { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.pd-rating b { color: var(--pd-text); }
.pd-stars { color: #F59E0B; letter-spacing: 1px; font-size: 13px; }
.pd-stock { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.pd-stock.is-in { color: #15803D; }
.pd-stock.is-out { color: #B91C1C; }
.pd-views { display: inline-flex; align-items: center; gap: 5px; }

.pd-h2 { font-size: 1.05rem; font-weight: 800; margin: 18px 0 10px; color: var(--pd-navy); }

.pd-keyspecs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.pd-keyspec {
    background: var(--pd-soft);
    border: 1px solid var(--pd-border);
    border-radius: 12px;
    padding: 9px 12px;
    min-width: 0;
}
.pd-keyspec dt { font-size: 12px; font-weight: 600; color: var(--pd-muted); margin: 0 0 2px; }
.pd-keyspec dd { font-size: 14px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.pd-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pd-red);
    text-decoration: none;
}
.pd-more-link:hover { color: var(--pd-red-dark); }

.pd-facts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.pd-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--pd-muted); }
.pd-facts i { color: var(--pd-red); margin-top: 4px; width: 16px; text-align: center; }
.pd-facts b { color: var(--pd-text); }

.pd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }
.pd-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1.5px solid var(--pd-red);
    border-radius: 12px;
    color: var(--pd-red);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    transition: background .2s, color .2s;
}
.pd-btn-outline:hover { background: var(--pd-red); color: #fff; }
.pd-tel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--pd-muted); }
.pd-tel i { color: var(--pd-red); }
.pd-tel-num { font-weight: 800; color: var(--pd-text); text-decoration: none; direction: ltr; unicode-bidi: plaintext; }
.pd-tel small { font-size: 12px; }
.pd-flash { display: none; margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; text-align: center; }

/* ---------- کارت خرید ---------- */
.pd-buy { position: sticky; top: 110px; }
.pd-buy-card {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 18px;
    box-shadow: 0 12px 32px rgba(15, 45, 94, .08);
}
.pd-trust-top {
    display: grid;
    gap: 4px;
    text-align: center;
    font-size: 13px;
    color: var(--pd-muted);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pd-border);
}
.pd-trust-top b { color: #15803D; }
.pd-buy-price { padding: 14px 0 6px; min-height: 40px; }
.pd-buy-label { font-size: 13px; font-weight: 700; color: var(--pd-muted); margin-bottom: 6px; }
.pd-price { font-size: 1.7rem; font-weight: 800; color: var(--pd-red); line-height: 1.4; }
.pd-price small { font-size: .9rem; font-weight: 600; color: var(--pd-muted); }
.pd-price--call { font-size: 1.15rem; color: var(--pd-navy); }
.pd-price-old { display: flex; align-items: center; gap: 8px; color: var(--pd-muted); font-size: 14px; margin-bottom: 2px; }
.pd-badge-off {
    background: var(--pd-red);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 999px;
}
.pd-price-date { font-size: 12px; color: var(--pd-muted); margin-top: 4px; }

.pd-btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    padding: 14px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #E53E3E, #C53030);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(229, 62, 62, .28);
    transition: transform .2s, box-shadow .2s;
}
.pd-btn-buy:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 26px rgba(229, 62, 62, .36); }
.pd-btn-buy.is-disabled { background: var(--gray-300, #D1D5DB); color: var(--pd-muted); box-shadow: none; cursor: not-allowed; }
.pd-btn-buy.is-disabled:hover { transform: none; }
.pd-btn-buy--inline { width: auto; margin-top: 0; padding: 11px 20px; font-size: 15px; }

.pd-trust { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--pd-border); display: grid; gap: 10px; font-size: 13px; color: var(--pd-muted); }
.pd-trust i { color: var(--pd-red); margin-inline-end: 6px; }

/* ---------- تب‌ها ---------- */
.pd-tabs { margin-top: 36px; scroll-margin-top: 110px; }
.pd-tablist { display: flex; gap: 6px; border-bottom: 2px solid var(--pd-border); overflow-x: auto; scrollbar-width: none; }
.pd-tablist::-webkit-scrollbar { display: none; }
.pd-tab {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pd-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
}
.pd-tab:hover { color: var(--pd-red); }
.pd-tab.is-active { color: var(--pd-red); border-bottom-color: var(--pd-red); }
.pd-panel { display: none; padding: 22px 4px 4px; }
.pd-panel.is-active { display: block; }

.pd-prose { line-height: 2; color: #374151; overflow-wrap: anywhere; }
.pd-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.pd-prose table { max-width: 100%; }
.pd-video { margin: 26px 0; text-align: center; }
.pd-video video { width: 100%; max-width: 760px; border-radius: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .15); background: #000; aspect-ratio: 16 / 9; }
.pd-more { margin-top: 22px; }

.pd-table-wrap { overflow-x: auto; border: 1px solid var(--pd-border); border-radius: 14px; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pd-table th, .pd-table td { padding: 12px 16px; border-bottom: 1px solid var(--pd-border); text-align: start; }
.pd-table th { width: 34%; background: var(--pd-soft); font-weight: 700; color: var(--pd-muted); }
.pd-table tr:last-child th, .pd-table tr:last-child td { border-bottom: 0; }

/* ---------- نظرات ---------- */
.pd-comments { display: grid; gap: 14px; }
.pd-comment { border: 1px solid var(--pd-border); border-radius: 16px; padding: 16px; background: #fff; }
.pd-comment header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pd-comment header small { display: block; color: var(--pd-muted); font-size: 12px; }
.pd-comment-rate { margin-inline-start: auto; }
.pd-avatar {
    width: 38px; height: 38px; flex: 0 0 38px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f2d5e, #1d4f9f);
    color: #fff; font-weight: 800;
}
.pd-comment p { margin: 0 0 8px; line-height: 1.9; }
.pd-pros-cons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.pd-pros, .pd-cons { border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.pd-pros { background: #F0FDF4; color: #166534; }
.pd-cons { background: #FEF2F2; color: #991B1B; }
.pd-pros ul, .pd-cons ul { margin: 6px 0 0; padding-inline-start: 18px; }
.pd-comment-pic { margin-top: 10px; border-radius: 10px; border: 1px solid var(--pd-border); object-fit: cover; }
.pd-reply { margin-top: 12px; padding: 10px 14px; background: var(--pd-soft); border-inline-start: 3px solid var(--pd-red); border-radius: 10px; font-size: 14px; }
.pd-reply p { margin: 4px 0 0; }
.pd-reply i { color: var(--pd-red); }
.pd-empty { text-align: center; padding: 28px; color: var(--pd-muted); }
.pd-comment-form { margin-top: 26px; padding: 18px; border: 1px solid var(--pd-border); border-radius: 16px; background: var(--pd-soft); }
.pd-comment-form .pd-h2 { margin-top: 0; }

/* ---------- مشابه‌ها و ویدیوها ---------- */
.pd-related { margin-top: 44px; }
.pd-section-title {
    position: relative;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 20px;
    padding-inline-start: 14px;
    color: var(--pd-text);
}
.pd-section-title::before {
    content: "";
    position: absolute;
    inset-block: 4px;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 4px;
    background: var(--pd-red);
}
.pd-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pd-video-card { display: grid; gap: 6px; color: var(--pd-text); text-decoration: none; align-content: start; }
.pd-video-thumb { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--gray-100, #F3F4F6); }
.pd-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.pd-video-card:hover .pd-video-thumb img { transform: scale(1.05); }
.pd-play {
    position: absolute; inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(229, 62, 62, .92); color: #fff;
    display: grid; place-items: center; font-size: 15px;
}
.pd-video-title { font-weight: 700; font-size: 14px; line-height: 1.7; }
.pd-video-card small { color: var(--pd-muted); font-size: 12px; }

/* ---------- نوار خرید موبایل ---------- */
.pd-mobilebar { display: none; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1199px) {
    .pd-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pd-buy { grid-column: 1 / -1; position: static; }
    .pd-gallery { position: static; }
}

@media (max-width: 767px) {
    .pd-top { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .pd-keyspecs { grid-template-columns: minmax(0, 1fr); }
    .pd-pros-cons { grid-template-columns: minmax(0, 1fr); }
    .pd-gallery-main { aspect-ratio: 4 / 3; }
    .pd-table th { width: 42%; }
    .pd-buy .pd-btn-buy { display: none; }   /* در موبایل دکمهٔ نوار پایین جایگزین می‌شود */

    .pd-mobilebar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--gray-200, #E5E7EB);
        box-shadow: 0 -8px 24px rgba(15, 45, 94, .12);
    }
    .pd-mobilebar-price b { display: block; font-size: 1.1rem; color: var(--pd-red, #E53E3E); line-height: 1.3; }
    .pd-mobilebar-price small { color: #4B5563; }
    .pd-mobilebar .pd-btn-buy { flex: 1 1 auto; max-width: 220px; }

    /* دکمه‌های شناور بالای نوار خرید بمانند */
    body.has-pd-bar .floating-cart { bottom: 76px; }
    body.has-pd-bar .farao-back-to-top { bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-btn-buy, .pd-thumb, .pd-video-thumb img { transition: none; }
}
