/*
Theme Name: قالب اختصاصی کپی‌فای (Copify Theme)
Theme URI: https://copify.ir
Author: توسعه دهنده اختصاصی کپی فای
Description: استایل نهایی و یکپارچه قالب کپی فای، کاملاً بهینه‌سازی شده برای سئو، پرفورمنس و دسترسی‌پذیری رنگ‌ها (WCAG AA)
Version: 1.0.0
Text Domain: copify
*/

/* =========================================
   معرفی فونت‌های اختصاصی
========================================= */
@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb.woff2') format('woff2'),
         url('fonts/IRANSansWeb.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_FaNum__Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_FaNum__UltraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_FaNum__Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_FaNum__Bold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IranYekan';
    src: url('fonts/iranyekanwebregular.woff2') format('woff2'),
         url('fonts/iranyekanwebregular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   متغیرها و تنظیمات پایه بر اساس پالت کپی‌فای
========================================= */
:root { 
    --primary-color: #3e00eb;       /* رنگ اصلی بنفش/آبی کپی‌فای */
    --primary-gradient: #5900eb;   /* گرادیانت کپی‌فای */
    --accent-color: #c60310;        /* قرمز اکست کپی‌فای */
    --attention-color: #ffb804;     /* زرد/نارنجی توجه کپی‌فای */
    --brand-red: #c60310;           /* یکسان‌سازی قرمز */
    --bg-color: #f8fafc;            /* پس‌زمینه روشن و تمیز */
    --card-bg: #fffeff;             /* سفید کپی‌فای */
    --text-main: #2d2e32;           /* متن اصلی با کنتراست تیره WCAG AA */
    --text-muted: #57595e;          /* متن فرعی خوانا روی سفید */
    --text-light: #aeafb3;          /* متن کم‌رنگ فقط روی پس‌زمینه‌های تیره */

    /* نام‌های مستعار برند کپی‌فای (استفاده‌شده در هدر/فوتر/تب‌ها) */
    --copify-primary: #3e00eb;
    --copify-primary-gradient: #5900eb;
    --copify-action: #c60310;
    --copify-warning: #ffb804;
    --copify-text-muted: #aeafb3; /* فقط روی پس‌زمینه‌های تیره استفاده شود (طبق WCAG AA) */
    --copify-text-secondary: #57595e; /* برای متن فرعی روی پس‌زمینه سفید، کنتراست کافی دارد */
    --copify-white: #fffeff;
    --copify-text-dark: #2d3748;
    --copify-bg-light: #f8fafc;

    /* متغیرهای «حالت مطالعه» (Reading Mode) — قبلاً به‌اشتباه بیرون از هر
       بلوک انتخاب‌گری (حتی :root) نوشته شده بودند و چون CSS نامعتبر محسوب
       می‌شدند، مرورگر آن‌ها را کاملاً نادیده می‌گرفت و کل تایپوگرافی
       .post-body-content / .post-toc بدون مقدار واقعی رندر می‌شد. اکنون
       داخل :root تعریف شده‌اند تا هر تمپلیتی (نه فقط تک‌نوشته) بتواند از
       این تایپوگرافی آماده استفاده کند (اصل DRY). */
    --read-bg: var(--copify-bg-light);
    --read-surface: #ffffff;
    --read-text: #262a33;
    --read-text-secondary: #6b7280;
    --read-border: #e6e9ee;
    --read-accent: var(--copify-primary);
    --read-accent-soft: rgba(62, 0, 235, 0.07);
    --read-red-soft-bg: #fdecec;
    --read-red-soft-text: #b3121f;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    font-family: 'IRANSans', 'IranYekan', Tahoma, sans-serif; 
    background-color: #f4f6f9; /* خاکستری استاندارد و ملایم، هماهنگ با var(--bg-color) */
    color: var(--text-main); 
    display: flex; 
    justify-content: center; 
    direction: rtl; 
}

/* =========================================
   قانون کلی: اجبار فونت فارسی روی تمام عناصر عددی/متنی سایت
   -----------------------------------------
   مرورگرها به‌صورت پیش‌فرض فونت خانواده body را روی ورودی‌ها (input)،
   select، textarea، دکمه‌ها و تگ <bdi> (که ووکامرس همیشه دور اعداد
   قیمت می‌پیچد) اعمال نمی‌کنند و از فونت رابط کاربری سیستم‌عامل استفاده
   می‌کنند. همین یک قانون، مشکل نمایش اعداد با فونت اشتباه را برای همیشه
   و در سراسر سایت (فرم‌ها، فیلدهای عددی، قیمت‌ها، شماره تماس و ...)
   حل می‌کند؛ بدون نیاز به تعریف قانون جداگانه برای هر کلاس.
========================================= */
html,
body,
input,
select,
textarea,
button,
bdi {
    font-family: 'IRANSans', 'IranYekan', Tahoma, sans-serif;
}

/* رفع قطعی باگ اج‌تو‌اج نبودن هدر/فوتر: چون body به‌صورت flex + justify-content:center
   است، بدون این قانون، کانتینر اصلی صفحه (#page) ممکن است به‌جای گرفتن کل عرض ویوپورت،
   بر اساس محتوای داخلی خود جمع (shrink) و در وسط صفحه قرار بگیرد؛ با width:100% این
   ریسک برای همیشه از بین می‌رود و #page همیشه دقیقاً به اندازه صفحه پهن می‌ماند. */
#page.site {
    width: 100%;
}

a { 
    text-decoration: none; 
}

/* جلوگیری قطعی از اسکرول افقی ناخواسته (که باعث می‌شود هدر/فوتر اج‌تو‌اج به نظر نرسند)
   نکته مهم: overflow-x:hidden فقط روی <html> گذاشته می‌شود، نه <body>.
   قرار دادن overflow-x:hidden روی خود <body> یک باگ شناخته‌شده در کروم/مرورگرهای
   مبتنی بر Chromium دارد که باعث می‌شود position:sticky برای تمام فرزندان داخل
   body (از جمله هدر چسبان سایت) کاملاً از کار بیفتد. با نگه‌داشتن این قانون
   فقط روی <html>، همان جلوگیری از اسکرول افقی حفظ می‌شود بدون این‌که رفتار
   sticky بودن هدر خراب شود. */
html {
    max-width: 100%;
    overflow-x: hidden;
}
body {
    max-width: 100%;
}
img, iframe, video, table {
    max-width: 100%;
}

/* =========================================
   دسترسی‌پذیری (Accessibility)
========================================= */
.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;
    word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
    background: #fff;
    color: var(--primary-color);
    clip: auto !important;
    clip-path: none;
    display: block;
    height: auto;
    width: auto;
    left: 10px;
    top: 10px;
    font-size: 13px;
    font-weight: 800;
    padding: 12px 18px;
    border-radius: 10px;
    z-index: 999999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-decoration: none;
}

/* حالت فوکوس قابل مشاهده برای ناوبری با کیبورد (WCAG) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.mobile-app-container { 
    width: 100%; 
    max-width: 420px; 
    background-color: var(--bg-color); 
    min-height: 100vh; 
    position: relative; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); 
    padding-bottom: 80px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
}

/* =========================================
   انیمیشن‌ها
========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeInUp 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; opacity: 0; }

/* =========================================
   سربرگ (Header)
   نکته: استایل‌های واقعی هدر (site-header, cart-icon-wrapper,
   cart-count, site-logo-img و ...) در بخش «ساختار کلی هدر»
   در انتهای این فایل تعریف شده‌اند و منبع واحد صحت (Single
   Source of Truth) هستند. کلاس‌های .header-top / .logo /
   .search-box / .desktop-main-menu مربوط به نسخه اولیه و
   منسوخ قالب بودند و چون در header.php فعلی استفاده نمی‌شوند
   و با نام‌های تکراری (site-logo-img و ...) باعث تداخل و
   بی‌اثر شدن استایل‌های جدید هدر (مثل سایز لوگو) می‌شدند،
   برای جلوگیری از باگ عمداً حذف شدند.
========================================= */

/* =========================================
   دسته‌بندی‌ها
========================================= */
.categories-section { padding: 0 0 20px 0; background: transparent; margin-bottom: 10px; }
.categories-scroll { display: flex; overflow-x: auto; padding: 0 20px; gap: 15px; scroll-behavior: smooth; }
.categories-scroll::-webkit-scrollbar { display: none; }
.category-item { display: flex; flex-direction: column; align-items: center; min-width: 65px; transition: transform 0.3s;}
.category-item:hover { transform: translateY(-3px); }
.icon-circle { width: 60px; height: 60px; background-color: #fff; border-radius: 18px; display: flex; justify-content: center; align-items: center; font-size: 26px; margin-bottom: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid #f1f5f9;}
.category-item span { font-size: 11px; color: var(--text-muted); font-weight: 700; text-align: center; line-height: 1.4;}


/* =========================================
   نوار متحرک برندها
========================================= */
.brands-section { padding: 20px 0; background-color: #eef2f6; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; margin-bottom: 25px; }
.brands-marquee-container { width: 100%; overflow: hidden; direction: ltr; }
.brands-track { display: flex; width: max-content; animation: scrollBrands 35s linear infinite; }
.brands-track:hover { animation-play-state: paused; }
.brands-group { display: flex; gap: 15px; padding-right: 15px; }
@keyframes scrollBrands { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.brand-item { background: #fff; border-radius: 12px; padding: 10px 25px; font-weight: 800; color: var(--text-muted); font-size: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.02); border: 1px solid #f1f5f9; transition: all 0.3s; cursor: pointer; min-width: max-content; }
.brand-item:hover { color: var(--primary-color); border-color: var(--primary-color); transform: translateY(-3px);}

/* =========================================
   ویترین محصولات
========================================= */
.products-container { padding: 10px 20px 20px; flex: 1;}
.section-title { font-size: 16px; font-weight: 800; margin-bottom: 15px; color: var(--primary-color); }
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

/* محتوای صفحات ثابت (page.php) */
.page-content-flat { background: transparent; padding: 0 15px; margin: 0; color: var(--text-main); font-size: 14px; line-height: 2; }
.page-content-flat p { margin-bottom: 15px; }
.page-content-flat img { max-width: 100%; height: auto; border-radius: 12px; }

.product-card { background-color: var(--card-bg); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; }
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(62,0,235,0.08); border-color: var(--primary-color); z-index: 10; }
.product-image { width: 100%; height: 200px; border-radius: 12px; margin-bottom: 12px; background-color: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 5px;}
.product-image img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.5s ease; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-title { font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; line-height: 1.6; height: 38px; overflow: hidden; }
.product-title a { color: inherit; }
.product-price-box { margin-top: auto; margin-bottom: 12px; min-height: 40px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; }
.product-price { font-size: 14px; font-weight: 800; color: var(--primary-color); }
.add-to-cart-btn { background-color: var(--primary-color) !important; color: #fff !important; border: none; padding: 10px 15px; border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer; width: 100%; font-family: inherit; text-align: center; display: block; transition: all 0.3s; margin-top: 12px; }
.product-card:hover .add-to-cart-btn { background-color: var(--primary-gradient) !important; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(62, 0, 235, 0.2); }

/* =========================================
   نوار ویژگی‌های اعتماد (Trust Badges)
========================================= */
.trust-features-wrapper { background-color: #eef2f6; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; width: 100%; margin-top: 30px; }
.trust-features-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 30px 20px; }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;}
.trust-icon { font-size: 28px; background: #ffffff; width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--primary-color); box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid #e2e8f0;}
.trust-text { font-size: 11px; font-weight: 800; color: var(--text-main);}

/* =========================================
   پاورقی (Footer) — تایپوگرافی ریز و ساده،
   هماهنگ با بخش‌های copify-guarantee-strip و
   site-trust-band (بدون تیتر درشت/خط زیر ضخیم)
========================================= */
.site-footer { background-color: #ffffff; padding: 30px 0 20px;}
.footer-widgets { display: grid; grid-template-columns: 1fr; gap: 25px; margin-bottom: 20px; }
.footer-widget h4 {
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 12px;
    border-bottom: none;
    display: block;
    padding-bottom: 0;
    letter-spacing: 0.2px;
}
.footer-widget p { font-size: 11.5px; color: var(--text-muted); line-height: 1.9; margin-bottom: 5px;}
.links-widget ul { list-style: none; }
.links-widget ul li { margin-bottom: 8px; }
.links-widget ul li a { color: var(--text-muted); font-size: 11.5px; font-weight: 400; transition: color 0.2s; }
.links-widget ul li a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; border-top: 1px solid #e2e8f0; padding-top: 15px; font-size: 10.5px; color: #94a3b8; font-weight: 400; }

/* =========================================
   نوار ناوبری پایین (موبایل)
========================================= */
.bottom-nav { position: fixed; bottom: 0; width: 100%; max-width: 420px; background-color: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); border-top: 1px solid #f1f5f9; display: flex; justify-content: space-around; padding: 12px 0; z-index: 1000; border-radius: 20px 20px 0 0; }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); transition: color 0.3s;}
.nav-item.active, .nav-item:hover { color: var(--primary-color); }
.nav-icon { font-size: 22px; margin-bottom: 4px; transition: transform 0.3s;}
.nav-item:hover .nav-icon { transform: translateY(-3px); }
.nav-text { font-size: 10px; font-weight: 700; }

/* =========================================
   صفحه تکی محصول (Single Product)
========================================= */
.single-product-page { background: #fff; padding-bottom: 100px; }

/* بردکرامب اختصاصی صفحه محصول: کلاسی کاملاً مستقل و بدون هیچ اشتراکی با
   کلاس‌های دیگر (مثل .shop-page-header .breadcrumb-container در فروشگاه)
   تا هیچ‌وقت دچار بازنویسی یا تداخل ناخواسته نشود. */
.single-product-breadcrumb {
    padding: 14px 4% 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.single-product-breadcrumb a { color: var(--primary-color); text-decoration: none; transition: color 0.3s; }
.single-product-breadcrumb a:hover { color: var(--primary-color); }
.single-product-breadcrumb nav { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

.breadcrumb-container { padding: 15px 20px 10px; font-size: 12px; color: var(--text-muted); }
.breadcrumb-container a { color: var(--primary-color); text-decoration: none; transition: color 0.3s; }
.breadcrumb-container a:hover { color: var(--primary-color); }
.breadcrumb-container nav { display: flex; flex-wrap: wrap; gap: 5px; align-items: center;}

.single-product-wrapper { display: block; width: 100%; }
.product-top-container { display: block; }

/* گالری استاندارد ووکامرس */
.product-gallery-section { width: 100%; background: #ffffff; padding: 0 !important; margin: 0; text-align: center; border-bottom: 1px solid #f1f5f9; position: relative; }
.woocommerce-product-gallery { width: 100%; position: relative; opacity: 1 !important;}
.woocommerce-product-gallery figure { margin: 0; padding: 0; }
.woocommerce-product-gallery__image img { width: 100%; height: auto; display: block; border-radius: 0; margin: 0 auto; object-fit: contain; }

.woocommerce-product-gallery .flex-control-thumbs { display: flex; gap: 10px; padding: 15px; margin: 0; list-style: none; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;}
.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar { display: none; }
.woocommerce-product-gallery .flex-control-thumbs li { width: 65px; flex-shrink: 0; cursor: pointer; }
.woocommerce-product-gallery .flex-control-thumbs li img { width: 100%; height: auto; border-radius: 8px; border: 2px solid transparent; opacity: 0.6; transition: all 0.3s ease;}
.woocommerce-product-gallery .flex-control-thumbs li img:hover,
.woocommerce-product-gallery .flex-control-thumbs li img.flex-active { border-color: var(--primary-color); opacity: 1; transform: translateY(-2px); }

.woocommerce-product-gallery__trigger { position: absolute; top: 15px; right: 15px; z-index: 10; background: #fff; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); text-indent: -9999px; text-decoration: none;}
.woocommerce-product-gallery__trigger::before { content: '🔍'; display: block; text-indent: 0; font-size: 16px; }

.product-details-section { padding: 25px 20px 10px 20px; }
.single-product-title { font-size: 18px; font-weight: 800; color: var(--primary-color); margin-bottom: 12px; line-height: 1.6; }
.single-product-price { font-size: 22px; font-weight: 800; color: var(--brand-red); margin-bottom: 15px; }
.product-short-description { font-size: 13px; color: var(--text-muted); line-height: 2; margin-bottom: 20px; padding: 15px; background: #f8fafc; border-radius: 12px; text-align: justify; }

.product-key-features { margin: 20px 0; padding: 15px; background: #f8fafc; border-radius: 12px; border: 1px solid #f1f5f9; }
.clean-features-list { list-style: none; padding: 0; margin: 0; }
.clean-features-list li { font-size: 13px; color: var(--text-main); margin-bottom: 8px; display: flex; align-items: center; }
.clean-features-list li:last-child { margin-bottom: 0; }
.feat-icon { font-size: 12px; margin-left: 8px; color: #10b981; }

.product-meta-minimal { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #e2e8f0; font-size: 12px; color: var(--text-muted); line-height: 2;}
.product-meta-minimal a { color: var(--primary-color); font-weight: 700; transition: 0.3s;}
.product-meta-minimal a:hover { color: var(--primary-gradient); }
.product-meta-minimal span { display: block; margin-bottom: 5px; }

.product-main-description { padding: 20px; background: #fff; border-top: 1px solid #f1f5f9; }
.desc-title { font-size: 16px; color: var(--primary-color); margin-bottom: 15px; font-weight: 800; display: inline-block; border-bottom: 3px solid var(--primary-color); padding-bottom: 5px; }
.desc-content p, .desc-content { font-size: 14px; line-height: 2; color: var(--text-main); text-align: justify; }

/* =========================================
   صفحه فروشگاه (Shop Archive)
========================================= */
.shop-page-header { background: #fff; padding-bottom: 15px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.shop-title-row { display: flex; align-items: baseline; justify-content: space-between; padding: 5px 20px 0; gap: 10px; }
.shop-title { font-size: 19px; font-weight: 800; color: var(--primary-color); }
.shop-result-count { font-size: 12px; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
.shop-archive-description { padding: 10px 20px 0; font-size: 13px; color: var(--text-muted); line-height: 1.9; }

.shop-subcats-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 15px 20px 0; scrollbar-width: none; }
.shop-subcats-scroll::-webkit-scrollbar { display: none; }
.shop-subcat-chip { flex-shrink: 0; background: #f1f5f9; color: var(--text-main); font-size: 12px; font-weight: 700; padding: 8px 16px; border-radius: 20px; white-space: nowrap; transition: all 0.25s; }
.shop-subcat-chip:hover { background: var(--primary-color); color: #fff; }

.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 20px 0; }
.shop-ordering select { appearance: none; -webkit-appearance: none; background: #f1f5f9 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') no-repeat left 12px center; border: none; border-radius: 10px; padding: 10px 35px 10px 15px; font-size: 12px; font-weight: 700; color: var(--text-main); font-family: inherit; cursor: pointer; }
.shop-clear-filters { font-size: 12px; color: var(--brand-red); font-weight: 700; white-space: nowrap; }

.sale-badge { position: absolute; top: 10px; left: 10px; z-index: 5; background: var(--brand-red); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; }
.stock-badge { position: absolute; top: 10px; left: 10px; z-index: 5; background: #64748b; color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; }
.disabled-btn { background-color: #e2e8f0 !important; color: var(--text-muted) !important; }

.shop-pagination { display: flex; justify-content: center; padding: 10px 20px 30px; }
.shop-pagination .page-numbers { display: flex; list-style: none; gap: 8px; flex-wrap: wrap; justify-content: center; }
.shop-pagination .page-numbers li { display: flex; }
.shop-pagination .page-numbers a, .shop-pagination .page-numbers span { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--text-main); font-size: 13px; font-weight: 700; border: 1px solid #f1f5f9; transition: all 0.25s; }
.shop-pagination .page-numbers a:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.shop-pagination .page-numbers .current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.shop-empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; background: #fff; border-radius: 16px; margin: 0 20px; }
.shop-empty-state .empty-icon { font-size: 42px; margin-bottom: 15px; }
.shop-empty-state p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.shop-empty-state .empty-cta { display: inline-block; background: var(--primary-color); color: #fff; font-size: 13px; font-weight: 700; padding: 12px 25px; border-radius: 12px; }

/* =========================================
   محصولات مرتبط
========================================= */
.related-products-section { padding: 20px; background: #fff; border-top: 1px solid #f1f5f9; margin-bottom: 30px;}
.related-products-section h2 { font-size: 16px; color: var(--primary-color); margin-bottom: 15px; font-weight: 800; }
.related-products-section ul.products { list-style: none !important; display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; padding: 0 !important; margin: 0 !important; }
.related-products-section ul.products li.product { width: 100% !important; max-width: 100% !important; float: none !important; margin: 0 !important; clear: none !important; background-color: var(--card-bg); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; }
.related-products-section ul.products li.product:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(62,0,235,0.08); border-color: var(--primary-color); z-index: 10; }
.related-products-section ul.products li.product img { width: 100%; height: 200px; border-radius: 12px; margin-bottom: 12px; background-color: #fff; object-fit: contain; padding: 5px; transition: transform 0.5s ease; }
.related-products-section ul.products li.product:hover img { transform: scale(1.05); }
.related-products-section ul.products li.product .woocommerce-loop-product__title { font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; line-height: 1.6; height: 38px; overflow: hidden; text-align: right;}
.related-products-section ul.products li.product .price { font-size: 13px; font-weight: 800; color: var(--primary-color); margin-top: auto; margin-bottom: 12px; display: block; text-align: right; white-space: nowrap;}
.related-products-section ul.products li.product .button { background-color: #f1f5f9; color: var(--primary-color); border: none; padding: 8px 5px; border-radius: 10px; font-size: 11px; font-weight: 700; width: 100%; display: block; text-align: center; transition: all 0.3s; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-products-section ul.products li.product:hover .button { background: var(--primary-color); color: #fff; }

/* =========================================
   سبد خرید دسکتاپ و چسبان موبایل
========================================= */
/* فرم افزودن به سبد خرید: در موبایل و دسکتاپ همیشه قابل مشاهده و کنار قیمت است (نوار چسبان حذف شد) */
.product-cart-form { display: block; width: 100%; }

.product-cart-form form.cart {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

/* حذف بصری انتخاب تعداد: فعلاً همه محصولات به‌صورت تک‌عددی (دانه‌ای)
   فروخته می‌شوند و نیازی به این فیلد نیست. اینپوت همچنان در DOM باقی
   می‌ماند و با مقدار پیش‌فرض ۱ در فرم ارسال می‌شود، پس منطق افزودن به
   سبد خرید و سازگاری با ووکامرس دست‌نخورده باقی می‌ماند؛ فقط دیگر به
   کاربر نمایش داده نمی‌شود. */
.product-cart-form .quantity {
    display: none;
}

.product-cart-form .quantity input.qty {
    width: 56px;
    height: 46px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    font-family: 'IRANSans', 'IranYekan', Tahoma, sans-serif !important;
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-color);
    background: #ffffff;
    padding: 0;
    transition: border-color 0.3s;
}
.product-cart-form .quantity input.qty:focus {
    border-color: var(--primary-color);
    outline: none;
}
.product-cart-form .quantity input[type="number"]::-webkit-inner-spin-button,
.product-cart-form .quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.product-cart-form .quantity input[type="number"] {
    -moz-appearance: textfield;
}

.product-cart-form button.single_add_to_cart_button {
    flex: 1;
    width: 100%;
    min-width: 140px;
    height: 48px;
    padding: 0 32px;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(62, 0, 235, 0.25);
    /* هدف لمسی حداقل ۴۴ پیکسل مطابق استاندارد دسترسی‌پذیری (WCAG) */
}
.product-cart-form button.single_add_to_cart_button:hover {
    background-color: var(--primary-gradient) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 0, 235, 0.3);
}
.product-cart-form button.single_add_to_cart_button:disabled {
    background-color: #cbd5e1 !important;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   ووکامرس و پرداخت
========================================= */
.woocommerce { padding: 20px 15px; background: transparent; }
.woocommerce form .form-row { width: 100%; margin-bottom: 15px; }
.woocommerce form .form-row label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea { width: 100%; padding: 14px; border: 2px solid #f1f5f9; border-radius: 12px; font-family: inherit; font-size: 14px; background: #f8fafc; transition: border-color 0.3s; }
.woocommerce form .form-row input.input-text:focus { border-color: var(--primary-color); outline: none; }

/* =========================================
   تنظیمات دسکتاپ (Responsive)
========================================= */
@media (min-width: 768px) {
    .mobile-app-container { max-width: 100%; margin: 0; border-radius: 0; box-shadow: none; background-color: var(--bg-color); }
    .bottom-nav { display: none !important; }

    .categories-section { padding: 30px 5%; max-width: 1400px; margin: 0 auto;}
    .categories-scroll { justify-content: center; flex-wrap: wrap; overflow: visible;}
    
    .brands-section { padding: 30px 0; margin-bottom: 40px;}
    .brands-marquee-container { max-width: 1400px; margin: 0 auto; }
    .brand-item { padding: 15px 35px; font-size: 16px; }

    .products-container { max-width: 1400px; margin: 0 auto; padding: 10px 5% 60px 5%; width: 100%;}
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; gap: 30px; }
    .product-image { height: 320px; padding: 15px;}

    .trust-features-wrapper { margin-top: 50px; }
    .trust-features-bar { max-width: 1400px; margin: 0 auto; grid-template-columns: repeat(4, 1fr); padding: 40px 5%; }
    .trust-icon { width: 70px; height: 70px; font-size: 32px; border-radius: 20px; }
    .trust-text { font-size: 14px; margin-top: 10px; }

    .site-footer { padding: 50px 0 20px; border-radius: 0; }
    .footer-widgets { grid-template-columns: repeat(4, 1fr); gap: 40px; }
    .footer-widget h4 { font-size: 13px; }
    .footer-widget p,
    .links-widget ul li a { font-size: 12px; }

    .single-product-page { display: block; padding: 0; background: var(--bg-color); }
    .single-product-breadcrumb { max-width: 1400px; margin: 20px auto 0 auto; padding: 0 5%; }
    .breadcrumb-container { max-width: 1400px; margin: 20px auto 0 auto; padding: 0 5%; }
    
    .product-top-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; max-width: 1400px; margin: 30px auto; padding: 0 5%; background: transparent; box-shadow: none; border-radius: 0; }
    
    .product-gallery-section { background: #fff; border-radius: 16px; padding: 25px !important; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; display: block;}
    .woocommerce-product-gallery__image { text-align: center; }
    .woocommerce-product-gallery__image img { border-radius: 12px; border: 1px solid #f1f5f9;}
    .woocommerce-product-gallery .flex-control-thumbs { justify-content: center; flex-wrap: wrap; padding-top: 20px; }
    .woocommerce-product-gallery .flex-control-thumbs li { width: 80px; }
    .woocommerce-product-gallery .flex-control-thumbs li img { border: 1px solid #e2e8f0; border-radius: 10px;}
    
    .product-details-section { background: transparent; padding: 0; }
    
    .product-main-description { background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; max-width: 1400px; margin: 0 auto 40px auto; width: 90%; }
    
    .related-products-section { max-width: 1400px; margin: 0 auto 50px auto; padding: 0 5%; background: transparent; border-top: none; }
    .related-products-section h2 { font-size: 20px; margin-bottom: 25px; }
    
    .related-products-section ul.products li.product img { height: 320px; padding: 15px; }
    .related-products-section ul.products li.product .woocommerce-loop-product__title { font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; line-height: 1.6; height: 38px; overflow: hidden; text-align: right;}
    .related-products-section ul.products li.product .price { font-size: 13px; font-weight: 800; color: var(--primary-color); margin-top: auto; margin-bottom: 12px; display: block; text-align: right; white-space: nowrap;}
    .related-products-section ul.products li.product .button { padding: 14px 10px; font-size: 13px; white-space: nowrap; }

    
    .woocommerce { max-width: 1400px; margin: 40px auto; padding: 40px; }

    .shop-page-header { background: transparent; box-shadow: none; padding-bottom: 0; margin-bottom: 0; max-width: 1400px; margin-left: auto; margin-right: auto; }
    .breadcrumb-container { padding-left: 5%; padding-right: 5%; }
    .shop-title-row { padding: 5px 5% 0; align-items: center; }
    .shop-title { font-size: 26px; }
    .shop-archive-description { padding: 10px 5% 0; max-width: 900px; }
    .shop-subcats-scroll { padding: 20px 5% 0; flex-wrap: wrap; overflow: visible; }
    .shop-toolbar { padding: 20px 5% 0; }
    .shop-empty-state { margin: 0; }
}

/* =========================================
   استایل قیمت‌ها مشابه دیجی‌کالا
========================================= */
.product-price-box .product-price,
.single-product-price,
.related-products-section ul.products li.product .price {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end; 
    justify-content: center;
    width: 100%;
    line-height: 1.4;
}

.product-price-box del,
.single-product-price del,
.related-products-section ul.products li.product .price del {
    color: #a1a3a8 !important;
    font-size: 13px !important;
    text-decoration: line-through;
    font-weight: normal;
    margin-bottom: 2px;
    display: block;
    opacity: 0.8;
}

.product-price-box ins,
.product-price-box .product-price > .woocommerce-Price-amount,
.single-product-price ins,
.single-product-price > .woocommerce-Price-amount,
.related-products-section ul.products li.product .price ins,
.related-products-section ul.products li.product .price > .woocommerce-Price-amount {
    color: var(--primary-color) !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: transparent !important;
}

.woocommerce-Price-currencySymbol {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    font-weight: 400;
}

/* =========================================
   بازطراحی دکمه افزودن به سبد خرید
========================================= */
.product-card .add-to-cart-btn {
    background-color: var(--primary-color) !important; 
    color: #ffffff !important;
    border-radius: 8px; 
    font-size: 13px;
    font-weight: 800;
    padding: 10px 15px;
    margin-top: 12px;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    display: block;
}

.product-card .add-to-cart-btn:hover {
    background-color: var(--primary-gradient) !important; 
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(62, 0, 235, 0.2);
}

/* =========================================
   استایل بج درصد تخفیف مشابه دیجی‌کالا
========================================= */
.old-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    gap: 8px; 
    margin-bottom: 2px;
    width: 100%;
}

/* حالت اختصاصی: وقتی این ردیف داخل فرم خرید صفحه تکی محصول، درست بالای
   دکمه «افزودن به سبد خرید» قرار می‌گیرد، به فاصله بیشتری نسبت به حالت
   کارت محصول نیاز دارد تا از دکمه فاصله بگیرد و شلوغ به نظر نرسد */
.product-cart-form .old-price-row {
    margin-bottom: 6px;
}

/* بلوک کامل تخفیف (قیمت اصلی خط‌خورده + بج درصد + قیمت نهایی) که در صفحه
   تکی محصول، بالا و سمت چپ دکمه افزودن به سبد خرید نمایش داده می‌شود */
.single-product-discount-block {
    margin-bottom: 12px;
}
.single-product-discount-block .single-product-price {
    margin-bottom: 0 !important;
}

/* رفع تداخل با قانون کلی دسکتاپ (.product-action-box .single-product-price)
   که align-items:flex-start (یعنی راست، در RTL) روی همین المان هم اعمال
   می‌شد؛ این سلکتور اختصاصی‌تر (۳ کلاس در برابر ۲ کلاس) آن را override
   می‌کند تا قیمت نهایی هم مثل ردیف قیمت اصلی/بج، کاملاً چپ‌چین بماند */
.product-cart-form .single-product-discount-block .single-product-price {
    width: 100% !important;
    align-items: flex-end !important;
}

.dk-discount-badge {
    background-color: var(--brand-red) !important; 
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 0 7px;
    border-radius: 12px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    line-height: 1;
}

/* قیمت قبل از تخفیف داخل ردیف بج: مستقل از کلاس والد (هم در آرشیو فروشگاه
   با .product-price-box و هم در لیست کتاب‌های صفحه اصلی با .copify-book-price-wrap کار می‌کند) */
.old-price-row del {
    color: #a1a3a8;
    font-size: 12px;
    font-weight: 400;
    text-decoration: line-through;
    opacity: 0.85;
    white-space: nowrap;
}

.product-price-box del,
.single-product-price del,
.related-products-section ul.products li.product .price del {
    margin-bottom: 0 !important; 
}

.related-products-section span.onsale {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    margin: 0 !important;
    background: var(--brand-red) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    line-height: 1.4 !important;
    text-align: center;
    z-index: 5;
}

@media (min-width: 768px) {
    /* ... سایر کدهای دسکتاپ ... */
    
    /* تثبیت دقیق ۴ محصول در یک ردیف برای جلوگیری از نامنظم شدن */
    .related-products-section ul.products { 
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 20px !important; 
        width: 100% !important;
    }
    
    /* ... سایر کدهای دسکتاپ ... */
}

/* =========================================
   باکس خرید (Action Box) صفحه محصول
========================================= */
.product-action-box {
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    padding: 20px;
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-action-box .single-product-price {
    margin-bottom: 0 !important;
}

@media (min-width: 768px) {
    .product-action-box {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 25px;
        background: #ffffff;
        box-shadow: 0 5px 25px rgba(0,0,0,0.04);
        border-color: #e2e8f0;
    }

    .product-action-box .single-product-price {
        width: auto !important;
        align-items: flex-start !important;
    }

    .product-action-box .product-cart-form {
        width: auto;
        max-width: 340px;
    }

    /* حالت تخفیف‌دار: چون در این حالت div سمت راست (single-product-price)
       اصلاً چاپ نمی‌شود و فقط product-cart-form باقی می‌ماند، justify-content:
       space-between تنها فرزند باقی‌مانده را در ابتدای محور (که در RTL یعنی
       سمت راست) می‌نشاند و سمت چپ باکس خالی می‌ماند. با تغییر آن به flex-end
       (که در RTL معادل انتهای محور یعنی چپ است)، کل بلوک قیمت+دکمه به سمت
       چپ باکس منتقل می‌شود، دقیقاً هماهنگ با محل قرارگیری خودِ بلوک تخفیف. */
    .product-action-box.has-discount-only {
        justify-content: flex-end;
    }
}

/* =========================================
   استایل‌های اختصاصی باکس جستجوی زنده (Ajax)
========================================= */
.search-box {
    position: relative; 
}

.search-results-ajax {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 10px 30px rgba(36, 45, 60, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 9999;
    overflow: hidden;
    max-height: 420px;
    display: flex;
    flex-direction: column;
}

.ajax-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
    text-align: right;
}

.ajax-search-item:hover {
    background: rgba(62, 0, 235, 0.03); 
}

.ajax-search-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.ajax-search-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ajax-search-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    overflow: hidden;
}

.ajax-search-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ajax-search-price {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-color); 
}
.ajax-search-price del {
    font-size: 10px !important;
    color: #a1a3a8 !important;
    margin-left: 5px;
}
.ajax-search-price ins {
    text-decoration: none;
    color: var(--brand-red) !important; 
}

.search-loading, .ajax-search-no-result {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
}

.search-loading {
    color: var(--primary-color);
}

.ajax-search-view-all {
    background: #f8fafc;
    color: var(--primary-color);
    text-align: center;
    padding: 12px;
    font-size: 12px;
    font-weight: 800;
    border-top: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.ajax-search-view-all:hover {
    background: var(--primary-color);
    color: #ffffff;
}

@media (min-width: 768px) {
    .search-results-ajax {
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    }
    .ajax-search-title {
        font-size: 14px;
    }
}

/* =========================================
   بخش نظرات و دیدگاه‌ها (وبلاگ و ووکامرس)
========================================= */
/* =========================================
   آکاردئون نظرات محصول (طراحی اختصاصی مشابه دیجی‌کالا)
   محل قرارگیری: style.css
========================================= */
.product-reviews-accordion {
    background: var(--copify-white);
    border-radius: 16px;
    margin: 25px 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden; /* ضروری برای انیمیشن کشویی */
    direction: rtl;
}

@media (min-width: 768px) {
    .product-reviews-accordion {
        max-width: 1400px;
        margin: 0 auto 40px auto;
        width: 90%;
    }
}

.reviews-accordion-header {
    padding: 20px;
}

@media (min-width: 768px) {
    .reviews-accordion-header {
        padding: 25px 40px;
    }
}

.reviews-section-title {
    margin: 0 !important;
}

.reviews-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.reviews-toggle-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--copify-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.reviews-count-badge {
    background: var(--copify-action); /* قرمز کپی‌فای */
    color: var(--copify-white);
    font-size: 12px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 12px;
}

/* --- طراحی آیکون + و انیمیشن تبدیل به X --- */
.reviews-toggle-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reviews-toggle-icon::before,
.reviews-toggle-icon::after {
    content: '';
    position: absolute;
    background-color: var(--copify-primary);
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s;
}

.reviews-toggle-icon::before { width: 14px; height: 2px; }
.reviews-toggle-icon::after { width: 2px; height: 14px; }

/* تغییرات هنگام باز شدن (تبدیل پلاس به ضربدر) */
.reviews-toggle-btn[aria-expanded="true"] .reviews-toggle-icon {
    transform: rotate(135deg);
}

.reviews-toggle-btn[aria-expanded="true"] .reviews-toggle-icon::before,
.reviews-toggle-btn[aria-expanded="true"] .reviews-toggle-icon::after {
    background-color: var(--copify-action); /* تغییر رنگ به قرمز در حالت باز */
}

/* --- انیمیشن نرم آکاردئون با قابلیت CSS Grid --- */
.reviews-content-box {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reviews-content-box.is-open {
    grid-template-rows: 1fr;
}

.reviews-content-inner {
    overflow: hidden; /* جلوگیری از پرش محتوا */
    padding: 0 20px;
    border-top: 1px dashed transparent;
    transition: border-color 0.4s ease;
}

@media (min-width: 768px) {
    .reviews-content-inner { padding: 0 40px; }
}

/* فاصله داخلی فقط در حالت باز اعمال می‌شود تا انیمیشن خراب نشود */
.reviews-content-box.is-open .reviews-content-inner {
    padding-bottom: 25px;
    padding-top: 20px;
    border-color: #e2e8f0; /* نمایش خط چین جداکننده */
}

@media (min-width: 768px) {
    .reviews-content-box.is-open .reviews-content-inner {
        padding-bottom: 40px;
    }
}

/* =========================================
   آکاردئون بخش نظرات محصول (صرفه‌جویی در فضای صفحه)
========================================= */
.reviews-section-title {
    margin: 0 !important;
    border-bottom: none !important;
    display: block !important;
}

.reviews-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
}

.reviews-toggle-text {
    font-size: 16px !important;
    font-weight: 800;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reviews-count-badge {
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
}

/* آیکون پلاس/مینوس با انیمیشن چرخش، هماهنگ با آیکون فهرست مطالب مقاله */
.reviews-toggle-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    position: relative;
}
.reviews-toggle-icon::before,
.reviews-toggle-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--primary-color);
    transition: transform 0.25s ease;
    border-radius: 2px;
}
.reviews-toggle-icon::before { width: 13px; height: 2px; transform: translate(-50%, -50%); }
.reviews-toggle-icon::after { width: 2px; height: 13px; transform: translate(-50%, -50%); }
.reviews-toggle-btn[aria-expanded="true"] .reviews-toggle-icon::after {
    transform: translate(-50%, -50%) scaleY(0);
}

/* محتوای نظرات: به‌صورت پیش‌فرض بسته (کلاس is-collapsed از PHP اضافه می‌شود)
   و با جاوااسکریپت toggle می‌شود؛ چون دکمه داخل h2 قرار دارد و خواهر مستقیم
   این باکس نیست، از کلاس مستقیم استفاده شد نه سلکتور "+" (که کار نمی‌کرد) */
.reviews-content-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}
.reviews-content-box.is-collapsed {
    display: none;
}

#reviews, .reviews-container-inner {
    text-align: right;
    direction: rtl;
}

/* با seo-tab-heading جایگزین شده */
#comments-title, .comment-reply-title, h2.woocommerce-Reviews-title {
    display: none;
}

.commentlist {
    padding: 0 !important;
    margin: 0 0 40px 0 !important;
    list-style: none !important;
}

.commentlist li.comment, .commentlist li.review {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 20px !important;
    margin-bottom: 15px !important;
}

.commentlist li.comment .comment-body, 
.commentlist li.review .comment_container {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
}

.commentlist img.avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    border: 2px solid #f1f5f9 !important;
}

.commentlist .comment-text, .commentlist .comment-content {
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.commentlist .meta, .commentlist .comment-meta {
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 8px;
}

.commentlist .meta strong, .comment-author cite {
    font-size: 14px !important;
    color: var(--primary-color) !important;
    font-weight: 800 !important;
    font-style: normal !important;
}

.commentlist li.review .star-rating {
    float: left !important;
    font-size: 13px !important;
    color: var(--attention-color) !important;
}
.commentlist li.review .star-rating span::before {
    color: var(--attention-color) !important;
}

.commentlist .description, .commentlist .comment-text p, .commentlist .comment-content p {
    font-size: 14px !important;
    line-height: 2 !important;
    color: #475569 !important;
    text-align: justify !important;
    margin-top: 5px !important;
}

#review_form_wrapper, #respond {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 25px !important;
    margin-top: 20px;
}

.comment-form-rating {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}
.comment-form-rating label {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
    margin: 0 !important;
}
p.stars a {
    color: var(--attention-color) !important;
    font-size: 16px !important;
}

.comment-form-comment label, #commentform label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
    margin-bottom: 8px !important;
}

.comment-form-comment textarea, #commentform input[type="text"], #commentform input[type="email"], #commentform textarea {
    width: 100% !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    background: #f8fafc !important;
    outline: none !important;
    transition: border-color 0.3s !important;
}

.comment-form-comment textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

.comment-form-comment textarea:focus, #commentform input[type="text"]:focus, #commentform input[type="email"]:focus, #commentform textarea:focus {
    border-color: var(--primary-color) !important;
    background: #ffffff !important;
}

.form-submit {
    margin-bottom: 0 !important;
}

.form-submit input[type="submit"], #commentform #submit {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 40px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
}

.form-submit input[type="submit"]:hover, #commentform #submit:hover {
    background: var(--primary-gradient) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(62, 0, 235, 0.3) !important;
}

.comment-form-cookies-consent {
    display: none !important;
}

/* 
 * File: style.css (بخش Header) 
 * Description: استایل‌های بومی، Mobile-First و بدون فریم‌ورک
 */

/* متغیرهای رنگی اختصاصی برند کپی‌فای اکنون در بلاک اصلی :root (ابتدای فایل) تعریف شده‌اند */

/* کلاس کمکی برای آینه کردن آیکون‌ها در حالت راست‌چین */
html[dir="rtl"] .rtl-mirror {
    transform: scaleX(-1);
}

/* دسترسی‌پذیری: پرش به محتوا */
.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; word-wrap: normal !important;
}
.skip-link:focus {
    background-color: var(--copify-primary); color: var(--copify-white);
    clip: auto !important; clip-path: none; display: block;
    height: auto; left: 1rem; top: 1rem; padding: 1rem; width: auto; z-index: 100000;
}

/* ساختار کلی هدر */
.site-header {
    background-color: var(--copify-white);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* کانتینر داخلی هدر و فوتر: بدون سقف عرض ثابت، کاملاً اج‌تواج (Edge-to-Edge)
   با پدینگ سیال (Fluid) تا در هر سایز صفحه، فاصله از لبه‌ها متناسب و یکسان بماند.
   نکته مهم (رفع باگ اج‌تواج نبودن هدر در single/single-product):
   قبلاً از یک کلاس عمومی و پرتکرار به نام «.container» استفاده می‌شد که
   نامش دقیقاً با کلاس‌های عمومی افزونه‌ها/کتابخانه‌های دیگر (Bootstrap،
   ووکامرس، Elementor و ...) یکی بود. هر افزونه‌ای که یک قانون
   «.container { max-width: ...; }» تعریف می‌کرد (مثلاً فقط در صفحات
   ووکامرس لود می‌شد)، بسته به ترتیب بارگذاری فایل‌های CSS می‌توانست این
   استایل را override کند و باعث می‌شد هدر/فوتر در بعضی صفحات (خصوصاً
   single-product.php) دیگر اج‌تواج نباشد. برای رفع قطعی این تداخل:
   ۱) کلاس در header.php/footer.php به «.header-inner» و «.footer-inner»
      تغییر کرد (کلاسی اختصاصی و بدون هم‌نامی با افزونه‌های دیگر).
   ۲) عرض با !important قفل شد تا حتی اگر افزونه‌ای در آینده دوباره یک
      کلاس هم‌نام تعریف کند، دیگر امکان بازنویسی این مقدار را نداشته باشد. */
.header-inner,
.footer-inner {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 0 4% !important;
}

.site-header,
.site-footer {
    width: 100% !important;
    max-width: none !important;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* لوگو */
.site-branding img {
    max-height: 50px;
    width: auto;
}
.site-title a {
    color: var(--copify-primary);
    font-weight: 800;
    text-decoration: none;
    font-size: 1.5rem;
}

/* اکشن‌ها و سبد خرید */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.cart-icon-wrapper {
    position: relative;
    color: var(--copify-text-dark);
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}
.cart-icon-wrapper:hover {
    color: var(--copify-primary);
}
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--copify-action);
    color: var(--copify-white);
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* دکمه CTA (خرید آمازون) */
/* =========================================
   دکمه CTA خرید کتاب آمازون — همیشه قابل مشاهده
   موبایل: فقط آیکون دایره‌ای | ≥480px: آیکون + متن کوتاه
========================================= */
.btn-amazon-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background-color: var(--copify-action);
    color: var(--copify-white);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    text-decoration: none;
    flex-shrink: 0;
    transition: background-color 0.3s ease, transform 0.2s ease, width 0.3s ease, border-radius 0.3s ease;
}
.btn-amazon-cta:hover {
    background-color: #a3020d;
    transform: translateY(-2px);
    color: var(--copify-white);
}
.btn-amazon-cta:focus-visible {
    outline: 2px dashed var(--copify-warning);
    outline-offset: 3px;
}
.btn-amazon-cta .amazon-cta-text {
    display: none;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .btn-amazon-cta {
        width: auto;
        height: auto;
        border-radius: 8px;
        padding: 0.6rem 1.1rem;
        gap: 0.5rem;
        font-weight: 700;
        font-size: 0.85rem;
    }
    .btn-amazon-cta .amazon-cta-text { display: inline; }
}

@media (min-width: 992px) {
    .btn-amazon-cta {
        padding: 0.6rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* منوی موبایل (دکمه همبرگری) */
.menu-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.hamburger-box {
    width: 24px; height: 24px; display: inline-block; position: relative;
}
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 24px; height: 3px; background-color: var(--copify-text-dark);
    position: absolute; transition: transform 0.15s ease; border-radius: 2px;
}
.hamburger-inner { top: 50%; margin-top: -1.5px; }
.hamburger-inner::before { content: ""; top: -8px; }
.hamburger-inner::after { content: ""; bottom: -8px; }

/* ریست پایه لیست منو (رفع باگ نمایش نقطه/بولت پیش‌فرض مرورگر) */
.nav-menu,
.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu li {
    list-style: none;
}

/* مخفی کردن منوی اصلی در موبایل */
.main-navigation .nav-menu {
    display: none;
}
.main-navigation.toggled .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--copify-white);
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
}
.main-navigation.toggled .nav-menu li a {
    display: block;
    padding: 0.75rem 0;
    color: var(--copify-text-dark);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--copify-bg-light);
}

/* رسپانسیو (Tablet & Desktop) */
@media (min-width: 992px) {
    .menu-toggle { display: none; }
    
    .main-navigation .nav-menu {
        display: flex !important;
        flex-direction: row;
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        gap: 2rem;
    }
    .main-navigation .nav-menu li a {
        border-bottom: none;
        padding: 0.5rem 0;
        position: relative;
        transition: color 0.3s ease;
    }
    .main-navigation .nav-menu li a:hover {
        color: var(--copify-primary);
    }
    
    /* افکت خط زیر منو */
    .main-navigation .nav-menu li a::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 0;
        height: 2px;
        background-color: var(--copify-primary);
        transition: width 0.3s ease;
    }
    .main-navigation .nav-menu li a:hover::after {
        width: 100%;
    }

    .btn-amazon-cta {
        display: inline-flex;
    }
}

/* =========================================
   مگامنو و زیرمنو (Dropdown & Mega Menu)
   نکته: کدهای این بخش هم در موبایل (اکاردئون) و
   هم در دسکتاپ (هاور/کلیک) به شکل Progressive
   Enhancement کار می‌کنند و بدون جاوااسکریپت هم
   لینک‌ها در DOM قابل دسترسی و ایندکس‌شدن توسط سئو هستند.
========================================= */

/* دکمه فلش کنار آیتم‌هایی که زیرمنو دارند */
/* رفع باگ چرخش فلش منو در حالت RTL */
.nav-menu .dropdown-caret {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px; /* جایگزین margin-inline-start برای پایداری در تمام مرورگرها */
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor; /* تغییر به چپ برای RTL */
    transform: rotate(-45deg); /* چرخش صحیح رو به پایین */
    transition: transform 0.3s ease;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

/* در حالت هاور یا باز شدن مگامنو فلش رو به بالا بچرخد */
.nav-menu .menu-item:hover > a .dropdown-caret,
.nav-menu .menu-item.menu-open > a .dropdown-caret {
    transform: rotate(135deg);
    top: 2px;
}

/* حالت موبایل: اکاردئون */
.main-navigation.toggled .nav-menu .menu-item.has-dropdown > a,
.main-navigation.toggled .nav-menu .menu-item.has-mega > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.main-navigation.toggled .nav-menu .sub-menu,
.main-navigation.toggled .nav-menu .mega-menu-panel {
    display: none;
    list-style: none;
    padding: 0 0 0 15px;
    background: var(--copify-bg-light);
    border-radius: 8px;
    margin: 6px 0 10px;
}
.main-navigation.toggled .nav-menu .menu-item.menu-open > .sub-menu,
.main-navigation.toggled .nav-menu .menu-item.menu-open > .mega-menu-panel {
    display: block;
}
.main-navigation.toggled .nav-menu .menu-item.menu-open > a .dropdown-caret {
    transform: rotate(225deg);
}
.main-navigation.toggled .nav-menu .mega-menu-panel {
    display: none;
}
.main-navigation.toggled .nav-menu .menu-item.menu-open > .mega-menu-panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* نمایش زیرمنوهای تودرتو (Dropdown داخل Dropdown) */
@media (min-width: 992px) {
    /* وقتی روی والد هاور می‌شود، زیرمنو ظاهر شود */
    .nav-menu .menu-item:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* مدیریت موقعیت زیرمنوهای تودرتو (برای اینکه بیرون از کادر نزنند) */
    .nav-menu .dropdown-menu .dropdown-menu {
        top: 0;
        right: 100%; /* باز شدن به سمت چپ در حالت RTL */
        margin-right: 10px;
    }
}

/* در حالت اکاردئون موبایل، ستون‌های مگامنو زیر هم قرار می‌گیرند */
.main-navigation.toggled .nav-menu .mega-menu-panel > .menu-item {
    padding: 4px 10px;
}
.main-navigation.toggled .nav-menu .mega-menu-panel > .menu-item > .menu-item-text {
    font-weight: 800;
    color: var(--copify-primary);
    display: block;
    margin-top: 8px;
}
.main-navigation.toggled .nav-menu .dropdown-menu li a,
.main-navigation.toggled .nav-menu .mega-menu-panel .dropdown-menu li a {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

/* دکمه‌های ویژه (ثبت‌نام / ورود) داخل منو */
.nav-menu .menu-item.av-menu-button > a,
.nav-menu .menu-item-button > a {
    background-color: var(--copify-primary);
    color: var(--copify-white) !important;
    border-radius: 8px;
    padding: 0.5rem 1rem !important;
}

@media (min-width: 992px) {
    .nav-menu > .menu-item {
        position: relative;
    }

    /* زیرمنوی ساده (مثل «نمونه‌کار») */
    .nav-menu .dropdown-menu {
        display: block;
        list-style: none;
        position: absolute;
        top: calc(100% + 14px);
        right: 0;
        min-width: 220px;
        background: var(--copify-white);
        border-radius: 12px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
        padding: 0.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
        z-index: 200;
    }
    .nav-menu .dropdown-menu .dropdown-menu {
        top: 0;
        right: calc(100% + 10px);
    }
    .nav-menu .dropdown-menu li a {
        display: block;
        padding: 0.6rem 0.9rem;
        border-radius: 8px;
        font-size: 0.9rem;
        color: var(--copify-text-dark);
        white-space: nowrap;
    }
    .nav-menu .dropdown-menu li a:hover {
        background: var(--copify-bg-light);
        color: var(--copify-primary);
    }
    .nav-menu .dropdown-menu li a::after { display: none; }

    /* مگامنو چندستونه (مثل «خدمات») */
    .nav-menu .mega-menu-panel {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        list-style: none;
        position: absolute;
        top: calc(100% + 14px);
        right: 50%;
        transform: translate(50%, 8px);
        width: min(900px, 90vw);
        background: var(--copify-white);
        border-radius: 16px;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
        padding: 1.75rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
        z-index: 200;
    }
    .nav-menu .mega-menu-panel > .menu-item > a {
        pointer-events: none;
        display: block;
    }
    .nav-menu .mega-menu-panel > .menu-item > a .menu-item-text {
        font-size: 0.85rem;
        font-weight: 800;
        color: var(--copify-primary);
        display: block;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--copify-bg-light);
    }
    .nav-menu .mega-menu-panel .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        background: transparent;
    }
    .nav-menu .mega-menu-panel .dropdown-menu li a {
        padding: 0.45rem 0;
    }

    /* نمایش زیرمنو/مگامنو با هاور روی دسکتاپ (کیبورد و لمسی از طریق JS مدیریت می‌شوند) */
    .nav-menu > .menu-item.has-dropdown:hover > .dropdown-menu,
    .nav-menu > .menu-item.has-mega:hover > .mega-menu-panel,
    .nav-menu .menu-item.menu-open > .dropdown-menu,
    .nav-menu .menu-item.menu-open > .mega-menu-panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-menu .mega-menu-panel.menu-open,
    .nav-menu > .menu-item.has-mega:hover > .mega-menu-panel {
        transform: translate(50%, 0);
    }

    .nav-menu > .menu-item.has-dropdown > a .dropdown-caret,
    .nav-menu > .menu-item.has-mega > a .dropdown-caret {
        transform: rotate(135deg);
        margin-top: -3px;
    }
}

@media (max-width: 1200px) and (min-width: 992px) {
    .nav-menu .mega-menu-panel {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* =========================================================
   بازطراحی کامل صفحه تک‌نوشته وبلاگ (single.php)
   هماهنگ با پالت رنگی برند، Mobile-First و WCAG AA
========================================================= */

/* نوار پیشرفت مطالعه */
.reading-progress-track {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: transparent;
    z-index: 1100;
}
.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--copify-primary), #8a6cf0);
    transition: width 0.1s linear;
}

/* -----------------------------------------------------------
   متغیرهای اختصاصی «حالت مطالعه» (Reading Mode)
   پالت ملایم و کم‌خستگی، مستقل از رنگ‌های تبلیغاتی/CTA برند
----------------------------------------------------------- */
.single-post-wrapper {
    background: transparent;
    padding: 16px 12px 50px;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

/* مسیر راهنما */
.post-breadcrumb {
    font-size: 12px;
    color: var(--read-text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 4px;
}
.post-breadcrumb a { color: var(--read-text-secondary); }
.post-breadcrumb a:hover { color: var(--read-accent); }
.post-breadcrumb .crumb-sep { color: #cbd5e1; }
.post-breadcrumb .crumb-current { color: var(--read-text); font-weight: 700; }

/* بعد: هدر جمع‌وجور، بدون کارت مجزا و بدون فاصله اضافه تا تصویر */
.post-header {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 4px 16px;
    margin-bottom: 0;
}

.post-category {
    margin-bottom: 10px; /* قبلاً 15px */
}

.post-meta-data {
    border-top: none; /* حذف خط بی‌دلیل بالای متا وقتی دیگر داخل کارت نیست */
    padding-top: 0;
}

.post-category {
    display: inline-block;
    background: var(--read-red-soft-bg);
    color: var(--read-red-soft-text);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 800;
    margin-bottom: 15px;
    text-decoration: none;
    box-shadow: none;
    transition: background 0.25s, color 0.25s;
}
.post-category:hover { background: var(--copify-action); color: #ffffff; }

.post-main-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--read-text);
    line-height: 1.65;
    margin-bottom: 16px;
}

.post-meta-data {
    font-size: 12.5px;
    color: var(--read-text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border-top: 1px dashed var(--read-border);
    padding-top: 15px;
}
.post-meta-data span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--read-bg);
    padding: 6px 12px;
    border-radius: 20px;
}
.post-author-avatar {
    border-radius: 50%;
    width: 22px;
    height: 22px;
}

/* بعد */
.post-thumbnail {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 18px; /* قبلاً 24px */
    box-shadow: 0 8px 20px rgba(38, 42, 51, 0.07);
    background: var(--copify-bg-light);
}
.post-thumbnail img { width: 100%; height: auto; display: block; }

/* چیدمان اصلی: تک‌ستونه و تمام‌عرض برای تجربه مطالعه حرفه‌ای‌تر (بدون سایدبار) */
.post-layout {
    display: block;
}

/* کارت محتوای مقاله (تایپوگرافیِ بهینه برای مطالعه طولانی) */
.post-body-content {
    background: var(--read-surface);
    border: 1px solid var(--read-border);
    border-radius: 20px;
    padding: 22px 18px;
    font-size: 16px;
    line-height: 2;
    color: var(--read-text);
    text-align: justify;
}
.post-body-content > *:first-child { margin-top: 0; }

.post-body-content h2, .post-body-content h3, .post-body-content h4 {
    color: var(--read-text);
    margin: 34px 0 16px;
    font-weight: 800;
    line-height: 1.7;
}
.post-body-content h2 { font-size: 19px; border-right: 4px solid var(--read-accent); padding-right: 12px; }
.post-body-content h3 { font-size: 17px; color: var(--read-accent); }
.post-body-content h4 { font-size: 15.5px; }
.post-body-content p { margin-bottom: 20px; }

/* محدود کردن عرض متن پاراگراف‌ها برای خوانایی حرفه‌ای، حتی وقتی کارت محتوا عریض‌تر است.
   عنوان و تصویر شاخص همچنان تمام‌عرض باقی می‌مانند (طبق استاندارد مجلات آنلاین) */
@media (min-width: 992px) {
    .post-body-content > p,
    .post-body-content > ul,
    .post-body-content > ol,
    .post-body-content > h2,
    .post-body-content > h3,
    .post-body-content > h4,
    .post-body-content > blockquote,
    .post-body-content > table {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }
}

.post-body-content a {
    color: var(--read-accent);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dashed var(--read-accent);
    transition: border-color 0.2s;
}
.post-body-content a:hover { border-bottom-style: solid; }

.post-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 22px auto;
    display: block;
    box-shadow: 0 6px 18px rgba(38, 42, 51, 0.06);
}
.post-body-content figcaption {
    text-align: center;
    font-size: 12px;
    color: var(--read-text-secondary);
    margin-top: -12px;
    margin-bottom: 20px;
}

.post-body-content ul { list-style: none; margin: 0 0 20px; padding-right: 4px; }
.post-body-content ul > li {
    position: relative;
    padding-right: 22px;
    margin-bottom: 10px;
}
.post-body-content ul > li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--read-accent);
}
.post-body-content ol { margin: 0 0 20px; padding-right: 20px; color: var(--read-text); }
.post-body-content ol > li { margin-bottom: 10px; }

.post-body-content blockquote {
    background: var(--read-accent-soft);
    border-right: 4px solid var(--copify-action);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 4px 16px 16px 4px;
    color: var(--read-text-secondary);
    font-style: normal;
    font-size: 15px;
}
.post-body-content blockquote p:last-child { margin-bottom: 0; }

/* بلوک‌های کد (برای محتوای آموزشی HTML/برنامه‌نویسی) */
.post-body-content code {
    background: #eef0f6;
    color: #4338ca;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 13px;
    direction: ltr;
    display: inline-block;
    font-family: 'Courier New', monospace;
}
.post-body-content pre {
    background: #1e2130;
    color: #e5e7eb;
    padding: 18px;
    border-radius: 14px;
    overflow-x: auto;
    margin: 22px 0;
    direction: ltr;
    text-align: left;
    font-size: 13px;
    line-height: 1.8;
    -webkit-overflow-scrolling: touch;
}
.post-body-content pre code { background: transparent; color: inherit; padding: 0; }

/* جدول‌ها */
.post-body-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--read-border);
}
.post-body-content th, .post-body-content td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--read-border);
    text-align: right;
}
.post-body-content th { background: var(--read-bg); font-weight: 800; color: var(--read-text); }
.post-body-content tr:last-child td { border-bottom: none; }

.post-body-content hr { border: none; border-top: 1px dashed var(--read-border); margin: 30px 0; }

/* برچسب‌های موضوعی */
.post-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px dashed var(--read-border);
}
.post-tag-chip {
    background: var(--read-bg);
    color: var(--read-text-secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: 0.25s;
    border: 1px solid var(--read-border);
}
.post-tag-chip:hover { background: var(--read-accent); color: #ffffff; border-color: var(--read-accent); }

/* جعبه اشتراک‌گذاری */
.post-share-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 24px 0 0;
    padding: 16px 18px;
    background: var(--read-bg);
    border-radius: 16px;
}
.share-label { font-size: 13px; font-weight: 800; color: var(--read-text); margin-left: 4px; }
.share-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--read-surface);
    color: var(--read-text-secondary);
    border: 1px solid var(--read-border);
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    flex-shrink: 0;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.08); }
.share-telegram:hover { background: #24A1DE; color: #fff; border-color: #24A1DE; }
.share-whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.share-x:hover { background: #000000; color: #fff; border-color: #000000; }
.share-copy { width: auto; padding: 0 16px; border-radius: 20px; gap: 6px; font-size: 12px; font-weight: 700; }
.share-copy.copied { background: var(--read-accent); color: #fff; border-color: var(--read-accent); }

/* باکس نویسنده */
.post-author-box {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--read-surface);
    border: 1px solid var(--read-border);
    border-radius: 18px;
    padding: 20px;
    margin: 24px 0 0;
}
.author-box-avatar { border-radius: 50%; flex-shrink: 0; width: 56px !important; height: 56px !important; }
.author-box-content { min-width: 0; }
.author-box-label { font-size: 11px; color: var(--read-text-secondary); font-weight: 700; letter-spacing: 0.3px; }
.author-box-name { font-size: 16px; font-weight: 800; color: var(--read-text); margin: 4px 0 8px; }
.author-box-bio { font-size: 13px; color: var(--read-text-secondary); line-height: 1.9; }

/* ناوبری مطلب قبلی/بعدی */
.post-nav-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0 0;
}
.post-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--read-surface);
    border: 1px solid var(--read-border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.25s;
}
.post-nav-item:hover { border-color: var(--read-accent); box-shadow: 0 8px 20px rgba(38,42,51,0.06); }
.post-nav-item small { display: block; font-size: 11px; color: var(--read-text-secondary); margin-bottom: 4px; font-weight: 700; }
.post-nav-item strong { display: block; font-size: 13.5px; color: var(--read-text); line-height: 1.6; }
.post-nav-next { text-align: left; }
.post-nav-arrow {
    font-size: 18px;
    color: var(--read-accent);
    flex-shrink: 0;
    width: 34px; height: 34px;
    background: var(--read-accent-soft);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* فهرست مطالب خودکار (Table of Contents) — فقط برای مقالات با ۳+ زیرعنوان نمایش داده می‌شود */
.post-toc {
    background: var(--read-bg);
    border: 1px solid var(--read-border);
    border-radius: 16px;
    padding: 16px 18px;
    margin: 0 0 28px;
}
.post-toc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.post-toc-toggle-text {
    font-size: 14px;
    font-weight: 800;
    color: var(--read-text);
}
.post-toc-toggle-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
}
.post-toc-toggle-icon::before,
.post-toc-toggle-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--read-accent);
    transition: transform 0.25s ease;
}
.post-toc-toggle-icon::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.post-toc-toggle-icon::after { width: 2px; height: 12px; transform: translate(-50%, -50%); }
.post-toc-toggle[aria-expanded="true"] .post-toc-toggle-icon::after { transform: translate(-50%, -50%) scaleY(0); }

.post-toc-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px dashed var(--read-border);
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.post-toc-toggle[aria-expanded="false"] + .post-toc-list { display: none; }
.post-toc-item a {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--read-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}
.post-toc-item a:hover { color: var(--read-accent); }
.post-toc-item.post-toc-h3 { padding-right: 18px; }
.post-toc-item.post-toc-h3 a { font-size: 13px; }

/* مطالب مرتبط */
.related-posts-section { margin-top: 36px; padding-top: 28px; border-top: 1px dashed var(--read-border); }
.related-posts-title { font-size: 17px; font-weight: 800; color: var(--read-text); margin-bottom: 18px; }
.related-posts-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.related-post-card { background: var(--read-surface); border: 1px solid var(--read-border); border-radius: 16px; overflow: hidden; transition: all 0.3s; }
.related-post-card:hover { transform: translateY(-4px); box-shadow: 0 15px 30px rgba(38,42,51,0.08); border-color: var(--read-accent); }
.related-post-image { display: block; height: 150px; background: var(--read-bg); }
.related-post-image img { width: 100%; height: 100%; object-fit: cover; }
.related-post-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 32px; }
.related-post-title { font-size: 14px; font-weight: 800; padding: 14px 14px 6px; line-height: 1.6; }
.related-post-title a { color: var(--read-text); text-decoration: none; }
.related-post-title a:hover { color: var(--read-accent); }
.related-post-date { display: block; font-size: 11px; color: var(--read-text-secondary); padding: 0 14px 14px; }

/* بخش دیدگاه‌ها (comments.php) — ادغام‌شده داخل کارت محتوای اصلی، بدون جعبه مجزا */
.post-comments-inline { margin-top: 36px; padding-top: 28px; border-top: 1px dashed var(--read-border); }
.comment-navigation {
    margin: 20px 0 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.comment-navigation a {
    background: var(--read-surface);
    border: 1px solid var(--read-border);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--read-text);
    text-decoration: none;
    transition: 0.25s;
}
.comment-navigation a:hover { background: var(--read-accent); color: #fff; border-color: var(--read-accent); }
.no-comments {
    background: var(--read-bg);
    border-radius: 12px;
    padding: 16px;
    font-size: 13px;
    color: var(--read-text-secondary);
    text-align: center;
}

/* رسپانسیو دسکتاپ */
@media (min-width: 768px) {
    .single-post-wrapper { padding: 30px 24px 60px; }
    .post-header { padding: 4px 4px 20px; }
    .post-main-title { font-size: 28px; }
    .post-body-content { padding: 40px; font-size: 17px; }
    .post-body-content h2 { font-size: 23px; }
    .related-posts-grid { grid-template-columns: repeat(3, 1fr); }
    .post-nav-links { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   رفع تداخل هدر چسبان (Sticky Header) با نوار مدیریت وردپرس (Admin Bar)
   بدون این کد، بخشی از هدر هنگام اسکرول زیر نوار ادمین پنهان می‌شود.
================================================================ */

/* دسکتاپ: نوار ادمین با ارتفاع ثابت ۳۲ پیکسل، به صورت fixed */
body.admin-bar .site-header {
    top: 32px;
}

/* حالت تبلت: نوار ادمین در این بازه هم fixed است ولی با ارتفاع ۴۶ پیکسل */
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* موبایل کوچک: خود وردپرس نوار ادمین را در این سایز absolute می‌کند (نه fixed)
   پس هدر دیگر نیازی به فاصله ندارد و باید به حالت عادی برگردد */
@media screen and (max-width: 600px) {
    body.admin-bar .site-header {
        top: 0;
    }
}

/* ================================================================
   نمایش نام برند در کنار لوگو (site-branding)
================================================================ */
.branding-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

/* در صورت استفاده از the_custom_logo وردپرس، مارجین پیش‌فرض حذف شود */
.branding-link .custom-logo-link {
    display: flex;
    align-items: center;
}

.site-logo-img {
    display: block;
    height: 40px;
    width: auto;
    border-radius: 8px; /* هماهنگ با زبان بصری گرد قالب */
    flex-shrink: 0;
}

.site-branding-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0; /* جلوگیری از سرریز متن در فضای کم موبایل */
}

.site-title-main {
    font-size: 15px;
    font-weight: 800;
    color: var(--copify-primary);
    white-space: nowrap;
}

.site-title-tagline {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--copify-text-secondary); /* رنگ کنتراست‌دار طبق WCAG AA، نه خاکستری روشن برند */
    white-space: nowrap;
}

/* موبایل خیلی کوچک: تگ‌لاین مخفی شود تا با CTA و آیکون سبد خرید تداخل فضایی پیدا نکند */
@media (max-width: 380px) {
    .site-title-tagline {
        display: none;
    }
}

/* دسکتاپ: کمی بزرگ‌تر و خواناتر */
@media (min-width: 992px) {
    .site-logo-img {
        height: 48px;
    }
    .site-title-main {
        font-size: 18px;
    }
    .site-title-tagline {
        font-size: 12px;
    }
}
/* =========================================
   محل قرارگیری: انتهای فایل style.css
   هدف: رفع باگ حاشیه‌های خالی هدر در صفحات محصول (ووکامرس)
========================================= */

/* ۱. بازنشانی استایل‌های تگ body که توسط کلاس عمومی ووکامرس جمع شده بود */
body.woocommerce,
body.woocommerce-page {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    /* حفظ رنگ پس‌زمینه پایه کپی‌فای */
    background-color: #f4f6f9 !important; 
}

/* ۲. تضمین تمام‌عرض بودن هدر و جلوگیری از تأثیر پدینگ‌های ووکامرس */
body.woocommerce #masthead.site-header,
body.woocommerce #colophon.site-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    left: 0;
    right: 0;
}

/* ۳. حفظ ساختار واکنش‌گرای محتوای اصلی محصول (بدون تأثیر روی هدر) */
body.woocommerce .single-product-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}
/* =========================================
   تب‌بندی محصول (Product Tabs - Digikala Style)
   محل قرارگیری: style.css
========================================= */
.product-tabs-wrapper {
    background: var(--copify-white);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    margin: 25px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden;
    direction: rtl;
}

@media (min-width: 768px) {
    .product-tabs-wrapper {
        max-width: 1400px;
        margin: 0 auto 40px auto;
        width: 90%;
    }
}

/* نوار دکمه‌های تب */
.product-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;
}
.product-tabs-nav::-webkit-scrollbar { display: none; }

.tab-item { flex: 0 0 auto; }

.tab-btn {
    padding: 18px 25px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--copify-text-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-item.active .tab-btn {
    color: var(--copify-primary);
}

/* خط زیر تب فعال */
.tab-item.active .tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--copify-primary);
    border-radius: 3px 3px 0 0;
}

.tab-count {
    background: #e2e8f0;
    color: var(--text-main);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
}

.tab-item.active .tab-count {
    background: var(--copify-primary);
    color: #fff;
}

/* پانل محتوای تب */
.tab-panel {
    display: none; /* مخفی بودن در حالت عادی */
    padding: 25px;
    animation: fadeInTab 0.4s ease;
}

.tab-panel.active {
    display: block; /* نمایش تب فعال */
}

/* عنوان سئو-فرندلی داخل هر تب، جایگزین عناوین پیش‌فرض ووکامرس */
.seo-tab-heading {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 10px;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تنظیمات مشاهده بیشتر در داخل تب */
.desc-expandable-wrapper {
    position: relative;
    max-height: 300px; /* ارتفاع پیش‌فرض */
    overflow: hidden;
    transition: max-height 0.5s ease;
}
.desc-expandable-wrapper.is-expanded { max-height: none; }
.desc-fade-mask {
    position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
}
.desc-expandable-wrapper.is-expanded .desc-fade-mask { display: none; }

.no-content-msg { text-align: center; color: var(--text-muted); font-size: 13px; padding: 40px 0; }

/* =========================================
   رفع قطعی مشکل چیدمان ۴ ستونه محصولات مرتبط
========================================= */
/* ۱. حذف شبه‌عناصر مزاحم ووکامرس که گرید را می‌شکنند */
.related-products-section ul.products::before,
.related-products-section ul.products::after {
    display: none !important;
    content: none !important;
}

/* ۲. قفل کردن روی ۴ ستون دقیق در دسکتاپ */
@media (min-width: 992px) {
    .related-products-section ul.products {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; /* اجبار به ۴ ستون مساوی */
        gap: 20px !important;
        width: 100% !important;
    }
    
    /* ۳. حذف مارجین‌ها و clear های پیش‌فرض ووکامرس از روی تک‌تک محصولات */
    .related-products-section ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        clear: none !important;
        float: none !important; /* خنثی کردن float های قدیمی ووکامرس */
    }
}

/* برای تبلت (۲ ستون) */
@media (max-width: 991px) and (min-width: 768px) {
    .related-products-section ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}


/* =========================================
   رفع تداخل کشوی فیلتر با نوار مدیریت وردپرس (Admin Bar)
   دقیقاً هم‌راستا با منطق موجود برای .site-header در style.css
========================================= */
body.admin-bar .shop-filter-drawer {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .shop-filter-drawer {
        top: 46px;
    }
}
@media screen and (max-width: 600px) {
    body.admin-bar .shop-filter-drawer {
        top: 0;
    }
}

/* اطمینان از اینکه کشو همیشه بالاتر از هر عنصر دیگری (به‌جز خود ادمین‌بار) باشد */
.shop-filter-drawer {
    z-index: 99998; /* یک واحد پایین‌تر از ادمین‌بار (99999) تا زیرش قرار بگیرد نه پشتش */
}

/* =========================================
   بازطراحی صفحه سبد خرید (WooCommerce Cart)
   محل قرارگیری: انتهای style.css
========================================= */

.copify-cart-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 15px 60px;
    direction: rtl;
}

.cart-page-header { margin: 15px 4px 20px; }
.cart-page-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cart-page-count {
    font-size: 11px;
    font-weight: 800;
    background: var(--bg-color);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.cart-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.cart-items-list { display: flex; flex-direction: column; gap: 14px; }

/* --- کارت هر آیتم سبد خرید --- */
.cart-item-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: box-shadow .3s ease, border-color .3s ease;
}
.cart-item-card:hover { border-color: #e2e8f0; box-shadow: 0 8px 20px rgba(0,0,0,0.05); }

.cart-item-top-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }

.cart-item-thumb {
    width: 64px; height: 64px; flex-shrink: 0;
    border-radius: 10px; overflow: hidden;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: contain; }

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-size: 13.5px; font-weight: 800; line-height: 1.6; margin-bottom: 4px; }
.cart-item-title a { color: var(--text-main); }
.cart-item-title a:hover { color: var(--primary-color); }
.cart-item-meta { font-size: 11.5px; color: var(--text-muted); line-height: 1.8; }
.cart-item-meta p { margin: 0; }
.backorder_notification { font-size: 11px; color: var(--brand-red); margin-top: 4px; font-weight: 700; }

.cart-item-remove { flex-shrink: 0; }
.cart-item-remove .remove {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: all .25s ease;
}
.cart-item-remove .remove:hover { background: var(--brand-red); color: #fff; }
.cart-item-remove .remove:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }

.cart-item-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px dashed #eef0f5;
}
.cart-item-price-block,
.cart-item-qty-block,
.cart-item-subtotal-block { display: flex; flex-direction: column; gap: 4px; }
.cart-item-subtotal-block { align-items: flex-end; margin-inline-start: auto; }
.cart-item-block-label { font-size: 10.5px; color: #94a3b8; font-weight: 700; }
.cart-item-price .amount { color: var(--text-muted); font-weight: 700; font-size: 12.5px; }
.cart-item-subtotal .amount { color: var(--primary-color); font-weight: 800; font-size: 14px; }

/* اینپوت تعداد + دکمه‌های استپر جاوااسکریپتی */
.cart-item-qty-block input.qty {
    width: 56px; height: 38px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    color: var(--primary-color);
    background: #fff;
    font-family: inherit;
}
.cart-item-qty-block input.qty:focus { border-color: var(--primary-color); outline: none; }
.cart-item-qty-block input[type=number]::-webkit-inner-spin-button,
.cart-item-qty-block input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cart-item-qty-block input[type=number] { -moz-appearance: textfield; }

.copify-qty-stepper { display: flex; align-items: center; gap: 6px; }
.copify-qty-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: var(--primary-color);
    font-size: 16px; font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s ease;
    flex-shrink: 0;
}
.copify-qty-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.copify-qty-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

/* --- اکشن‌های پایین فرم (کوپن + بروزرسانی) --- */
.cart-page-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}
.cart-coupon-box { display: flex; flex-direction: column; gap: 8px; }
.cart-coupon-label { font-size: 12.5px; font-weight: 800; color: var(--text-main); }
.cart-coupon-inputs { display: flex; gap: 8px; flex-wrap: wrap; }
.cart-coupon-inputs input#coupon_code {
    flex: 1; min-width: 160px;
    padding: 12px 14px;
    border: 2px solid #f1f5f9;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    background: #f8fafc;
}
.cart-coupon-inputs input#coupon_code:focus { border-color: var(--primary-color); background: #fff; outline: none; }

.cart-btn-outline, .cart-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all .25s ease;
    white-space: nowrap;
}
.cart-btn-outline { background: #f8fafc; color: var(--primary-color); border: 2px solid #e2e8f0; }
.cart-btn-outline:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.cart-btn-secondary { background: #f1f5f9; color: var(--text-main); align-self: flex-start; }
.cart-btn-secondary:hover { background: var(--primary-color); color: #fff; }
.cart-btn-outline:focus-visible,
.cart-btn-secondary:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.cart-continue-shopping {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 800; color: var(--primary-color);
    margin-top: 15px; padding: 4px;
}
.cart-continue-shopping:hover { text-decoration: underline; }

/* --- ستون خلاصه سفارش (خروجی هسته ووکامرس: cart-totals.php) --- */
.cart-summary-column .cart_totals,
.cart-summary-column table.shop_table {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    width: 100%;
    border-collapse: collapse;
}
.cart-summary-column .cart_totals h2 {
    font-size: 16px; font-weight: 800; color: var(--primary-color);
    margin-bottom: 15px; padding-bottom: 12px; border-bottom: 1px dashed #e2e8f0;
}
.cart-summary-column table.shop_table th,
.cart-summary-column table.shop_table td {
    padding: 12px 0; font-size: 13px; color: var(--text-main);
    border-bottom: 1px dashed #f1f5f9; text-align: right;
}
.cart-summary-column table.shop_table tr:last-child th,
.cart-summary-column table.shop_table tr:last-child td { border-bottom: none; }
.cart-summary-column .order-total .amount { color: var(--brand-red); font-size: 17px; font-weight: 800; }

.cart-summary-column .wc-proceed-to-checkout { margin-top: 15px; }
.cart-summary-column .checkout-button {
    display: block; width: 100%; text-align: center;
    background: #10b981 !important; color: #fff !important;
    padding: 16px; border-radius: 12px;
    font-weight: 800; font-size: 15px;
    box-shadow: 0 4px 15px rgba(16,185,129,.3);
    transition: transform .25s ease;
}
.cart-summary-column .checkout-button:hover { transform: translateY(-2px); }

.cart-summary-column .shipping-calculator-form { margin-top: 10px; font-size: 13px; }
.cart-summary-column .shipping-calculator-button { color: var(--primary-color); font-weight: 700; font-size: 12px; }

/* --- حالت سبد خرید خالی (در صورت استفاده از cart-empty.php پیشنهادی) --- */
.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}
.cart-empty-icon { font-size: 50px; margin-bottom: 15px; }
.cart-empty-state p { font-size: 14px; color: var(--text-muted); margin-bottom: 25px; }

/* --- دسکتاپ: چیدمان دو ستونه با سایدبار چسبان (Sticky Sidebar) --- */
@media (min-width: 992px) {
    .copify-cart-page { padding: 30px 5% 80px; }
    .cart-page-layout { grid-template-columns: 2fr 1fr; gap: 30px; }
    .cart-summary-sticky { position: sticky; top: 100px; } /* هم‌راستا با ارتفاع هدر چسبان (80px) */
    .cart-item-card { padding: 18px; }
}

/* هماهنگی سایدبار چسبان با نوار مدیریت وردپرس (Admin Bar)، مطابق منطق موجود در فایل */
body.admin-bar .cart-summary-sticky { top: 132px; }


/* =========================================================================
   File: style.css  (این بلوک را به انتهای style.css قالب کپی‌فای اضافه کنید)
   Description: استایل‌های اختصاصی مسیر پرداخت (Checkout) کپی‌فای
   هماهنگ با متغیرهای رنگی برند و کلاس‌های موجود سبد خرید (cart-item-card,
   cart-btn-outline, copify-btn-primary و ...)
   ========================================================================= */

/* -----------------------------------------------------------------------
   ساختار کلی صفحه چک‌اوت
----------------------------------------------------------------------- */
.copify-checkout-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 15px 100px;
    direction: rtl;
}

.copify-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 4px 20px;
}
.copify-checkout-title {
    font-size: 19px;
    font-weight: 900;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.copify-checkout-title svg { color: var(--primary-color); flex-shrink: 0; }
.copify-checkout-back-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all .25s;
}
.copify-checkout-back-cart:hover { color: var(--primary-color); border-color: var(--primary-color); }
.copify-checkout-notice {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* چیدمان دو ستونه: در موبایل تک‌ستونه با خلاصه سفارش اول، بعد فرم، بعد پرداخت */
.copify-checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.checkout-col-summary { order: 1; }
.checkout-col-main { order: 2; }

.copify-section-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 16px;
}
.copify-section-card:last-child { margin-bottom: 0; }

.copify-section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}
.copify-section-title svg { flex-shrink: 0; }

.copify-form-block { margin-bottom: 20px; }
.copify-form-block:last-child { margin-bottom: 0; }

/* گرید دو ستونه فیلدهای فرم (نام/نام‌خانوادگی، ایمیل/تلفن و ...) */
.copify-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 15px;
}
.copify-fields-grid .form-row-wide,
.copify-fields-grid .form-row:not(.form-row-first):not(.form-row-last) {
    grid-column: 1 / -1;
}

.copify-create-account-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    margin-bottom: 16px;
}
.copify-create-account-toggle input[type="checkbox"] {
    width: 20px; height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

/* -----------------------------------------------------------------------
   کارت کد تخفیف
----------------------------------------------------------------------- */
.copify-coupon-wrapper { margin-top: 4px; }
.copify-coupon-toggle-row .woocommerce-info,
.copify-coupon-toggle-row p { background: transparent; padding: 0; border: none; margin: 0; }
.copify-coupon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary-color);
}
.copify-coupon-inputs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.copify-coupon-inputs input#coupon_code {
    flex: 1;
    min-width: 140px;
    padding: 11px 14px;
    border: 2px solid #f1f5f9;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    background: var(--bg-color);
}
.copify-coupon-inputs input#coupon_code:focus { border-color: var(--primary-color); outline: none; background: #fff; }

/* -----------------------------------------------------------------------
   کارت ورود مشتری قبلی
----------------------------------------------------------------------- */
.copify-login-notice-row .woocommerce-info { background: transparent; padding: 0; border: none; margin: 0 0 16px; font-size: 12.5px; color: var(--text-muted); }
.copify-login-toggle { color: var(--primary-color); font-weight: 800; }
.woocommerce-form-login {
    background: var(--bg-color);
    border: 1px dashed #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

/* -----------------------------------------------------------------------
   خلاصه سفارش (ستون کناری/چسبان)
----------------------------------------------------------------------- */
.copify-order-review-card { padding: 0; overflow: hidden; }
.copify-review-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-color);
    border: none;
    padding: 18px;
    cursor: pointer;
    font-family: inherit;
}
.copify-review-toggle-text {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.copify-review-count {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
}
.copify-review-toggle-icon {
    width: 20px; height: 20px; position: relative; flex-shrink: 0;
    transition: transform .3s;
}
.copify-review-toggle-icon::before,
.copify-review-toggle-icon::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    background: var(--text-main);
    transition: transform .25s ease;
}
.copify-review-toggle-icon::before { width: 12px; height: 2px; transform: translate(-50%,-50%); }
.copify-review-toggle-icon::after { width: 2px; height: 12px; transform: translate(-50%,-50%); }
.copify-review-toggle[aria-expanded="true"] .copify-review-toggle-icon::after { transform: translate(-50%,-50%) scaleY(0); }

.copify-review-body { padding: 18px; }

.copify-review-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.copify-review-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f1f5f9;
}
.copify-review-item:last-child { border-bottom: none; padding-bottom: 0; }
.copify-review-item-thumb {
    width: 50px; height: 50px; flex-shrink: 0;
    border-radius: 10px; overflow: hidden;
    background: var(--bg-color);
    display: flex; align-items: center; justify-content: center;
}
.copify-review-item-thumb img { width: 100%; height: 100%; object-fit: contain; }
.copify-review-item-info { flex: 1; min-width: 0; }
.copify-review-item-title { display: block; font-size: 13px; font-weight: 700; color: var(--text-main); line-height: 1.6; }
.copify-review-item-title a { color: inherit; }
.copify-review-item-qty { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.copify-review-item-subtotal { font-size: 13px; font-weight: 800; color: var(--primary-color); white-space: nowrap; flex-shrink: 0; }

.copify-review-totals-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.copify-review-totals-table th,
.copify-review-totals-table td { padding: 10px 0; text-align: right; border-bottom: 1px dashed #f1f5f9; color: var(--text-main); font-weight: 700; }
.copify-review-totals-table td { text-align: left; font-weight: 800; }
.copify-review-totals-table tr:last-child th,
.copify-review-totals-table tr:last-child td { border-bottom: none; }
.copify-review-totals-table .order-total th,
.copify-review-totals-table .order-total td { font-size: 15px; color: var(--primary-color); padding-top: 14px; }
.copify-review-totals-table .order-total td .woocommerce-Price-amount { color: var(--brand-red); }

/* -----------------------------------------------------------------------
   بخش پذیرش قوانین
----------------------------------------------------------------------- */
.copify-terms-wrapper { margin: 18px 0; }
.copify-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.9;
    cursor: pointer;
}
.copify-terms-row input[type="checkbox"] {
    width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
    accent-color: var(--primary-color);
    cursor: pointer;
}
.copify-terms-row a { color: var(--primary-color); font-weight: 700; }

/* -----------------------------------------------------------------------
   روش‌های پرداخت (Radio Cards)
----------------------------------------------------------------------- */
.copify-payment-methods { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.copify-payment-method {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    position: relative;
    transition: all .25s;
    background: var(--bg-color);
}
.copify-payment-method:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(62, 0, 235, 0.03);
    box-shadow: 0 4px 15px rgba(62,0,235,0.08);
}
.copify-payment-method input.input-radio {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
    cursor: pointer;
    background: #fff;
    transition: border-color .2s;
}
.copify-payment-method input.input-radio:checked { border-color: var(--primary-color); }
.copify-payment-method input.input-radio:checked::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--primary-color);
}
.copify-payment-method-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 32px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
}
.copify-payment-method-label img { max-height: 24px; width: auto; }
.copify-payment-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.9;
}
.copify-no-payment-needed,
.copify-no-gateway {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* -----------------------------------------------------------------------
   دکمه نهایی پرداخت (چسبان در موبایل)
----------------------------------------------------------------------- */
.copify-noscript-warning { font-size: 12px; color: var(--brand-red); background: #fdecec; padding: 12px; border-radius: 10px; margin-bottom: 14px; }

.copify-place-order-sticky {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    bottom: 0; right: 0; left: 0;
    background: #fff;
    padding: 12px 15px;
    box-shadow: 0 -8px 25px rgba(0,0,0,0.08);
    z-index: 900;
}
.copify-place-order-total { display: flex; flex-direction: column; gap: 2px; }
.copify-place-order-label { font-size: 10.5px; color: var(--text-muted); font-weight: 700; }
.copify-place-order-total strong { font-size: 16px; font-weight: 900; color: var(--primary-color); }
.copify-place-order-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brand-red) !important;
    color: #fff !important;
    border: none;
    padding: 14px 24px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(198,3,16,0.25);
    transition: all .25s;
    white-space: nowrap;
    font-family: inherit;
}
.copify-place-order-btn:hover { background: #9a020c !important; transform: translateY(-2px); }
.copify-place-order-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.copify-secure-payment-note {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px; color: var(--text-muted);
    margin: 12px 0 90px;
    justify-content: center;
}

/* -----------------------------------------------------------------------
   صفحه تشکر از خرید (Thank You)
----------------------------------------------------------------------- */
.copify-thankyou-page { max-width: 640px; margin: 0 auto; padding: 30px 15px 60px; text-align: center; direction: rtl; }
.copify-thankyou-icon {
    width: 84px; height: 84px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(16,185,129,0.3);
    animation: copifyPopIn .5s cubic-bezier(.25,.8,.25,1);
}
.copify-thankyou-icon-error { background: linear-gradient(135deg, var(--brand-red), #9a020c); box-shadow: 0 10px 25px rgba(198,3,16,0.25); }
@keyframes copifyPopIn { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.copify-thankyou-title { font-size: 20px; font-weight: 900; color: var(--text-main); margin-bottom: 10px; }
.copify-thankyou-title-error { color: var(--brand-red); }
.copify-thankyou-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.9; margin-bottom: 24px; }

.copify-order-summary-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 6px 18px;
    text-align: right;
    margin-bottom: 26px;
}
.copify-order-overview { list-style: none; margin: 0; padding: 0; }
.copify-order-overview li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 13px;
}
.copify-order-overview li:last-child { border-bottom: none; }
.copify-overview-label { color: var(--text-muted); font-weight: 700; }
.copify-order-overview strong { color: var(--text-main); font-weight: 800; }
.copify-order-overview li.total strong { color: var(--primary-color); font-size: 15px; }

.copify-thankyou-actions { display: flex; flex-direction: column; gap: 10px; }
.copify-support-link { color: #25D366 !important; border-color: #25D366 !important; }
.copify-support-link:hover { background: #25D366 !important; color: #fff !important; }

.copify-receipt-card { max-width: 640px; margin: 30px auto; }

/* -----------------------------------------------------------------------
   خطاهای سبد خرید در مسیر چک‌اوت
----------------------------------------------------------------------- */
.copify-cart-errors-box { margin: 30px auto; }

/* -----------------------------------------------------------------------
   صفحه تأیید ایمیل
----------------------------------------------------------------------- */
.copify-verify-email-page { max-width: 560px; margin: 0 auto; }
.copify-verify-email-desc { font-size: 13px; color: var(--text-muted); line-height: 1.9; margin-bottom: 20px; }

/* -----------------------------------------------------------------------
   رسپانسیو دسکتاپ: چیدمان دو ستونه واقعی + سایدبار چسبان
----------------------------------------------------------------------- */
@media (min-width: 992px) {
    .copify-checkout-page { padding: 30px 5% 60px; }
    .copify-checkout-layout {
        grid-template-columns: 1.7fr 1fr;
        align-items: start;
        gap: 30px;
    }
    .checkout-col-summary { order: 2; }
    .checkout-col-main { order: 1; }
    .copify-summary-sticky { position: sticky; top: 100px; }
    body.admin-bar .copify-summary-sticky { top: 132px; }

    .copify-fields-grid { grid-template-columns: 1fr 1fr; }

    /* در دسکتاپ فضای کافی هست، دکمه پرداخت دیگر نیازی به حالت چسبان کف صفحه ندارد */
    .copify-place-order-sticky {
        position: static;
        box-shadow: none;
        padding: 0;
        background: transparent;
        justify-content: flex-start;
        gap: 20px;
    }
    .copify-secure-payment-note { margin-bottom: 0; }

    /* در دسکتاپ خلاصه سفارش همیشه باز است؛ دکمه توگل غیرفعال بصری می‌شود */
    .copify-review-toggle { cursor: default; }
    .copify-review-toggle-icon { display: none; }
}

@media (max-width: 991px) {
    /* در موبایل، فضای خالی پایین صفحه برای دکمه چسبان رزرو می‌شود */
    .copify-checkout-page { padding-bottom: 110px; }
}

body.admin-bar .copify-place-order-sticky {
    bottom: 0;
}


/* =========================================
   بازطراحی یکپارچه دکمه‌های تسویه حساب و پرداخت
   استفاده از رنگ قرمز اکشن کپی‌فای برای جلب توجه کاربر
========================================= */
.woocommerce-cart .wc-proceed-to-checkout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.woocommerce-checkout #place_order, 
.woocommerce-cart .checkout-button,
.cart-checkout-btn {
    background-color: var(--accent-color) !important; /* قرمز اختصاصی برند (#c60310) */
    color: #ffffff !important;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 12px;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(198, 3, 16, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.woocommerce-checkout #place_order:hover, 
.woocommerce-cart .checkout-button:hover,
.cart-checkout-btn:hover {
    background-color: #9a020c !important; /* تیره‌تر شدن اصولی در حالت Hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(198, 3, 16, 0.35);
}

.woocommerce-checkout #place_order:focus-visible, 
.woocommerce-cart .checkout-button:focus-visible {
    outline: 2px dashed var(--attention-color); /* دسترسی‌پذیری WCAG برای کیبورد */
    outline-offset: 4px;
}



/* =========================================================================
   File: style.css  (این بلوک را به انتهای style.css قالب کپی‌فای اضافه کنید)
   Description: بازطراحی کامل پنل کاربری (WooCommerce My Account) کپی‌فای
   هماهنگ با متغیرهای رنگی برند و کلاس‌های موجود سبد خرید/چک‌اوت
   (copify-section-card, copify-btn-primary, copify-fields-grid, cart-btn-outline و ...)
   ========================================================================= */

/* -----------------------------------------------------------------------
   پیام‌های سیستمی ووکامرس (خطا/موفقیت/اطلاع‌رسانی) — استایل عمومی
   برای فرم‌های ورود/ثبت‌نام/ویرایش حساب که در سراسر پنل کاربری استفاده می‌شود
----------------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-NoticeGroup ul.woocommerce-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    list-style: none;
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-right: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-main);
}
.woocommerce-error { border-right-color: var(--brand-red); }
.woocommerce-message { border-right-color: #10b981; }
.woocommerce-message a.button,
.woocommerce-error a.button,
.woocommerce-info a.button {
    display: inline-block;
    margin-top: 8px;
    background: var(--primary-color);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}
.woocommerce-error li { list-style: none; }

/* =========================================================================
   ۱. چیدمان کلی پنل کاربری (my-account.php)
========================================================================= */
.copify-account-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 15px 60px;
    direction: rtl;
}

.copify-account-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

/* --- سایدبار کاربر --- */
.copify-account-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-account-avatar {
    border-radius: 50%;
    flex-shrink: 0;
    width: 52px !important;
    height: 52px !important;
    border: 2px solid #f1f5f9;
}
.copify-account-user-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.copify-account-user-label { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.copify-account-user-name { font-size: 14.5px; font-weight: 800; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- ناوبری: در موبایل نوار چیپ افقی، در دسکتاپ سایدبار عمودی چسبان --- */
.copify-account-nav-list {
    list-style: none;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    margin: 0;
    scrollbar-width: none;
}
.copify-account-nav-list::-webkit-scrollbar { display: none; }

.copify-account-nav-item { flex-shrink: 0; }
.copify-account-nav-item a {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 12px;
    white-space: nowrap;
    transition: all 0.25s ease;
}
.copify-account-nav-item a:hover,
.copify-account-nav-item.is-active a,
.copify-account-nav-item a[aria-current="page"] {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.copify-account-nav-item.is-logout a {
    color: var(--brand-red);
    border-color: #fdecec;
    background: #fdecec;
}
.copify-account-nav-item.is-logout a:hover {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}
.copify-account-nav-icon { display: inline-flex; flex-shrink: 0; }

/* --- محتوای اصلی --- */
.copify-account-content { min-width: 0; }
.copify-account-heading {
    font-size: 19px;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.7;
}
.copify-account-heading span { color: var(--primary-color); }
.copify-account-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
}
.copify-dashboard-notyou {
    color: var(--brand-red);
    font-weight: 700;
    margin-inline-start: 4px;
}

/* =========================================================================
   ۲. داشبورد — کارت‌های دسترسی سریع
========================================================================= */
.copify-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}
.copify-dashboard-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.copify-dashboard-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 25px rgba(62,0,235,0.08);
}
.copify-dashboard-card-icon { font-size: 26px; }
.copify-dashboard-card strong { font-size: 13.5px; font-weight: 800; color: var(--text-main); }
.copify-dashboard-card span:last-child { font-size: 11.5px; color: var(--text-muted); line-height: 1.7; }

/* =========================================================================
   ۳. سفارش‌ها — کارت به‌جای جدول (الگوی دیجی‌کالا)
========================================================================= */
.copify-orders-list { display: flex; flex-direction: column; gap: 14px; }

.copify-order-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: box-shadow .3s ease, border-color .3s ease;
}
.copify-order-card:hover { border-color: #e2e8f0; box-shadow: 0 8px 20px rgba(0,0,0,0.05); }

.copify-order-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eef0f5;
}
.copify-order-card-id { display: flex; flex-direction: column; gap: 3px; }
.copify-order-card-label { font-size: 10.5px; color: #94a3b8; font-weight: 700; }
.copify-order-card-number { font-size: 15px; font-weight: 800; color: var(--primary-color); direction: ltr; display: inline-block; }

.copify-order-status-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 5px 13px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.copify-order-status-badge.is-success { background: #e7f9f1; color: #0f9d63; }
.copify-order-status-badge.is-info    { background: #e8f0fe; color: #1a56db; }
.copify-order-status-badge.is-warning { background: #fff6e0; color: #a15c00; }
.copify-order-status-badge.is-danger  { background: #fdecec; color: var(--brand-red); }
.copify-order-status-badge.is-muted   { background: #f1f5f9; color: var(--text-muted); }

.copify-order-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.copify-order-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-color);
    padding: 6px 12px;
    border-radius: 20px;
}

.copify-order-card-extra {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0;
    border-top: 1px dashed #eef0f5;
}

.copify-order-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px dashed #eef0f5;
}
.copify-order-card-total { display: flex; flex-direction: column; gap: 4px; }
.copify-order-card-total strong { font-size: 14.5px; font-weight: 800; color: var(--text-main); }

.copify-order-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copify-order-action-btn,
.copify-order-action-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 800;
    padding: 9px 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.copify-order-action-btn:hover { background: var(--primary-color); color: #fff; }
.copify-order-action-btn.is-primary { background: var(--brand-red); color: #fff; }
.copify-order-action-btn.is-primary:hover { background: #9a020c; }
.copify-order-action-btn.cancel { color: var(--brand-red); background: #fdecec; }
.copify-order-action-btn.cancel:hover { background: var(--brand-red); color: #fff; }

.copify-orders-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

/* =========================================================================
   ۴. جزئیات سفارش (view-order.php)
========================================================================= */
.copify-order-view-header {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-order-view-summary {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.9;
    margin-top: 12px;
}
.copify-order-view-summary mark {
    background: transparent;
    color: var(--text-main);
    font-weight: 800;
}

.copify-order-updates-section { margin-bottom: 24px; }
.copify-order-updates-title { font-size: 15px; font-weight: 800; color: var(--primary-color); margin-bottom: 14px; }
.copify-order-updates-list { list-style: none; margin: 0; padding: 0 0 0 6px; border-right: 2px dashed #e2e8f0; }
.copify-order-update-item { display: flex; gap: 12px; padding-bottom: 18px; position: relative; margin-right: -7px; }
.copify-order-update-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
    flex-shrink: 0;
    margin-top: 4px;
}
.copify-order-update-content { flex: 1; background: var(--bg-color); border-radius: 12px; padding: 12px 14px; }
.copify-order-update-date { display: block; font-size: 11px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.copify-order-update-text p { font-size: 13px; color: var(--text-main); line-height: 1.8; margin: 0; }

/* --- استایل جدول جزئیات سفارش هسته ووکامرس (order/order-details.php) --- */
.copify-order-details-wrap table.woocommerce-table--order-details,
.copify-order-details-wrap table.shop_table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-order-details-wrap table th,
.copify-order-details-wrap table td {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-main);
    border-bottom: 1px dashed #f1f5f9;
    text-align: right;
}
.copify-order-details-wrap table thead th {
    background: var(--bg-color);
    font-weight: 800;
    color: var(--primary-color);
}
.copify-order-details-wrap table tfoot th,
.copify-order-details-wrap table tfoot td { font-weight: 800; }
.copify-order-details-wrap table tr:last-child td { border-bottom: none; }
.copify-order-details-wrap address {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-main);
    margin-bottom: 14px;
}
.copify-order-details-wrap .woocommerce-column__title { font-size: 14px; font-weight: 800; color: var(--primary-color); margin: 20px 0 10px; }
.copify-order-details-wrap .woocommerce-columns { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* =========================================================================
   ۵. دانلودها
========================================================================= */
.copify-downloads-wrap table.woocommerce-table--order-downloads,
.copify-downloads-wrap table.shop_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.copify-downloads-wrap table.woocommerce-table--order-downloads thead { display: none; }
.copify-downloads-wrap table.woocommerce-table--order-downloads tbody tr,
.copify-downloads-wrap table.shop_table tbody tr {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-downloads-wrap table td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-main);
    border: none;
}
.copify-downloads-wrap table td:first-child { border-radius: 14px 0 0 14px; }
.copify-downloads-wrap table td:last-child { border-radius: 0 14px 14px 0; }
.copify-downloads-wrap table a.woocommerce-MyAccount-downloads-file,
.copify-downloads-wrap table a {
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.copify-downloads-wrap table a::before { content: '⬇️'; }

.copify-downloads-list-simple { display: flex; flex-direction: column; gap: 10px; }
.copify-download-item-simple {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.copify-download-link { color: var(--primary-color); font-weight: 800; font-size: 13.5px; text-decoration: none; }
.copify-download-count { font-size: 11px; color: var(--text-muted); background: var(--bg-color); padding: 4px 10px; border-radius: 20px; }

/* =========================================================================
   ۶. روش‌های پرداخت ذخیره‌شده
========================================================================= */
.copify-payment-methods-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.copify-payment-method-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
}
.copify-payment-method-card.is-default { border-color: var(--primary-color); background: rgba(62,0,235,0.03); }
.copify-payment-method-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
}
.copify-payment-method-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.copify-payment-method-info strong { font-size: 13.5px; font-weight: 800; color: var(--text-main); }
.copify-payment-method-expiry { font-size: 11.5px; color: var(--text-muted); }
.copify-payment-method-default-badge {
    display: inline-block;
    width: fit-content;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
}
.copify-payment-method-actions { display: flex; gap: 8px; flex-shrink: 0; }
.copify-payment-add-btn { display: inline-block; }

/* =========================================================================
   ۷. آدرس‌ها
========================================================================= */
.copify-address-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.copify-address-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-address-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eef0f5;
}
.copify-address-card-header h2 { font-size: 14.5px; font-weight: 800; color: var(--primary-color); }
.copify-address-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--bg-color);
    padding: 6px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s;
}
.copify-address-edit-link:hover { background: var(--primary-color); color: #fff; }
.copify-address-card-body { font-size: 13px; line-height: 1.9; color: var(--text-main); font-style: normal; }

/* =========================================================================
   ۸. صفحات ورود / ثبت‌نام / بازیابی رمز عبور
========================================================================= */
.copify-auth-page { max-width: 1400px; margin: 20px auto; padding: 0 15px 60px; direction: rtl; }
.copify-auth-single { max-width: 480px; }

.copify-auth-columns { display: grid; grid-template-columns: 1fr; gap: 0; align-items: stretch; }
.copify-auth-card { height: 100%; }
.copify-auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
    position: relative;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}
.copify-auth-divider::before,
.copify-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.copify-auth-divider span { padding: 0 12px; }

.copify-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px 0 18px;
}
.copify-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
}
.copify-remember-me input { width: 18px; height: 18px; accent-color: var(--primary-color); cursor: pointer; }
.copify-lost-password-link { font-size: 12.5px; font-weight: 700; color: var(--primary-color); }

.copify-auth-submit {
    width: 100%;
    padding: 14px;
    font-size: 14px;
}
.copify-auth-confirmation { max-width: 480px; margin: 0 auto; }
.copify-auth-confirmation h2 { font-size: 17px; font-weight: 800; color: var(--text-main); margin: 6px 0 10px; }

/* =========================================================================
   ۹. حالت خالی مشترک (سفارش/دانلود/پرداخت)
========================================================================= */
.copify-account-empty-state {
    text-align: center;
    padding: 50px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 560px;
    margin: 10px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}
.copify-account-empty-icon { font-size: 46px; margin-bottom: 14px; }
.copify-account-empty-state p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.9; }

/* =========================================================================
   ۱۰. رسپانسیو دسکتاپ
========================================================================= */
@media (min-width: 992px) {
    .copify-account-page { padding: 30px 5% 80px; }

    .copify-account-layout { grid-template-columns: 260px 1fr; gap: 30px; }
    .copify-account-sidebar-sticky { position: sticky; top: 100px; }
    body.admin-bar .copify-account-sidebar-sticky { top: 132px; }

    .copify-account-nav-list { flex-direction: column; overflow: visible; padding: 0; }
    .copify-account-nav-item { width: 100%; }
    .copify-account-nav-item a { width: 100%; justify-content: flex-start; }

    .copify-dashboard-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }

    .copify-order-card { padding: 20px; }

    .copify-address-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

    .copify-auth-columns { grid-template-columns: 1fr auto 1fr; gap: 20px; }
    .copify-auth-divider { flex-direction: column; margin: 0; }
    .copify-auth-divider::before,
    .copify-auth-divider::after { width: 1px; height: auto; flex: 1; }
    .copify-auth-divider span { padding: 12px 0; }

    .copify-order-details-wrap .woocommerce-columns { grid-template-columns: 1fr 1fr; }
}

/* هماهنگی حالت چسبان سایدبار پنل کاربری با نوار مدیریت وردپرس در تبلت */
@media screen and (max-width: 782px) and (min-width: 992px) {
    body.admin-bar .copify-account-sidebar-sticky { top: 146px; }
}

/* =========================================================================
   File: style.css  (این بلوک را به انتهای style.css قالب کپی‌فای اضافه کنید)
   Description: استایل تکمیلی زیرقالب‌های سبد خرید کپی‌فای
   (mini-cart, shipping-calculator, cart-shipping, cross-sells)
   هماهنگ با متغیرهای رنگی برند و کلاس‌های موجود cart-item-card / cart-btn-*
   ========================================================================= */

/* =========================================================================
   ۱. مینی‌کارت (سبد خرید کوچک هدر / Ajax Fragments)
========================================================================= */
.copify-mini-cart {
    width: 100%;
    max-width: 340px;
    direction: rtl;
    padding: 6px;
}

.copify-mini-cart-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.copify-mini-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
    padding: 8px;
    padding-left: 26px; /* فضای دکمه حذف */
    background: var(--bg-color);
    border-radius: 12px;
}

.copify-mini-cart-thumb {
    width: 46px; height: 46px; flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.copify-mini-cart-thumb img { width: 100%; height: 100%; object-fit: contain; }

.copify-mini-cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.copify-mini-cart-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.copify-mini-cart-meta { font-size: 10.5px; color: var(--text-muted); }
.copify-mini-cart-qty { font-size: 11.5px; font-weight: 800; color: var(--primary-color); direction: ltr; display: inline-block; }

.copify-mini-cart-remove {
    position: absolute;
    top: 8px; left: 8px;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
}
.copify-mini-cart-remove:hover { background: var(--brand-red); color: #fff; }

.copify-mini-cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    padding: 12px 0;
    border-top: 1px dashed #e2e8f0;
    margin: 0 0 12px;
}
.copify-mini-cart-total-label { color: var(--text-muted); font-weight: 700; }
.copify-mini-cart-total .woocommerce-Price-amount { color: var(--primary-color); font-size: 15px; }

.copify-mini-cart-buttons {
    display: flex;
    gap: 8px;
    margin: 0;
}
.copify-mini-cart-buttons .button {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.25s ease;
}
.copify-mini-cart-buttons .button:not(.checkout-button) {
    background: #f1f5f9;
    color: var(--text-main);
}
.copify-mini-cart-buttons .button:not(.checkout-button):hover { background: var(--primary-color); color: #fff; }
.copify-mini-cart-buttons .checkout-button { padding: 10px 8px; }

.copify-mini-cart-empty {
    text-align: center;
    padding: 30px 15px;
}
.copify-mini-cart-empty-icon { font-size: 34px; display: block; margin-bottom: 10px; }
.copify-mini-cart-empty p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }

/* =========================================================================
   ۲. محاسبه‌گر هزینه ارسال (سبد خرید)
========================================================================= */
.copify-shipping-calculator { margin-top: 14px; }
.copify-shipping-calc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}
.copify-shipping-calc-toggle:hover { text-decoration: underline; }

.copify-shipping-calc-form {
    margin-top: 12px;
    padding: 14px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}
.copify-shipping-calc-form .form-row { margin-bottom: 10px; }
.copify-shipping-calc-form label { display: block; font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.copify-shipping-calc-form select,
.copify-shipping-calc-form input.input-text {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12.5px;
    background: #fff;
}
.copify-shipping-calc-form select:focus,
.copify-shipping-calc-form input.input-text:focus { border-color: var(--primary-color); outline: none; }
.copify-shipping-calc-submit { margin: 4px 0 0; }

/* =========================================================================
   ۳. روش‌های ارسال (cart-shipping.php)
========================================================================= */
.copify-shipping-methods {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.copify-shipping-method-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-color);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    transition: all 0.2s ease;
}
.copify-shipping-method-item:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(62,0,235,0.03);
}
.copify-shipping-method-item input.shipping_method { accent-color: var(--primary-color); width: 17px; height: 17px; flex-shrink: 0; cursor: pointer; }
.copify-shipping-method-item label { cursor: pointer; flex: 1; }
.copify-shipping-destination { font-size: 11.5px; color: var(--text-muted); margin: 0; }
.copify-shipping-destination strong { color: var(--text-main); }

/* =========================================================================
   ۴. محصولات مکمل (Cross-sells) در سبد خرید
========================================================================= */
.copify-cross-sells {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}
.copify-cross-sells-title { font-size: 15px; font-weight: 800; color: var(--primary-color); margin-bottom: 14px; }

.copify-cross-sells-grid ul.products,
.copify-cross-sells-grid { list-style: none; padding: 0; margin: 0; }
.copify-cross-sells-grid ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
}
.copify-cross-sells-grid ul.products::before,
.copify-cross-sells-grid ul.products::after { display: none !important; content: none !important; }
.copify-cross-sells-grid ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    background-color: var(--card-bg);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}
.copify-cross-sells-grid ul.products li.product:hover { transform: translateY(-4px); border-color: var(--primary-color); }
.copify-cross-sells-grid ul.products li.product img { width: 100%; height: 110px; object-fit: contain; border-radius: 10px; background: #fff; margin-bottom: 8px; }
.copify-cross-sells-grid ul.products li.product .woocommerce-loop-product__title { font-size: 11.5px; font-weight: 700; color: var(--text-main); line-height: 1.6; }
.copify-cross-sells-grid ul.products li.product .price { font-size: 12px; font-weight: 800; color: var(--primary-color); display: block; margin-top: 4px; }
.copify-cross-sells-grid ul.products li.product .button {
    display: block;
    margin-top: 8px;
    background: #f1f5f9;
    color: var(--primary-color);
    text-align: center;
    padding: 7px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}
.copify-cross-sells-grid ul.products li.product:hover .button { background: var(--primary-color); color: #fff; }

/* =========================================================================
   ۵. رسپانسیو دسکتاپ
========================================================================= */
@media (min-width: 768px) {
    .copify-mini-cart { max-width: 380px; padding: 10px; }

    .copify-cross-sells-grid ul.products { grid-template-columns: repeat(4, 1fr) !important; gap: 18px !important; }
    .copify-cross-sells-grid ul.products li.product img { height: 150px; }
}

/* =========================================
   محل قرارگیری: انتهای فایل style.css
   توجه: قانون کلی اجبار فونت فارسی روی تمام نمایش‌های عددی (از جمله قیمت‌ها
   و تگ <bdi> که ووکامرس دور اعداد می‌پیچد) اکنون یک‌بار و برای همیشه در
   ابتدای همین فایل (کنار تعریف body) اعمال می‌شود؛ نیازی به تکرار فهرست
   طولانی کلاس‌های قیمت در این‌جا نیست.
========================================= */

/* =========================================================================
   File: style.css  (این بلوک را به انتهای style.css قالب کپی‌فای اضافه کنید)
   Description: استایل بخش مستقل نمادهای اعتماد و درگاه‌های پرداخت
   محل درج در HTML: footer.php — به‌عنوان <section class="site-trust-band">
   بین بدنه اصلی سایت و تگ <footer> (نه داخل فوتر)
   ========================================================================= */

.site-trust-band {
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 26px 0;
}

/* هم‌راستا با الگوی .header-inner/.footer-inner: عرض سیال با پدینگ درصدی،
   بدون سقف عرض ثابت با نام تکراری (رفع همان باگ احتمالی کلاس .container) */
.site-trust-band-inner {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 4%;
}

.footer-trust-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
}

.footer-trust-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 8px 12px;
    width: 90px;
    height: 56px;
    transition: all 0.25s ease;
}
.footer-trust-logo-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(62, 0, 235, 0.08);
    transform: translateY(-2px);
}
.footer-trust-logo-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.footer-trust-text {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 2;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .site-trust-band { padding: 34px 0; }
    .footer-trust-logos { gap: 20px; }
    .footer-trust-logo-box { width: 100px; height: 64px; }
    .footer-trust-text { font-size: 12.5px; }
}


/* =========================================
   نوار لوگوی دانشگاه‌ها/مشتریان سازمانی
   (حرکت افقی پیوسته و بسیار آهسته، بدون توقف)
========================================= */
.copify-partners-marquee-section {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 22px 20px;
    margin-bottom: 40px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.copify-partners-marquee-title {
    font-size: 13px;
    font-weight: 400;
    color: #57595e;
    text-align: center;
    line-height: 1.9;
    max-width: 560px;
    margin: 0 auto 16px;
}

/* نوار باریک: پس‌زمینه‌ی ملایم، ارتفاع کم، لبه‌های محو برای ظاهر حرفه‌ای‌تر */
.copify-partners-marquee-viewport {
    width: 100%;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 10px 0;
    direction: ltr; /* جهت حرکت انیمیشن مستقل از راست‌چین بودن کل سایت */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.copify-partners-marquee-track {
    display: flex;
    width: max-content;
    /* سرعت بسیار آهسته: هر چرخه ۱۲۰ ثانیه طول می‌کشد؛ برای کندتر شدن این عدد را افزایش دهید */
    animation: copifyPartnersScroll 120s linear infinite;
}
.copify-partners-marquee-viewport:hover .copify-partners-marquee-track,
.copify-partners-marquee-viewport:focus-within .copify-partners-marquee-track {
    animation-play-state: paused;
}
.copify-partners-marquee-group {
    display: flex;
    align-items: center;
    gap: 26px;
    padding-inline-end: 26px;
    flex-shrink: 0;
}
.copify-partner-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    flex-shrink: 0;
    filter: grayscale(100%);
    opacity: 0.75;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.copify-partner-logo-item:hover {
    filter: grayscale(0%);
    opacity: 1;
}
.copify-partner-logo-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

@keyframes copifyPartnersScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* دسترس‌پذیری: احترام به کاربرانی که در سیستم‌عامل خود انیمیشن را کاهش داده‌اند */
@media (prefers-reduced-motion: reduce) {
    .copify-partners-marquee-track {
        animation: none;
    }
    .copify-partners-marquee-viewport {
        overflow-x: auto;
    }
}

@media (min-width: 768px) {
    .copify-partners-marquee-section { padding: 26px 30px; margin-bottom: 50px; }
    .copify-partners-marquee-title { font-size: 15px; margin-bottom: 20px; }
    .copify-partners-marquee-viewport { padding: 14px 0; }
    .copify-partner-logo-item { height: 40px; }
    .copify-partners-marquee-group { gap: 46px; padding-inline-end: 46px; }
}

/* =========================================================================
   File: style.css (جایگزین بلوک قبلی نوار ضمانت خرید شود)
   Description: استایل نوار ضمانت‌های خرید (Trust/Guarantee Strip) در فوتر
   محل HTML مرتبط: footer.php -> <section class="copify-guarantee-strip">
   هر آیتم رنگ معنایی و استاندارد خودش را دارد (نه یک رنگ یکسان برای همه)
   تا ظاهر حرفه‌ای‌تر و شبیه نوارهای اعتماد سایت‌های معتبر تجاری باشد:
   ۱) اصالت فایل     -> سبز (اعتماد/تأیید)
   ۲) بازگشت وجه     -> نارنجی (هشدار ملایم/توجه مالی)
   ۳) پشتیبانی ۲۴س   -> آبی (ارتباط/پشتیبانی)
   ۴) پرداخت امن     -> سبز تیره (امنیت مالی)
   ۵) تحویل فوری     -> بنفش برند (هماهنگ با هویت کپی‌فای)
   ========================================================================= */

.copify-guarantee-strip {
    width: 100%;
    background-color: var(--copify-bg-light, #f8fafc);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 0;
}

.copify-guarantee-strip-inner {
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 4%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.copify-guarantee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.25s ease;
}
.copify-guarantee-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.copify-guarantee-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(62, 0, 235, 0.06);
    color: var(--copify-primary, #3e00eb);
}
.copify-guarantee-icon svg {
    display: block;
}

.copify-guarantee-text {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--copify-text-dark, #2d3748);
    line-height: 1.6;
}

/* -----------------------------------------------------------------------
   رنگ‌بندی معنایی و استاندارد هر آیتم (بر اساس ترتیب در footer.php)
----------------------------------------------------------------------- */

/* ۱. ضمانت اصالت فایل و محتوا -> سبز */
.copify-guarantee-item:nth-child(1) .copify-guarantee-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.copify-guarantee-item:nth-child(1):hover {
    border-color: #10b981;
}

/* ۲. ۷ روز ضمانت بازگشت وجه -> نارنجی */
.copify-guarantee-item:nth-child(2) .copify-guarantee-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.copify-guarantee-item:nth-child(2):hover {
    border-color: #f59e0b;
}

/* ۳. پشتیبانی ۲۴ ساعته -> آبی */
.copify-guarantee-item:nth-child(3) .copify-guarantee-icon {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}
.copify-guarantee-item:nth-child(3):hover {
    border-color: #2563eb;
}

/* ۴. پرداخت امن و رمزنگاری‌شده -> سبز تیره (امنیت) */
.copify-guarantee-item:nth-child(4) .copify-guarantee-icon {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}
.copify-guarantee-item:nth-child(4):hover {
    border-color: #059669;
}

/* ۵. تحویل فوری فایل -> بنفش برند (هماهنگ با هویت کپی‌فای) */
.copify-guarantee-item:nth-child(5) .copify-guarantee-icon {
    background: rgba(62, 0, 235, 0.08);
    color: var(--copify-primary, #3e00eb);
}
.copify-guarantee-item:nth-child(5):hover {
    border-color: var(--copify-primary, #3e00eb);
}

/* تبلت: ۳ ستون */
@media (min-width: 576px) and (max-width: 991px) {
    .copify-guarantee-strip-inner {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* دسکتاپ: یک ردیف کامل، بدون کارت مجزا، فقط جداکننده عمودی بین آیتم‌ها */
@media (min-width: 992px) {
    .copify-guarantee-strip {
        padding: 22px 0;
    }
    .copify-guarantee-strip-inner {
        grid-template-columns: repeat(5, 1fr);
        gap: 0;
        padding: 0 5%;
    }
    .copify-guarantee-item {
        background: transparent;
        border: none;
        border-radius: 0;
        justify-content: center;
        padding: 6px 18px;
    }
    .copify-guarantee-item:hover {
        transform: none;
        box-shadow: none;
        border-color: transparent !important;
    }
    .copify-guarantee-item:not(:first-child) {
        border-inline-start: 1px solid #e2e8f0;
    }
    .copify-guarantee-icon {
        width: 34px;
        height: 34px;
    }
    .copify-guarantee-text {
        font-size: 11px;
    }
}
/* =========================================================================
   File: style.css (این بلوک را به انتهای style.css اضافه کنید)
   Description: کامپوننت سراسری و قابل‌استفاده مجدد «محتوای بازشوی سئو»
   (Expandable SEO Content) به سبک دیجی‌کالا. برای page-amazon-landing.php
   و هر لندینگ پیج دیگری در آینده قابل استفاده است.
   ========================================================================= */

.copify-expandable-section {
    background: var(--read-surface, #ffffff);
    border: 1px solid var(--read-border, #e6e9ee);
    border-radius: 20px;
    padding: 22px 18px;
    margin: 50px 0;
}

.copify-expandable-title {
    font-size: 19px;
    font-weight: 900;
    color: var(--copify-primary, #3e00eb);
    margin-bottom: 18px;
    line-height: 1.6;
}

/* --- بدنه محتوا: جمع‌شونده با max-height (نه display:none) تا برای سئو مضر نباشد --- */
.copify-expandable-content-wrapper {
    position: relative;
    max-height: 480px;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.copify-expandable-content-wrapper.expanded {
    max-height: 8000px; /* عدد بزرگ کافی برای کل متن، انیمیشن نرم را حفظ می‌کند */
}

.copify-expandable-fade-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--read-surface, #fff) 92%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.copify-expandable-content-wrapper.expanded .copify-expandable-fade-mask {
    opacity: 0;
}

.copify-expandable-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--copify-action, #c60310);
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    padding: 16px 0 0;
    font-family: inherit;
    transition: color 0.3s ease;
}
.copify-expandable-toggle-btn:hover {
    color: #9a020c;
}

/* --- استایل جدول فرمت‌های کتاب (داخل post-body-content هم اعمال می‌شود، این‌جا فقط تقویت خوانایی) --- */
.copify-expandable-content-wrapper table th {
    white-space: nowrap;
}

@media (min-width: 768px) {
    .copify-expandable-section { padding: 36px 40px; }
    .copify-expandable-title { font-size: 23px; }
}