/* =========================================================
   PRODUCT PAGE
   ========================================================= */
.product-page {
    width: 100%;
    background: var(--fk-bg);
}

.product-intro {
    background: var(--fk-bg);
    padding: 64px 0;
}

.product-intro-image-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(var(--fk-white-rgb), 0.08);
    box-shadow: 0 16px 48px rgba(var(--fk-shadow-rgb), 0.35);
}

.product-intro-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.product-intro-content {
    direction: rtl;
    text-align: right;
    padding: 8px 0;
}

.product-intro-title {
    font-weight: 800 !important;
    margin-bottom: 8px !important;
}

.product-intro-lead {
    margin-bottom: 16px !important;
    font-weight: 600 !important;
}

.product-intro-text {
    line-height: 1.9 !important;
    margin-bottom: 16px !important;
}

.product-block-title {
    font-weight: 700 !important;
    margin: 18px 0 8px !important;
}

.product-divider {
    margin: 20px 0 !important;
    border-color: rgba(var(--fk-white-rgb), 0.12) !important;
}

.product-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

    .product-specs li {
        position: relative;
        padding-right: 22px;
        margin-bottom: 8px;
        color: var(--fk-text-muted);
        font-size: 0.92rem;
        line-height: 1.7;
    }

        .product-specs li::before {
            content: "";
            position: absolute;
            right: 0;
            top: 0.55em;
            width: 8px;
            height: 8px;
            border-radius: 2px;
            background: rgba(var(--fk-white-rgb), 0.55);
        }

        .product-specs li span {
            font-weight: 600;
            color: var(--fk-text-main);
        }

@media (max-width: 960px) {

    .product-intro {
        padding: 40px 16px;
    }

    .product-intro-image-wrap {
        margin-bottom: 12px;
    }
}

/* =========================================================
   PRODUCT SPEC LIST - جدول مشخصات کنار عکس
   ========================================================= */
.product-spec-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 22px 0 4px;
    direction: rtl;
}

.product-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(var(--fk-white-rgb), 0.05);
    border: 1px solid rgba(var(--fk-white-rgb), 0.08);
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

    .product-spec-row:hover {
        background: rgba(var(--fk-white-rgb), 0.09);
        border-color: rgba(var(--fk-white-rgb), 0.18);
        transform: translateX(-3px);
    }

.product-spec-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--fk-text-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.product-spec-icon {
    font-size: 1.25rem !important;
    color: var(--fk-icon-muted) !important;
    transition: color 0.25s ease;
}

.product-spec-row:hover .product-spec-icon {
    color: var(--fk-gold) !important;
}

.product-spec-value {
    min-width: 0;
    text-align: left;
    unicode-bidi: plaintext;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.7;
    color: var(--fk-text-main);
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .product-spec-row {
        padding: 11px 12px;
        gap: 10px;
    }

    .product-spec-label {
        font-size: 0.82rem;
        gap: 8px;
    }

    .product-spec-value {
        font-size: 0.82rem;
    }
}


/* =========================================================
   PRODUCT HERO v4
   - ارتفاع دقیقاً یک صفحه: 100svh منهای --fk-hero-offset
     (--fk-hero-offset را fk-scroll.js بر اساس فاصله‌ی hero از بالای سند تنظیم می‌کند؛
      معمولاً ۰ است، پس hero = کل صفحه و هیچ اسکرول اضافه‌ای روی آن نمی‌ماند)
   - تنها یک قانون ارتفاع برای همه‌ی دستگاه‌ها (قوانین تکراری قبلی حذف شد)
   - رسانه‌ی hero (پوستر/ویدئو) ثابت است: بدون سرریز و بدون transform
   - لبه‌ی پایین با ماسک در گرادیان پس‌زمینه حل می‌شود
   ========================================================= */
.product-hero {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--fk-hero-offset, 0px)); /* fallback مرورگرهای قدیمی */
    height: calc(100svh - var(--fk-hero-offset, 0px));
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overflow: clip;
    isolation: isolate;
    contain: paint;
    background: transparent;
}

.product-hero-media,
.product-hero-overlay {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, rgba(0, 0, 0, 0.5) 92%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 80%, rgba(0, 0, 0, 0.5) 92%, transparent 100%);
}

.product-hero-media {
    position: absolute;
    inset: 0 !important;
    z-index: 0;
    overflow: hidden;
    transform: none !important;
}

/* پوستر و ویدئو دقیقاً هم‌اندازه‌ی hero (بدون سرریز) */
.product-hero-poster,
.fk-hero-video {
    position: absolute;
    inset: 0 !important;
    width: 100%;
    height: 100%;
    transform: none !important;
}

    .product-hero-poster picture {
        display: block;
        width: 100%;
        height: 100%;
    }

.product-hero-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.fk-hero-video {
    pointer-events: none;
}

    .fk-hero-video > video,
    .fk-hero-video > img {
        position: absolute;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center;
        opacity: 0;
        transition: opacity 0.9s ease;
    }

    .fk-hero-video.is-playing > video,
    .fk-hero-video.is-playing > img {
        opacity: 1;
    }

.product-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(var(--fk-bg-rgb), 0.55) 0%, transparent 22%), linear-gradient(90deg, rgba(var(--fk-shadow-rgb), 0.05) 0%, rgba(var(--fk-shadow-rgb), 0.18) 40%, rgba(var(--fk-shadow-rgb), 0.58) 100%);
}

.product-hero::after {
    content: none;
}

.product-hero-glass {
    box-sizing: border-box;
    position: absolute;
    top: 65%;
    right: 6%;
    z-index: 2;
    padding: 28px 26px 24px;
    border-radius: 24px;
    background: var(--fk-glass-card-bg);
    -webkit-backdrop-filter: var(--fk-glass-card-filter);
    backdrop-filter: var(--fk-glass-card-filter);
    border: 1px solid var(--fk-glass-border);
    box-shadow: var(--fk-glass-card-shadow);
    text-align: right;
    direction: rtl;
}

.product-hero-title {
    font-weight: 800 !important;
    margin-bottom: 8px !important;
    line-height: 1.35 !important;
}

.product-hero-subtitle {
    margin-bottom: 22px !important;
    opacity: 0.9;
}

.product-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.product-btn-light {
    background: var(--fk-text-main) !important;
    color: var(--fk-bg) !important;
    font-weight: 600 !important;
}

.product-btn-outline {
    border-width: 1.5px !important;
    border-color: rgba(var(--fk-white-rgb), 0.85) !important;
    color: var(--fk-text-main) !important;
}

@media (max-width: 960px) {
    .product-hero-glass {
        top: auto;
        bottom: 20px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        padding: 18px 16px 16px;
        border-radius: 22px;
    }

    .product-hero-title {
        font-size: 1.45rem !important;
        margin-bottom: 4px !important;
    }

    .product-hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 14px !important;
    }
}

@media (max-width: 768px) {
    .product-hero-media,
    .product-hero-overlay {
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 84%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 0%, #000 84%, transparent 100%);
    }

    .product-hero-overlay {
        background: linear-gradient(180deg, rgba(var(--fk-bg-rgb), 0.6) 0%, transparent 20%), linear-gradient(180deg, transparent 38%, rgba(var(--fk-shadow-rgb), 0.35) 62%, rgba(var(--fk-shadow-rgb), 0.78) 100%);
    }

    .product-hero-glass {
        bottom: 16px;
        right: 14px;
        left: 14px;
        padding: 16px 14px 14px;
    }

    .product-hero-actions {
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .product-hero-glass {
        bottom: 12px;
        right: 12px;
        left: 12px;
        padding: 14px 12px 12px;
    }

    .product-hero-title {
        font-size: 1.3rem !important;
    }

    .product-hero-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 12px !important;
    }

    .product-hero-actions {
        flex-direction: column;
    }

        .product-hero-actions .mud-button {
            width: 100%;
            height: 42px !important;
        }
}

/* ---------- تبلت ۱۰ اینچ: عمودی ---------- */
@media (min-width: 601px) and (max-width: 1100px) and (orientation: portrait) {
    .product-hero-glass {
        left: auto;
        right: 28px;
        bottom: 32px;
        width: min(520px, calc(100% - 56px));
        padding: 22px 22px 20px;
    }

    .product-hero-title {
        font-size: 1.9rem !important;
    }

    .product-hero-subtitle {
        font-size: 1rem !important;
    }

    .product-hero-actions {
        flex-direction: row;
    }

        .product-hero-actions .mud-button {
            width: auto;
            height: 40px !important;
        }
}

/* ---------- تبلت ۱۰ اینچ: افقی ---------- */
@media (min-width: 901px) and (max-width: 1400px) and (orientation: landscape) and (max-height: 900px) {
    .product-hero-glass {
        top: auto;
        bottom: 8%;
        right: 5%;
        left: auto;
        width: min(400px, 44vw);
        padding: 18px 20px 16px;
    }

    .product-hero-title {
        font-size: 1.75rem !important;
    }

    .product-hero-subtitle {
        font-size: 0.92rem !important;
        margin-bottom: 14px !important;
    }

    .product-hero-actions {
        flex-direction: row;
    }

        .product-hero-actions .mud-button {
            width: auto;
            height: 38px !important;
        }
}

/* ---------- گوشی افقی ---------- */
@media (max-height: 520px) and (orientation: landscape) {
    .product-hero-glass {
        top: auto;
        bottom: 12px;
        right: 16px;
        left: auto;
        width: min(380px, 52vw);
        padding: 12px 14px 10px;
        border-radius: 18px;
    }

    .product-hero-title {
        font-size: 1.15rem !important;
        margin-bottom: 2px !important;
    }

    .product-hero-subtitle {
        font-size: 0.78rem !important;
        margin-bottom: 8px !important;
    }

    .product-hero-actions {
        flex-direction: row;
        gap: 6px;
    }

        .product-hero-actions .mud-button {
            width: auto;
            height: 32px !important;
            font-size: 0.75rem !important;
        }
}

@media (prefers-reduced-motion: reduce) {
    .fk-hero-video > video,
    .fk-hero-video > img {
        transition: none;
    }
}

/* ردیف‌های مشخصات: شیشه‌ی سبک (Liquid Glass) */
.product-spec-row {
    background: var(--fk-glass-ctrl-bg);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-color: var(--fk-glass-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 14px rgba(255, 255, 255, 0.03), 0 6px 18px rgba(0, 0, 0, 0.35);
}

    .product-spec-row:hover {
        background: var(--fk-glass-card-bg);
        border-color: rgba(255, 255, 255, 0.3);
    }


/* انیمیشن ورود پنل محصول با CSS (مستقل از JS) */
@keyframes pf-glass-in {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pf-glass-part {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.product-hero-glass {
    animation: pf-glass-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s backwards;
}

    .product-hero-glass > * {
        animation: pf-glass-part 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.5s backwards;
    }

        .product-hero-glass > *:nth-child(2) {
            animation-delay: 0.62s;
        }

        .product-hero-glass > *:nth-child(3) {
            animation-delay: 0.74s;
        }

@media (prefers-reduced-motion: reduce) {
    .product-hero-glass, .product-hero-glass > * {
        animation: none;
    }
}
/* =========================================================
   HERO CRITICAL — قوانین چیدمان hero محصول
   این بخش باید در Theme.css (که از همان ابتدا لود می‌شود) باشد؛
   چون ProductPage.css با تأخیر توسط ماژول لود می‌شود و تا آن موقع
   پوستر/ویدئو با اندازه‌ی طبیعی نمایش داده می‌شد (hero بزرگ‌تر از صفحه + اسکرول اضافه).
   ========================================================= */
.product-hero {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--fk-hero-offset, 0px));
    height: calc(100svh - var(--fk-hero-offset, 0px));
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overflow: clip;
    isolation: isolate;
    contain: paint;
    background: transparent;
}

.product-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    transform: none;
}

.product-hero-poster,
.fk-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
}

    .product-hero-poster picture {
        display: block;
        width: 100%;
        height: 100%;
    }

.product-hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.fk-hero-video {
    pointer-events: none;
}

    .fk-hero-video > video,
    .fk-hero-video > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        opacity: 0;
    }

    .fk-hero-video.is-playing > video,
    .fk-hero-video.is-playing > img {
        opacity: 1;
    }

.product-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.product-hero-glass {
    box-sizing: border-box;
    position: absolute;
    top: 65%;
    right: 6%;
    z-index: 2;
    text-align: right;
    direction: rtl;
}

@media (max-width: 960px) {
    .product-hero-glass {
        top: auto;
        bottom: 20px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}