/*
Theme Name: فایل‌مارکت (پوسته اختصاصی فروشگاه فایل)
Theme URI: https://example.com/filemarket-wp
Author: طراحی اختصاصی وردپرس
Author URI: https://example.com
Description: قالب ۱۰۰٪ مستقل، مینیمال و سئو محور برای فروشگاه فایل ووکامرس (نسخه ۲.۷ مجهز به سیستم بارگذاری فونت اختصاصی در وزن‌های دلخواه بدون لود فونت اضافه، نوار پیشرفت خوانش مقالات، و مدیریت کامل طیف رنگی تمام دکمه‌ها).
Version: 2.9.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
WC requires at least: 7.0
WC tested up to: 9.3
Text Domain: filemarket-wp
Direction: rtl
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --fm-primary: #1e40af;
    --fm-primary-hover: #1e3a8a;
    --fm-primary-light: #eff6ff;
    --fm-accent: #0f766e;
    --fm-accent-hover: #115e59;
    --fm-accent-light: #f0fdfa;

    /* گروه ۱: دکمه‌های اصلی، جستجو، حساب کاربری، ارسال دیدگاه و تب فعال */
    --fm-btn1-bg: #1e40af;
    --fm-btn1-hover: #1e3a8a;
    --fm-btn1-text: #ffffff;

    /* گروه ۲: دکمه‌های کارت محصول، ادامه مطلب مقالات، پیش‌نمایش و پاسخ دیدگاه */
    --fm-btn2-bg: #eff6ff;
    --fm-btn2-text: #1e40af;
    --fm-btn2-border: #bfdbfe;
    --fm-btn2-hover-bg: #1e40af;
    --fm-btn2-hover-text: #ffffff;

    /* گروه ۳: دکمه‌های نهایی خرید فایل و پرداخت تسویه‌حساب */
    --fm-btn3-bg: #1e40af;
    --fm-btn3-hover: #1e3a8a;
    --fm-btn3-text: #ffffff;

    /* نوار پیشرفت خوانش مقالات */
    --fm-progress-color: #1e40af;
    --fm-progress-height: 4px;

    /* مدیریت هوشمند وزن فونت‌ها (متناسب با وزن‌های آپلودشده توسط کاربر) */
    --fm-default-font: Tahoma, Arial, sans-serif;
    --fm-fw-regular: 400;
    --fm-fw-medium: 500;
    --fm-fw-bold: 700;
    --fm-fw-heavy: 700;

    --fm-danger: #b91c1c;
    --fm-warning: #d97706;
    --fm-dark: #0f172a;
    --fm-header-bg: #ffffff;
    --fm-text: #1e293b;
    --fm-muted: #64748b;
    --fm-border: #e2e8f0;
    --fm-border-strong: #cbd5e1;
    --fm-bg: #f8fafc;
    --fm-surface: #ffffff;
    --fm-radius-sm: 6px;
    --fm-radius: 10px;
    --fm-radius-lg: 14px;
    --fm-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --fm-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
    --fm-shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.1);
    --fm-container: 1380px;
    --fm-shop-cols: 3;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    width: 100%;
}

body {
    font-family: var(--fm-font, var(--fm-default-font));
    font-weight: var(--fm-fw-regular);
    background-color: var(--fm-bg);
    color: var(--fm-text);
    line-height: 1.85;
    font-size: 15px;
    direction: rtl;
    text-align: right;
    overflow-x: clip;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 68px;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* ==========================================================================
   نوار پیشرفت خوانش مقالات در بالای صفحه (پر شدن نرم با اسکرول)
   ========================================================================== */
.fm-reading-progress-wrap {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: var(--fm-progress-height, 4px);
    background: rgba(15, 23, 42, 0.06);
    z-index: 99999;
    pointer-events: none;
}

.admin-bar .fm-reading-progress-wrap {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .fm-reading-progress-wrap {
        top: 46px;
    }
}

.fm-reading-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--fm-progress-color, var(--fm-btn1-bg));
    transition: width 0.08s linear;
    margin-right: 0;
    margin-left: auto;
}

main.fm-container {
    flex: 1 0 auto;
    display: block;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
}

a {
    color: var(--fm-primary);
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a:hover {
    color: var(--fm-primary-hover);
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
}

.fm-container {
    width: 100% !important;
    max-width: var(--fm-container) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 16px;
    padding-left: 16px;
}

@media (min-width: 768px) {
    .fm-container {
        padding-right: 24px;
        padding-left: 24px;
    }
}

/* ==========================================================================
   لایه سازگاری برای محصولاتی یا برگه‌هایی که قبلاً با المنتور ذخیره شده‌اند
   ========================================================================== */
.elementor,
.elementor-inner,
.elementor-section-wrap,
.elementor-section {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
}

.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100% !important;
    width: 100% !important;
    margin-right: auto;
    margin-left: auto;
}

.elementor-container,
.elementor-row {
    display: flex;
    flex-wrap: wrap;
    width: 100% !important;
    gap: 16px;
}

.elementor-column,
.elementor-widget-wrap,
.elementor-widget-container {
    width: 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .elementor-col-50, .elementor-column[data-col="50"] { width: calc(50% - 8px); }
    .elementor-col-33, .elementor-column[data-col="33"] { width: calc(33.333% - 11px); }
    .elementor-col-25, .elementor-column[data-col="25"] { width: calc(25% - 12px); }
    .elementor-col-66, .elementor-column[data-col="66"] { width: calc(66.666% - 8px); }
}

.elementor-invisible {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==========================================================================
   خنثی‌سازی کامل استایل‌های پیش‌فرض ووکامرس در فروشگاه و دسته‌بندی‌ها
   ========================================================================== */
.woocommerce #container,
.woocommerce #content,
.woocommerce-page #container,
.woocommerce-page #content,
.tax-product_cat .fm-container,
.tax-product_tag .fm-container,
.post-type-archive-product .fm-container {
    width: 100% !important;
    max-width: var(--fm-container) !important;
    float: none !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.woocommerce .products ul,
.woocommerce ul.products,
.woocommerce-page ul.products,
.tax-product_cat ul.products,
.fm-products-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    clear: both !important;
    float: none !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
    display: none !important;
}

@media (min-width: 576px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .tax-product_cat ul.products,
    .fm-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 992px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .tax-product_cat ul.products,
    .fm-products-grid {
        grid-template-columns: repeat(var(--fm-shop-cols, 3), minmax(0, 1fr)) !important;
    }
    .fm-products-grid.fm-cols-4,
    .woocommerce ul.products.fm-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    .fm-products-grid.fm-cols-3,
    .woocommerce ul.products.fm-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce-page.columns-3 ul.products li.product,
.woocommerce.columns-3 ul.products li.product,
.woocommerce-page.columns-4 ul.products li.product,
.woocommerce.columns-4 ul.products li.product,
.tax-product_cat ul.products li.product,
.fm-product-card {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
}

/* ==========================================================================
   سربرگ مینیمال و تایپوگرافیک
   ========================================================================== */
.fm-header {
    background: var(--fm-header-bg);
    border-bottom: 1px solid var(--fm-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 72px;
    width: 100%;
}

.fm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 10px 0;
    width: 100%;
}

.fm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
}

.fm-brand img.custom-logo,
.fm-brand img.fm-custom-logo {
    max-height: 44px;
    width: auto;
}

.fm-site-title {
    font-size: 19px;
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-dark);
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.fm-site-desc {
    font-size: 11.5px;
    color: var(--fm-muted);
    display: none;
}

@media (min-width: 576px) {
    .fm-site-desc {
        display: block;
    }
}

.fm-header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .fm-header-search {
        display: block;
    }
}

.fm-search-form {
    display: flex;
    align-items: center;
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    padding: 3px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    width: 100%;
}

.fm-search-form:focus-within {
    border-color: var(--fm-btn1-bg);
    background: var(--fm-surface);
}

.fm-search-input {
    width: 100%;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 7px 12px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--fm-text);
    outline: none;
}

.fm-search-btn {
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    border: none;
    border-radius: 4px;
    padding: 7px 16px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: var(--fm-fw-bold);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fm-search-btn:hover {
    background: var(--fm-btn1-hover);
    color: var(--fm-btn1-text);
}

.fm-live-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    box-shadow: var(--fm-shadow-lg);
    z-index: 1100;
    display: none;
    max-height: 360px;
    overflow-y: auto;
}

.fm-live-results.is-open {
    display: block;
}

.fm-live-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--fm-border);
    color: var(--fm-text);
    font-size: 13.5px;
}

.fm-live-item:last-child {
    border-bottom: none;
}

.fm-live-item:hover {
    background: var(--fm-bg);
}

.fm-live-price {
    font-weight: var(--fm-fw-bold);
    color: var(--fm-accent);
    font-size: 12.5px;
    white-space: nowrap;
}

.fm-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: var(--fm-radius-sm);
    font-size: 13px;
    font-weight: var(--fm-fw-bold);
    border: 1px solid var(--fm-btn2-border);
    background: var(--fm-btn2-bg);
    color: var(--fm-btn2-text);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fm-action-btn.fm-hide-mobile {
    display: none;
}

@media (min-width: 992px) {
    .fm-action-btn.fm-hide-mobile {
        display: inline-flex;
    }
}

.fm-action-btn:hover {
    background: var(--fm-btn2-hover-bg);
    border-color: var(--fm-btn2-hover-bg);
    color: var(--fm-btn2-hover-text);
}

.fm-action-btn--primary {
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    border-color: var(--fm-btn1-bg);
}

.fm-action-btn--primary:hover {
    background: var(--fm-btn1-hover);
    border-color: var(--fm-btn1-hover);
    color: var(--fm-btn1-text);
}

.fm-cart-count {
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    font-size: 11px;
    font-weight: var(--fm-fw-bold);
    min-width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.fm-navbar {
    background: var(--fm-surface);
    border-top: 1px solid #f1f5f9;
    display: none;
}

@media (min-width: 992px) {
    .fm-navbar {
        display: block;
    }
}

.fm-nav-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
    list-style: none;
    min-height: 44px;
}

.fm-nav-list li {
    position: relative;
}

.fm-nav-list a {
    color: var(--fm-muted);
    font-size: 13.5px;
    font-weight: var(--fm-fw-medium);
    padding: 10px 0;
    display: inline-block;
}

.fm-nav-list a:hover,
.fm-nav-list .current-menu-item > a {
    color: var(--fm-primary);
}

.fm-nav-list ul.sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 210px;
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    box-shadow: var(--fm-shadow);
    list-style: none;
    padding: 6px 0;
    display: none;
    z-index: 999;
}

.fm-nav-list li:hover > ul.sub-menu {
    display: block;
}

.fm-nav-list ul.sub-menu a {
    display: block;
    padding: 8px 16px;
    font-weight: var(--fm-fw-regular);
    font-size: 13px;
}

.fm-mobile-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    background: var(--fm-surface);
    cursor: pointer;
    flex-shrink: 0;
}

.fm-mobile-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--fm-dark);
}

@media (min-width: 992px) {
    .fm-mobile-toggle {
        display: none;
    }
}

.fm-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1999;
    display: none;
}

.fm-drawer-backdrop.is-open {
    display: block;
}

.fm-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    background: var(--fm-surface);
    z-index: 2000;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    box-shadow: var(--fm-shadow-lg);
}

.fm-drawer.is-open {
    transform: translateX(0);
}

.fm-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--fm-border);
}

.fm-drawer-close {
    background: none;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
}

.fm-drawer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.fm-drawer-nav li {
    border-bottom: 1px solid #f1f5f9;
}

.fm-drawer-nav a {
    display: block;
    padding: 10px 4px;
    color: var(--fm-text);
    font-weight: var(--fm-fw-medium);
}

/* ==========================================================================
   بخش معرفی تحریریه صفحه اول
   ========================================================================== */
.fm-editorial-showcase {
    padding: 28px 0 16px;
    margin-bottom: 36px;
}

.fm-editorial-frame {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    box-shadow: var(--fm-shadow-sm);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
    .fm-editorial-frame {
        grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    }
}

.fm-editorial-right {
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 1px solid var(--fm-border);
}

@media (min-width: 768px) {
    .fm-editorial-right {
        padding: 42px 44px;
    }
}

@media (min-width: 992px) {
    .fm-editorial-right {
        border-bottom: none;
        border-left: 1px solid var(--fm-border);
    }
}

.fm-status-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-primary);
    margin-bottom: 18px;
}

.fm-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fm-primary);
    display: inline-block;
}

.fm-editorial-title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-dark);
    line-height: 1.45;
    margin-bottom: 14px;
}

.fm-editorial-sub {
    font-size: 15px;
    color: var(--fm-muted);
    line-height: 1.9;
    margin-bottom: 28px;
    max-width: 620px;
}

.fm-command-search {
    display: flex;
    align-items: center;
    background: var(--fm-bg);
    border: 1.5px solid var(--fm-border-strong);
    border-radius: var(--fm-radius);
    padding: 5px;
    margin-bottom: 20px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.fm-command-search:focus-within {
    background: var(--fm-surface);
    border-color: var(--fm-btn1-bg);
}

.fm-command-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--fm-dark);
    outline: none;
}

.fm-command-search button {
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    border: none;
    padding: 11px 24px;
    border-radius: var(--fm-radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: var(--fm-fw-bold);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.fm-command-search button:hover {
    background: var(--fm-btn1-hover);
    color: var(--fm-btn1-text);
}

.fm-slash-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--fm-muted);
}

.fm-slash-cats a {
    color: var(--fm-text);
    font-weight: var(--fm-fw-medium);
    padding: 2px 6px;
    border-radius: 4px;
}

.fm-slash-cats a:hover {
    background: var(--fm-btn2-bg);
    color: var(--fm-btn2-text);
}

.fm-slash-sep {
    color: var(--fm-border-strong);
}

.fm-editorial-left {
    background: #fcfcfd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fm-metrics-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--fm-border);
}

.fm-metric-cell {
    padding: 20px 16px;
    border-left: 1px solid var(--fm-border);
    text-align: right;
}

.fm-metric-cell:last-child {
    border-left: none;
}

.fm-metric-num {
    font-size: 20px;
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-primary);
    display: block;
    line-height: 1.2;
    margin-bottom: 4px;
}

.fm-metric-label {
    font-size: 11.5px;
    color: var(--fm-muted);
}

.fm-featured-dossier {
    padding: 24px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fm-dossier-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-muted);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--fm-border);
}

.fm-dossier-tag {
    background: var(--fm-btn2-bg);
    color: var(--fm-btn2-text);
    padding: 2px 8px;
    border-radius: 4px;
}

.fm-dossier-body {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.fm-dossier-thumb {
    width: 88px;
    height: 88px;
    border-radius: var(--fm-radius-sm);
    overflow: hidden;
    border: 1px solid var(--fm-border);
    background: var(--fm-bg);
}

.fm-dossier-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fm-dossier-title {
    font-size: 15.5px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    line-height: 1.55;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fm-dossier-meta {
    font-size: 12px;
    color: var(--fm-muted);
}

.fm-dossier-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--fm-border);
}

.fm-dossier-price {
    font-size: 15px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-accent);
}

.fm-dossier-link {
    font-size: 12.5px;
    font-weight: var(--fm-fw-bold);
    background: var(--fm-btn2-bg);
    color: var(--fm-btn2-text);
    border: 1px solid var(--fm-btn2-border);
    padding: 6px 12px;
    border-radius: var(--fm-radius-sm);
}

.fm-dossier-link:hover {
    background: var(--fm-btn2-hover-bg);
    border-color: var(--fm-btn2-hover-bg);
    color: var(--fm-btn2-hover-text);
}

/* نوار ۴ اصل تضمین فروشگاه */
.fm-pillars-bar {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    margin-bottom: 44px;
    overflow: hidden;
}

@media (min-width: 576px) {
    .fm-pillars-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .fm-pillars-bar {
        grid-template-columns: repeat(4, 1fr);
    }
}

.fm-pillar-item {
    padding: 18px 20px;
    border-bottom: 1px solid var(--fm-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (min-width: 992px) {
    .fm-pillar-item {
        border-bottom: none;
        border-left: 1px solid var(--fm-border);
    }
    .fm-pillar-item:last-child {
        border-left: none;
    }
}

.fm-pillar-num {
    font-size: 11px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-primary);
    letter-spacing: 1px;
}

.fm-pillar-title {
    font-size: 14px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
}

.fm-pillar-desc {
    font-size: 12.5px;
    color: var(--fm-muted);
}

/* ==========================================================================
   سرتیتر بخش‌ها، تب‌های مینیمال و فهرست شماره‌دار دسته‌بندی‌ها
   ========================================================================== */
.fm-section {
    margin-bottom: 48px;
    width: 100%;
}

.fm-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fm-border-strong);
    width: 100%;
}

.fm-section-title {
    font-size: 18px;
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-dark);
}

@media (min-width: 768px) {
    .fm-section-title {
        font-size: 20px;
    }
}

.fm-section-link {
    font-size: 13px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-primary);
}

.fm-section-link:hover {
    color: var(--fm-primary-hover);
}

.fm-minimal-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.fm-tab-trigger {
    background: var(--fm-btn2-bg);
    border: 1px solid var(--fm-btn2-border);
    color: var(--fm-btn2-text);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: var(--fm-fw-bold);
    padding: 5px 13px;
    border-radius: var(--fm-radius-sm);
    cursor: pointer;
    transition: all 0.18s ease;
}

.fm-tab-trigger:hover {
    background: var(--fm-btn2-hover-bg);
    border-color: var(--fm-btn2-hover-bg);
    color: var(--fm-btn2-hover-text);
}

.fm-tab-trigger.is-active {
    background: var(--fm-btn1-bg);
    border-color: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
}

.fm-tab-pane {
    display: none;
}

.fm-tab-pane.is-active {
    display: block;
}

.fm-cats-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    margin-bottom: 24px;
}

@media (min-width: 480px) {
    .fm-cats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) {
    .fm-cats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    .fm-cats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.fm-cat-card {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.fm-cat-card:hover {
    border-color: var(--fm-primary);
    transform: translateY(-2px);
    box-shadow: var(--fm-shadow-sm);
}

.fm-cat-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fm-cat-index {
    font-size: 12px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-primary);
    padding-left: 8px;
    border-left: 1px solid var(--fm-border);
}

.fm-cat-name {
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    font-size: 14px;
    line-height: 1.4;
}

.fm-cat-count {
    font-size: 11.5px;
    color: var(--fm-btn2-text);
    background: var(--fm-btn2-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: var(--fm-fw-medium);
    flex-shrink: 0;
}

/* ==========================================================================
   کارت محصول و کارت مقاله
   ========================================================================== */
.fm-product-card {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    height: 100%;
    width: 100%;
}

.fm-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fm-shadow);
    border-color: var(--fm-border-strong);
}

.fm-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
    border-bottom: 1px solid var(--fm-border);
    display: block;
    width: 100%;
}

.fm-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    margin: 0 !important;
    transition: transform 0.3s ease;
}

.fm-product-card:hover .fm-card-thumb img {
    transform: scale(1.02);
}

.fm-badge-format {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    font-size: 11px;
    font-weight: var(--fm-fw-bold);
    padding: 3px 9px;
    border-radius: 4px;
}

.fm-badge-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--fm-danger);
    color: #fff;
    font-size: 11px;
    font-weight: var(--fm-fw-bold);
    padding: 3px 8px;
    border-radius: 4px;
}

.fm-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.fm-card-cat {
    font-size: 11.5px;
    color: var(--fm-primary);
    font-weight: var(--fm-fw-medium);
    margin-bottom: 6px;
}

.fm-card-title {
    font-size: 15px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    word-break: break-word;
}

.fm-card-title a {
    color: inherit;
}

.fm-card-title a:hover {
    color: var(--fm-primary);
}

.fm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11.5px;
    color: var(--fm-muted);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.fm-card-meta span {
    background: var(--fm-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.fm-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.fm-card-price {
    font-size: 14.5px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-accent);
}

.fm-card-price del {
    font-size: 11.5px;
    color: var(--fm-muted);
    font-weight: var(--fm-fw-regular);
    display: block;
}

.fm-card-price ins {
    text-decoration: none;
}

.fm-btn-buy {
    background: var(--fm-btn2-bg);
    color: var(--fm-btn2-text);
    border: 1px solid var(--fm-btn2-border);
    font-weight: var(--fm-fw-bold);
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: var(--fm-radius-sm);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fm-btn-buy:hover {
    background: var(--fm-btn2-hover-bg);
    border-color: var(--fm-btn2-hover-bg);
    color: var(--fm-btn2-hover-text);
}

/* فهرست افقی ۲ ستونه */
.fm-ledger-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
}

@media (min-width: 992px) {
    .fm-ledger-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fm-ledger-row {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fm-ledger-row:hover {
    border-color: var(--fm-primary);
    box-shadow: var(--fm-shadow-sm);
}

.fm-ledger-right {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.fm-ledger-rank {
    font-size: 16px;
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-primary);
    min-width: 26px;
    text-align: center;
    padding-left: 12px;
    border-left: 1px solid var(--fm-border);
}

.fm-ledger-info {
    min-width: 0;
}

.fm-ledger-title {
    font-size: 14.5px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-ledger-title a {
    color: inherit;
}

.fm-ledger-title a:hover {
    color: var(--fm-primary);
}

.fm-ledger-sub {
    font-size: 12px;
    color: var(--fm-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-ledger-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.fm-ledger-price {
    font-size: 14px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-accent);
    white-space: nowrap;
}

/* ==========================================================================
   Shop & Category Archive Layout
   ========================================================================== */
.fm-shop-toolbar {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100% !important;
}

.fm-shop-toolbar .woocommerce-result-count,
.fm-shop-toolbar .woocommerce-ordering {
    margin: 0 !important;
    float: none !important;
}

.fm-shop-toolbar select.orderby {
    font-family: inherit;
    font-size: 13.5px;
    padding: 7px 12px;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    background: var(--fm-bg);
    color: var(--fm-text);
    outline: none;
}

.fm-archive-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
    margin: 20px 0 48px !important;
    width: 100% !important;
    align-items: start;
}

@media (min-width: 992px) {
    .fm-archive-layout.fm-has-sidebar-right {
        grid-template-columns: 280px minmax(0, 1fr) !important;
    }
    .fm-archive-layout.fm-has-sidebar-left {
        grid-template-columns: minmax(0, 1fr) 280px !important;
    }
    .fm-archive-layout.fm-fullwidth {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.fm-archive-main,
.fm-archive-sidebar {
    width: 100% !important;
    min-width: 0 !important;
}

.fm-category-desc-box {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 20px 24px;
    margin-top: 28px;
    width: 100%;
    font-size: 14.5px;
    line-height: 1.95;
}

.fm-filter-card {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 18px;
    margin-bottom: 18px;
}

.fm-filter-title {
    font-size: 14.5px;
    font-weight: var(--fm-fw-bold);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fm-border);
    color: var(--fm-dark);
}

.fm-filter-list {
    list-style: none;
}

.fm-filter-list li {
    margin-bottom: 4px;
}

.fm-filter-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 6px;
    color: var(--fm-text);
    font-size: 13.5px;
}

.fm-filter-list a:hover,
.fm-filter-list li.is-current > a {
    background: var(--fm-btn2-bg);
    color: var(--fm-btn2-text);
    font-weight: var(--fm-fw-bold);
}

/* ==========================================================================
   Single Product Layout
   ========================================================================== */
.fm-breadcrumb {
    font-size: 12.5px;
    color: var(--fm-muted);
    padding: 14px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
}

.fm-single-product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 48px;
    align-items: start;
    width: 100%;
}

@media (min-width: 992px) {
    .fm-single-product-grid {
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 28px;
    }
}

.fm-product-main-box {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-lg);
    padding: 18px;
    width: 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .fm-product-main-box {
        padding: 28px;
    }
}

.fm-product-header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--fm-border);
}

@media (min-width: 768px) {
    .fm-product-header-top {
        grid-template-columns: 270px minmax(0, 1fr);
        gap: 24px;
    }
}

.fm-product-cover {
    border-radius: var(--fm-radius);
    overflow: hidden;
    border: 1px solid var(--fm-border);
    background: #f8fafc;
    aspect-ratio: 4 / 3;
}

.fm-product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fm-product-title {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-dark);
    line-height: 1.55;
    margin-bottom: 12px;
}

.fm-product-excerpt {
    font-size: 14px;
    color: var(--fm-text);
    background: var(--fm-bg);
    padding: 12px 14px;
    border-radius: var(--fm-radius-sm);
    border-right: 3px solid var(--fm-primary);
    margin-bottom: 16px;
}

.fm-quick-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-qbadge {
    font-size: 12px;
    background: var(--fm-btn2-bg);
    border: 1px solid var(--fm-btn2-border);
    color: var(--fm-btn2-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: var(--fm-fw-medium);
}

.fm-product-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.fm-buy-card {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border-strong);
    border-radius: var(--fm-radius-lg);
    padding: 22px;
    box-shadow: var(--fm-shadow);
}

.fm-buy-price-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fm-border);
    flex-wrap: wrap;
    gap: 8px;
}

.fm-buy-price-label {
    font-size: 13.5px;
    color: var(--fm-muted);
    font-weight: var(--fm-fw-medium);
}

.fm-buy-price-val {
    font-size: 20px;
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-accent);
}

.fm-buy-price-val del {
    font-size: 12.5px;
    color: var(--fm-muted);
    display: block;
}

.fm-buy-price-val ins {
    text-decoration: none;
}

.fm-specs-list {
    list-style: none;
    margin-bottom: 18px;
}

.fm-specs-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--fm-border);
    font-size: 13px;
}

.fm-specs-list li:last-child {
    border-bottom: none;
}

.fm-spec-key {
    color: var(--fm-muted);
}

.fm-spec-val {
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    text-align: left;
}

.fm-buy-card .quantity {
    display: none !important;
}

.fm-buy-card button.single_add_to_cart_button,
.fm-btn-MainBuy {
    width: 100%;
    background: var(--fm-btn3-bg) !important;
    color: var(--fm-btn3-text) !important;
    border: none !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    font-weight: var(--fm-fw-bold) !important;
    border-radius: var(--fm-radius-sm) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit !important;
    transition: background-color 0.2s ease;
}

.fm-buy-card button.single_add_to_cart_button:hover,
.fm-btn-MainBuy:hover {
    background: var(--fm-btn3-hover) !important;
    color: var(--fm-btn3-text) !important;
}

.fm-preview-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--fm-radius-sm);
    border: 1px solid var(--fm-btn2-border);
    color: var(--fm-btn2-text);
    font-weight: var(--fm-fw-bold);
    font-size: 13px;
    background: var(--fm-btn2-bg);
    transition: all 0.2s ease;
}

.fm-preview-btn:hover {
    background: var(--fm-btn2-hover-bg);
    border-color: var(--fm-btn2-hover-bg);
    color: var(--fm-btn2-hover-text);
}

.fm-guarantee-box {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 16px;
    font-size: 13px;
}

.fm-guarantee-box h4 {
    font-size: 13.5px;
    font-weight: var(--fm-fw-bold);
    margin-bottom: 10px;
    color: var(--fm-dark);
}

.fm-guarantee-box ul {
    list-style: none;
}

.fm-guarantee-box li {
    padding: 5px 0;
    color: var(--fm-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fm-guarantee-box li::before {
    content: "—";
    color: var(--fm-primary);
    font-weight: var(--fm-fw-bold);
}

.fm-shortlink-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    padding: 8px 12px;
    border-radius: var(--fm-radius-sm);
    font-size: 12px;
}

.fm-copy-btn {
    background: var(--fm-btn2-bg);
    color: var(--fm-btn2-text);
    border: 1px solid var(--fm-btn2-border);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: var(--fm-fw-bold);
}

.fm-copy-btn:hover {
    background: var(--fm-btn2-hover-bg);
    color: var(--fm-btn2-hover-text);
}

/* ==========================================================================
   بخش مقالات و نوشته‌ها
   ========================================================================== */
.fm-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin: 20px 0 48px;
    width: 100%;
    align-items: start;
}

@media (min-width: 992px) {
    .fm-article-layout.fm-article-with-sidebar {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
    .fm-article-layout.fm-article-centered {
        max-width: 960px;
        margin-right: auto;
        margin-left: auto;
    }
}

.fm-article-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fm-border);
}

.fm-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 12.5px;
    color: var(--fm-muted);
    margin-top: 10px;
}

.fm-article-meta span {
    background: var(--fm-bg);
    padding: 4px 10px;
    border-radius: 4px;
}

.fm-article-featured {
    margin-bottom: 20px;
    border-radius: var(--fm-radius);
    overflow: hidden;
    background: var(--fm-bg);
}

.fm-article-featured img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
}

.fm-entry-content {
    line-height: 2;
    font-size: 15px;
    color: var(--fm-text);
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    overflow-x: clip;
}

.fm-entry-content h2,
.fm-entry-content h3,
.fm-entry-content h4 {
    color: var(--fm-dark);
    margin: 24px 0 12px;
    line-height: 1.5;
    font-weight: var(--fm-fw-bold);
}

.fm-entry-content h2 {
    font-size: 18.5px;
    padding-right: 12px;
    border-right: 3px solid var(--fm-primary);
}

.fm-entry-content p,
.fm-entry-content ul,
.fm-entry-content ol {
    margin-bottom: 16px;
}

.fm-entry-content ul,
.fm-entry-content ol {
    padding-right: 20px;
}

.fm-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13.5px;
    display: block;
    overflow-x: auto;
}

@media (min-width: 768px) {
    .fm-entry-content table {
        display: table;
    }
}

.fm-entry-content th,
.fm-entry-content td {
    border: 1px solid var(--fm-border);
    padding: 10px 12px;
}

.fm-entry-content th {
    background: var(--fm-bg);
    font-weight: var(--fm-fw-bold);
}

/* ==========================================================================
   بخش دیدگاه‌ها و نظرات
   ========================================================================== */
.fm-comments-area,
#reviews.woocommerce-Reviews {
    margin-top: 12px;
    width: 100%;
}

.fm-comments-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fm-border-strong);
}

.fm-comments-title {
    font-size: 17px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-comments-count-badge {
    background: var(--fm-btn2-bg);
    border: 1px solid var(--fm-btn2-border);
    color: var(--fm-btn2-text);
    font-size: 12px;
    font-weight: var(--fm-fw-bold);
    padding: 2px 10px;
    border-radius: 4px;
}

.fm-comment-list,
#reviews ol.commentlist {
    list-style: none !important;
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fm-comment-item,
#reviews ol.commentlist li.comment,
#reviews ol.commentlist li.review {
    background: var(--fm-bg) !important;
    border: 1px solid var(--fm-border) !important;
    border-radius: var(--fm-radius) !important;
    padding: 18px !important;
    margin: 0 !important;
}

.fm-comment-item.byuser,
.fm-comment-item.bypostauthor {
    background: #f8fafc !important;
    border-right: 3px solid var(--fm-primary) !important;
}

.fm-comment-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--fm-border);
}

.fm-comment-author-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-comment-avatar img,
#reviews ol.commentlist li img.avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

.fm-comment-author-name {
    font-size: 14px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-badge-role {
    font-size: 11px;
    font-weight: var(--fm-fw-bold);
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
}

.fm-badge-buyer {
    font-size: 11px;
    font-weight: var(--fm-fw-bold);
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--fm-accent-light);
    color: var(--fm-accent);
}

.fm-comment-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--fm-muted);
}

.fm-star-badge {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    color: var(--fm-dark);
    font-weight: var(--fm-fw-bold);
    font-size: 11.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.fm-comment-content {
    font-size: 14px;
    line-height: 1.9;
    color: var(--fm-text);
}

.fm-comment-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.fm-comment-actions .comment-reply-link {
    font-size: 12px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-btn2-text);
    background: var(--fm-btn2-bg);
    border: 1px solid var(--fm-btn2-border);
    padding: 4px 12px;
    border-radius: 4px;
}

.fm-comment-actions .comment-reply-link:hover {
    background: var(--fm-btn2-hover-bg);
    border-color: var(--fm-btn2-hover-bg);
    color: var(--fm-btn2-hover-text);
}

.fm-comment-list ul.children,
.fm-comment-list ol.children,
#reviews ol.commentlist ul.children {
    list-style: none !important;
    margin: 14px 16px 0 0 !important;
    padding: 0 14px 0 0 !important;
    border-right: 2px solid var(--fm-primary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#respond.comment-respond {
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 22px;
    margin-top: 20px;
}

#reply-title.comment-reply-title {
    font-size: 16px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fm-border);
}

.comment-notes {
    font-size: 12.5px;
    color: var(--fm-muted);
    margin-bottom: 16px;
}

.fm-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 640px) {
    .fm-form-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.comment-form label {
    display: block;
    font-size: 13px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form select,
.comment-form textarea {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--fm-border-strong) !important;
    border-radius: var(--fm-radius-sm) !important;
    background: var(--fm-surface) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: var(--fm-text) !important;
    outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--fm-btn1-bg) !important;
}

.comment-form textarea {
    min-height: 120px;
}

.comment-form-cookies-consent {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 14px 0 !important;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
}

.comment-form-cookies-consent label {
    margin: 0 !important;
    font-weight: var(--fm-fw-regular) !important;
    font-size: 12.5px !important;
    color: var(--fm-muted) !important;
}

.comment-form .form-submit input[type="submit"],
.comment-form .form-submit button[type="submit"] {
    background: var(--fm-btn1-bg) !important;
    color: var(--fm-btn1-text) !important;
    border: none !important;
    padding: 11px 26px !important;
    border-radius: var(--fm-radius-sm) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: var(--fm-fw-bold) !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-form .form-submit input[type="submit"]:hover,
.comment-form .form-submit button[type="submit"]:hover {
    background: var(--fm-btn1-hover) !important;
}

/* ==========================================================================
   صفحات سبد خرید، تسویه‌حساب و حساب کاربری ووکامرس
   ========================================================================== */
.woocommerce table.shop_table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: var(--fm-surface);
    border: 1px solid var(--fm-border) !important;
    border-radius: var(--fm-radius) !important;
    overflow: hidden;
    margin-bottom: 24px !important;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--fm-border) !important;
    text-align: right !important;
}

.woocommerce table.shop_table th {
    background: var(--fm-bg);
    font-weight: var(--fm-fw-bold);
}

.woocommerce .col2-set,
.woocommerce-page .col2-set {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
}

@media (min-width: 768px) {
    .woocommerce .col2-set,
    .woocommerce-page .col2-set {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2 {
    float: none !important;
    width: 100% !important;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--fm-border-strong) !important;
    border-radius: var(--fm-radius-sm) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    background: var(--fm-bg);
}

.woocommerce #payment #place_order,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background: var(--fm-btn3-bg) !important;
    color: var(--fm-btn3-text) !important;
    padding: 13px 26px !important;
    border-radius: var(--fm-radius-sm) !important;
    font-family: inherit !important;
    font-size: 14.5px !important;
    font-weight: var(--fm-fw-bold) !important;
    border: none !important;
    transition: background-color 0.2s ease;
}

.woocommerce #payment #place_order:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background: var(--fm-btn3-hover) !important;
    color: var(--fm-btn3-text) !important;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: var(--fm-btn2-bg) !important;
    color: var(--fm-btn2-text) !important;
    border: 1px solid var(--fm-btn2-border) !important;
    padding: 8px 16px !important;
    border-radius: var(--fm-radius-sm) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: var(--fm-fw-bold) !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: var(--fm-btn2-hover-bg) !important;
    border-color: var(--fm-btn2-hover-bg) !important;
    color: var(--fm-btn2-hover-text) !important;
}

.woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 24px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.woocommerce-MyAccount-navigation ul li a {
    display: inline-block;
    padding: 8px 16px;
    background: var(--fm-btn2-bg);
    border: 1px solid var(--fm-btn2-border);
    border-radius: var(--fm-radius-sm);
    font-weight: var(--fm-fw-bold);
    color: var(--fm-btn2-text);
    font-size: 13px;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    border-color: var(--fm-btn1-bg);
}

.woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}

/* Mobile Sticky Purchase Bar */
.fm-mobile-buybar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: var(--fm-surface);
    border-top: 1px solid var(--fm-border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 1050;
}

@media (min-width: 992px) {
    .fm-mobile-buybar {
        display: none;
    }
}

/* Pagination */
.fm-pagination,
.woocommerce-pagination {
    margin-top: 32px;
    text-align: center;
    width: 100%;
}

.fm-pagination .nav-links,
.woocommerce-pagination ul.page-numbers {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    list-style: none;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--fm-radius-sm);
    background: var(--fm-btn2-bg);
    border: 1px solid var(--fm-btn2-border);
    color: var(--fm-btn2-text);
    font-weight: var(--fm-fw-bold);
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    border-color: var(--fm-btn1-bg);
}

/* Footer */
.fm-footer {
    background: var(--fm-dark);
    color: #cbd5e1;
    padding: 48px 0 24px;
    margin-top: 64px;
    width: 100%;
}

.fm-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 32px;
}

@media (min-width: 576px) {
    .fm-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .fm-footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
    }
}

.fm-footer-title {
    color: #fff;
    font-size: 15px;
    font-weight: var(--fm-fw-bold);
    margin-bottom: 14px;
}

.fm-footer-links {
    list-style: none;
}

.fm-footer-links li {
    margin-bottom: 8px;
}

.fm-footer-links a {
    color: #94a3b8;
    font-size: 13.5px;
}

.fm-footer-links a:hover {
    color: #fff;
}

.fm-trust-slot {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--fm-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    text-align: center;
}

.fm-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    text-align: center;
    font-size: 12.5px;
    color: #64748b;
}


/* ==========================================================================
   نسخه ۲.۸: تصویر شاخص بزرگ صفحه محصول، ترتیب موبایل، نوار چسبان هوشمند و طراحی مدرن سبد خرید و تسویه‌حساب
   ========================================================================== */

/* چیدمان شبکه‌ای صفحه محصول با grid-template-areas:
   در موبایل: هدر و توضیحات کوتاه -> باکس خرید و دانلود -> توضیحات کامل
   در دسکتاپ: ستون راست (هدر + توضیحات کامل) و ستون چپ چسبان (باکس خرید) */
.fm-single-product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "hero"
        "sidebar"
        "details";
    gap: 20px;
    margin-bottom: 48px;
    align-items: start;
    width: 100%;
}

@media (min-width: 992px) {
    .fm-single-product-grid {
        grid-template-columns: minmax(0, 1fr) 370px;
        grid-template-areas:
            "hero sidebar"
            "details sidebar";
        gap: 26px;
    }
}

.fm-area-hero { grid-area: hero; }
.fm-area-sidebar { grid-area: sidebar; }
.fm-area-details { grid-area: details; }

@media (max-width: 991px) {
    .fm-product-sidebar {
        position: static;
    }
    .fm-hide-mobile-card {
        display: none;
    }
}

/* تصویر شاخص بزرگ و کاملاً واضح بدون برش جزئیات */
.fm-product-cover-large {
    position: relative;
    width: 100%;
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    overflow: hidden;
    margin: 16px 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-product-cover-large.is-zoomable {
    cursor: zoom-in;
}

.fm-product-cover-large img {
    width: 100% !important;
    height: auto !important;
    max-height: 640px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.25s ease;
}

.fm-product-cover-large.is-zoomable:hover img {
    transform: scale(1.015);
}

.fm-zoom-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 11.5px;
    font-weight: var(--fm-fw-medium);
    padding: 5px 12px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* پنجره بزرگ‌نمایی تمام‌صفحه تصویر محصول */
.fm-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fm-lightbox.is-open {
    display: flex;
}

.fm-lightbox img {
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: var(--fm-radius-sm);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.fm-lightbox-close {
    position: absolute;
    top: 18px;
    left: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* نوار خرید چسبان هوشمند موبایل (با اسکرول روی توضیحات بلند ظاهر می‌شود) */
.fm-mobile-buybar.is-smart-sticky {
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.14);
    padding: 12px 16px;
}

.fm-mobile-buybar.is-smart-sticky.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.fm-mobile-buybar-price {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fm-mbar-label {
    font-size: 11px;
    color: var(--fm-muted);
}

.fm-mbar-val {
    font-size: 15px;
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-accent);
    white-space: nowrap;
}

.fm-mbar-btn {
    width: auto !important;
    padding: 11px 20px !important;
    font-size: 13.5px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   نوار مراحل خرید (Stepper) و نوار دکمه سریع بالای سبد خرید و تسویه‌حساب
   ========================================================================== */
.fm-checkout-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 14px 16px;
    margin-bottom: 18px;
    gap: 8px;
    width: 100%;
}

.fm-step-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.fm-step-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fm-muted);
    font-size: 13px;
    font-weight: var(--fm-fw-medium);
}

.fm-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fm-surface);
    border: 1.5px solid var(--fm-border-strong);
    color: var(--fm-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: var(--fm-fw-bold);
    flex-shrink: 0;
}

.fm-step-item.is-active .fm-step-inner {
    color: var(--fm-dark);
    font-weight: var(--fm-fw-bold);
}

.fm-step-item.is-active .fm-step-num {
    background: var(--fm-btn1-bg);
    border-color: var(--fm-btn1-bg);
    color: var(--fm-btn1-text);
    box-shadow: 0 0 0 4px var(--fm-btn2-bg);
}

.fm-step-item.is-done .fm-step-inner {
    color: var(--fm-accent);
    font-weight: var(--fm-fw-bold);
}

.fm-step-item.is-done .fm-step-num {
    background: var(--fm-accent);
    border-color: var(--fm-accent);
    color: #fff;
}

.fm-step-divider {
    flex: 1;
    height: 2px;
    background: var(--fm-border);
    min-width: 16px;
}

.fm-step-divider.is-done {
    background: var(--fm-accent);
}

@media (max-width: 640px) {
    .fm-checkout-stepper {
        padding: 12px 10px;
    }
    .fm-step-inner {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        font-size: 11px;
    }
    .fm-step-label {
        max-width: 88px;
        line-height: 1.35;
    }
}

/* نوار دکمه سریع بالای سبد خرید و تسویه‌حساب (مخصوص دسترسی فوری در موبایل بدون اسکرول) */
.fm-top-action-bar {
    background: var(--fm-surface);
    border: 1.5px solid var(--fm-btn2-border);
    border-right: 4px solid var(--fm-btn3-bg);
    border-radius: var(--fm-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--fm-shadow-sm);
}

.fm-top-action-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-top-action-kicker {
    font-size: 12px;
    color: var(--fm-muted);
    font-weight: var(--fm-fw-medium);
}

.fm-top-action-total {
    font-size: 16px;
    font-weight: var(--fm-fw-heavy);
    color: var(--fm-dark);
}

.fm-top-action-total .woocommerce-Price-amount {
    color: var(--fm-accent);
}

.fm-top-action-btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.fm-top-cta-btn {
    width: auto !important;
    padding: 11px 22px !important;
    font-size: 14px !important;
}

@media (max-width: 640px) {
    .fm-top-action-bar {
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
    }
    .fm-top-action-btns {
        flex-direction: column;
        width: 100%;
    }
    .fm-top-action-btns .fm-top-cta-btn,
    .fm-top-action-btns .fm-action-btn {
        width: 100% !important;
        justify-content: center;
        text-align: center;
    }
}

/* ==========================================================================
   طراحی گرافیکی مدرن صفحه سبد خرید و تسویه‌حساب (دسکتاپ ۲ ستونه + کارت موبایل)
   ========================================================================== */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    width: 100%;
}

.woocommerce-cart .cart-collaterals {
    width: 100% !important;
    margin-top: 24px;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    float: none !important;
    width: 100% !important;
    max-width: 520px;
    margin-right: auto;
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 20px 22px;
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
    font-size: 16px;
    font-weight: var(--fm-fw-bold);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fm-border);
}

.woocommerce-cart .wc-proceed-to-checkout {
    margin-top: 16px;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* جدول سبد خرید به صورت کارت تمیز در موبایل */
@media (max-width: 768px) {
    .woocommerce table.shop_table_responsive thead {
        display: none !important;
    }
    .woocommerce table.shop_table_responsive tr.cart_item {
        display: block;
        background: var(--fm-bg);
        border: 1px solid var(--fm-border);
        border-radius: var(--fm-radius);
        padding: 12px 14px;
        margin-bottom: 14px;
    }
    .woocommerce table.shop_table_responsive tr.cart_item td {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0 !important;
        border-bottom: 1px dashed var(--fm-border) !important;
        text-align: left !important;
    }
    .woocommerce table.shop_table_responsive tr.cart_item td:last-child {
        border-bottom: none !important;
    }
    .woocommerce table.shop_table_responsive tr.cart_item td::before {
        content: attr(data-title);
        font-weight: var(--fm-fw-bold);
        color: var(--fm-muted);
        font-size: 12.5px;
        margin-left: 12px;
    }
    .woocommerce table.shop_table_responsive td.product-thumbnail {
        display: none !important;
    }
    .woocommerce table.shop_table_responsive td.actions .coupon {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .woocommerce table.shop_table_responsive td.actions .coupon input,
    .woocommerce table.shop_table_responsive td.actions button {
        width: 100% !important;
    }
}

/* چیدمان ۲ ستونه شکیل صفحه تسویه‌حساب در دسکتاپ و یکپارچه در موبایل */
.woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

@media (min-width: 992px) {
    .woocommerce-checkout form.checkout {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        gap: 28px;
    }
    .woocommerce-checkout form.checkout .woocommerce-NoticeGroup-checkout {
        grid-column: 1 / -1;
    }
}

.woocommerce-checkout #customer_details {
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 22px;
    display: block !important;
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    float: none !important;
}

.woocommerce-checkout #customer_details h3,
.woocommerce-checkout #order_review_heading {
    font-size: 16.5px;
    font-weight: var(--fm-fw-bold);
    color: var(--fm-dark);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fm-border);
}

.woocommerce-checkout #order_review {
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    padding: 22px;
}

.woocommerce-checkout #payment {
    background: var(--fm-surface) !important;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm) !important;
    padding: 16px;
    margin-top: 16px;
}

.woocommerce-checkout #payment ul.payment_methods {
    list-style: none !important;
    padding: 0 0 14px !important;
    margin: 0 0 14px !important;
    border-bottom: 1px solid var(--fm-border) !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
    background: var(--fm-bg);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.woocommerce-checkout #payment div.payment_box {
    background: var(--fm-surface) !important;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    padding: 10px 12px !important;
    margin-top: 10px !important;
    font-size: 13px;
    color: var(--fm-muted);
}

.woocommerce-checkout #payment div.payment_box::before {
    display: none !important;
}

.woocommerce-checkout #payment .place-order {
    padding: 0 !important;
}

.woocommerce-checkout #payment #place_order {
    width: 100% !important;
    float: none !important;
    padding: 15px 24px !important;
    font-size: 15.5px !important;
}

/* باکس دانلود فایل در صفحه رسید نهایی سفارش */
.woocommerce-order-downloads {
    background: var(--fm-accent-light);
    border: 1.5px solid var(--fm-accent);
    border-radius: var(--fm-radius);
    padding: 20px;
    margin: 20px 0;
}

.woocommerce-order-downloads h2 {
    color: var(--fm-accent);
    font-size: 17px;
    margin-bottom: 14px;
}

/* سازگاری با بلوک‌های جدید ووکامرس در صورت استفاده */
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button {
    background: var(--fm-btn3-bg) !important;
    color: var(--fm-btn3-text) !important;
    border-radius: var(--fm-radius-sm) !important;
    font-family: inherit !important;
    font-weight: var(--fm-fw-bold) !important;
}


/* ==========================================================================
   نسخه ۲.۹: استایل ناحیه ابزارک‌های پابرگ، کادر شرایط دانلود و بهبود نوار چسبان موبایل
   ========================================================================== */
.fm-footer {
    background: var(--fm-footer-bg, var(--fm-dark));
    color: var(--fm-footer-text, #cbd5e1);
}

.fm-footer-desc,
.fm-footer-widget,
.fm-footer-widget p,
.fm-footer-terms-content,
.fm-footer-terms-content p {
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--fm-footer-text, #cbd5e1);
}

.fm-footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fm-footer-widget ul li {
    margin-bottom: 8px;
}

.fm-footer-widget a {
    color: var(--fm-footer-text, #cbd5e1);
}

.fm-footer-widget a:hover {
    color: #ffffff;
}

.fm-footer-top-area {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fm-footer-wide-widget {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 4px solid var(--fm-btn1-bg, #1e40af);
    border-radius: var(--fm-radius);
    padding: 18px 22px;
}

.fm-footer-wide-widget .fm-footer-title {
    margin-bottom: 10px;
}

.fm-footer-terms-content p:last-child {
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .fm-footer-grid.fm-footer-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .fm-footer-grid.fm-footer-cols-3 {
        grid-template-columns: 1.3fr 1fr 1fr;
    }
    .fm-footer-grid.fm-footer-cols-4 {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
    }
}

.fm-mobile-buybar.is-smart-sticky {
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 9990 !important;
    background: var(--fm-surface);
    border-top: 1.5px solid var(--fm-border-strong);
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}


/* ==========================================================================
   نسخه ۲.۹.۱: رفع قطعی نوار خرید چسبان موبایل (نمایش پیش‌فرض مقاوم در برابر پرفمترز)
   ========================================================================== */
.fm-mobile-buybar {
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99990 !important;
    background: var(--fm-surface) !important;
    border-top: 1.5px solid var(--fm-border-strong) !important;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.14) !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: transform 0.25s ease, opacity 0.22s ease !important;
}

.fm-mobile-buybar.fm-mbar-hidden {
    transform: translateY(115%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (min-width: 992px) {
    .fm-mobile-buybar {
        display: none !important;
    }
}
