/*
Theme Name: قالب فروشگاهی بامیزبان آی‌تی (نسخه نهایی و حرفه‌ای)
Theme URI: https://bamizbanit.com
Author: توسعه دهنده اختصاصی
Description: اضافه شدن گالری مشابه دیجی‌کالا (همراه با زوم و لایت‌باکس)
Version: 9.3.0
Text Domain: bamizbanit
*/

/* =========================================
   معرفی فونت‌های اختصاصی
========================================= */
@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; /* این دستور برای سئو و سرعت لود (LCP) بسیار مهم است */
}

@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;
}

/* نکته مهم: فایل قبلی IRANSansWeb_Bold.woff2 اصلاً روی سرور آپلود نشده بود،
   به همین دلیل مرورگر برای وزن‌های bold/800 (مثل عنوان و قیمت محصول)
   نمی‌توانست فونت را لود کند و به صورت خاموش به Tahoma برمی‌گشت.
   این‌جا از فایل بولد واقعی که آپلود کرده‌اید استفاده شده: */
@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;
}

/* فونت جایگزین به عنوان بک‌آپ، در صورتی که IRANSans به هر دلیلی لود نشود */
@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: #9c14bd;  /* بنفش تیره برند بامیزبان آی‌تی (برای متن و حالت هاور) */
    --accent-color: #da21fc;   /* بنفش/صورتی پررنگ لوگو (رنگ اصلی دکمه‌ها و لینک‌ها) */
    --accent-light: #f430fa;   /* صورتی روشن لوگو (پایان گرادیانت) */
    --brand-gradient: linear-gradient(135deg, #da21fc 0%, #f430fa 100%);
    --brand-red: #DD0A18;     /* قرمز (نشان تخفیف/فوریت) */
    --bg-color: #f4f7f9; 
    --card-bg: #ffffff; 
    --text-main: #1e293b; 
    --text-muted: #64748b; 
}

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

body { 
    font-family: 'IRANSans', 'IranYekan', Tahoma, sans-serif; 
    background-color: #e2e8f0; 
    color: var(--text-main); 
    display: flex; 
    justify-content: center; 
    direction: rtl; 
}

a { 
    text-decoration: none; 
}

.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;
}

/* =========================================
   انیمیشن‌ها
========================================= */
/* رفع باگ: مقدار نهایی transform باید دقیقاً "none" باشد نه translateY(0).
   چون هر مقدار transform غیر از none (حتی translateY(0))، به همراه
   animation-fill-mode: forwards، برای همیشه روی المان باقی می‌ماند و
   برای فرزندان position:fixed (مثل نوار «ثبت سفارش» یا نوار چسبان
   سبد خرید) یک containing block جعلی می‌سازد و باعث می‌شود آن‌ها به‌جای
   چسبیدن به کل صفحه، داخل همین کادر انیمیشن‌دار گیر بیفتند و بدریخت شوند. */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: none; }
}
.animate-fade-up { animation: fadeInUp 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; opacity: 0; }

/* =========================================
   سربرگ (Header) - ریدیزاین کامل منو (موبایل + دسکتاپ)
   نکته: ساختار جدید نیازمند این مارکاپ در header.php است:
   <header class="site-header">
     <div class="site-header-inner">
       <div class="header-top">
         <button class="kn-menu-toggle" aria-expanded="false" aria-controls="kn-mobile-nav"><span></span><span></span><span></span></button>
         <div class="logo">...</div>
         <a href="/cart" class="cart-icon-wrapper">...<span class="cart-count">2</span></a>
       </div>
       <div class="search-box">...</div>
       <nav class="desktop-main-menu"><ul>...</ul></nav>
     </div>
   </header>
   <div class="kn-mobile-nav-overlay" id="kn-mobile-nav-overlay"></div>
   <aside class="kn-mobile-nav" id="kn-mobile-nav">
     <div class="kn-mobile-nav-header">
       <span class="kn-mobile-nav-title">منو</span>
       <button class="kn-mobile-nav-close">×</button>
     </div>
     <div class="kn-mobile-nav-body">
       <ul class="kn-mobile-nav-list">
         <li class="menu-item-has-children"><a href="#">دسته‌بندی‌ها <span class="kn-submenu-arrow"></span></a>
           <ul class="sub-menu"><li><a href="#">قاب گوشی</a></li></ul>
         </li>
       </ul>
     </div>
     <div class="kn-mobile-nav-footer"><span class="kn-mobile-contact">پشتیبانی: ۰۲۱-XXXXXXX</span></div>
   </aside>
========================================= */
.site-header { background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 14px 20px 15px; position: sticky; top: 0; z-index: 1200; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border-bottom: 1px solid #f1f5f9; }
.site-header-inner { display: flex; flex-direction: column; }
.header-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }

.logo { order: 2; font-size: 18px; font-weight: 800; color: var(--primary-color); display: flex; align-items: center; }
.logo a { display: flex; align-items: center; gap: 8px; }
.site-logo-img,
.logo .custom-logo-link img,
.logo img.custom-logo { height: 32px !important; width: auto !important; max-width: 140px !important; object-fit: contain; display: block; }
.site-logo-text { font-size: 14px; font-weight: 800; color: var(--primary-color); white-space: nowrap; }

/* دکمه همبرگری منوی موبایل */
.kn-menu-toggle { order: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: #f1f5f9; border: none; cursor: pointer; transition: background 0.25s; }
.kn-menu-toggle:hover { background: #e2e8f0; }
.kn-menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--primary-color); transition: transform 0.3s ease, opacity 0.3s ease; }
.kn-menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.kn-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.kn-menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.cart-icon-wrapper { order: 3; position: relative; background: #f1f5f9; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary-color); transition: all 0.3s;}
.cart-icon-wrapper:hover { background: var(--accent-color); color: #fff; transform: scale(1.06); }
.cart-count { position: absolute; top: -2px; right: -2px; background-color: var(--brand-red); color: #ffffff; font-size: 11px; font-weight: bold; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #fff; }
.search-box { display: flex; background-color: #f1f5f9; border-radius: 12px; padding: 8px 15px; align-items: center; margin-bottom: 0; transition: all 0.3s; width: 100%;}
.search-box:focus-within { box-shadow: 0 0 0 2px var(--accent-color); background: #fff; }
.search-box input { flex: 1; border: none; background: transparent; padding: 5px; font-size: 13px; outline: none; font-family: inherit; color: var(--text-main); }
.search-box button { border: none; background: transparent; cursor: pointer; font-size: 16px; color: var(--text-muted); }

/* منوی افقی دسکتاپ - در موبایل کاملاً مخفی، جایگزین آن منوی کشویی (Off-canvas) است */
.desktop-main-menu { display: none; }
.desktop-main-menu ul { list-style: none; display: flex; gap: 6px; justify-content: center; flex-wrap: nowrap; }
.desktop-main-menu ul > li { position: relative; white-space: nowrap; }
.desktop-main-menu ul > li > a { color: var(--text-main); font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 10px; display: flex; align-items: center; gap: 4px; position: relative; transition: color 0.25s, background 0.25s; }
.desktop-main-menu ul > li > a::after {
    content: '';
    position: absolute;
    right: 14px; left: 14px; bottom: 4px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.desktop-main-menu ul > li:hover > a,
.desktop-main-menu ul > li:focus-within > a { color: var(--primary-color); background: #f8fafc; }
.desktop-main-menu ul > li:hover > a::after,
.desktop-main-menu ul > li:focus-within > a::after { transform: scaleX(1); }
.desktop-main-menu ul > li.menu-item-has-children > a::before {
    content: '';
    order: 3;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    opacity: 0.55;
}

.desktop-main-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-top: 3px solid var(--accent-color);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(36, 45, 60, 0.14);
    padding: 8px;
    z-index: 300;
    flex-direction: column;
    gap: 2px;
    margin-top: 14px;
    animation: kn-submenu-in 0.2s ease;
}
@keyframes kn-submenu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.desktop-main-menu ul > li:hover > .sub-menu,
.desktop-main-menu ul > li:focus-within > .sub-menu {
    display: flex;
}
.desktop-main-menu .sub-menu li {
    width: 100%;
}
.desktop-main-menu .sub-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s;
}
.desktop-main-menu .sub-menu a:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

/* زیرمنوی تو در تو (سطح سوم) اگر وجود داشته باشد */
.desktop-main-menu .sub-menu .sub-menu {
    top: 0;
    right: 100%;
    margin-top: 0;
    margin-right: 8px;
}

/* =========================================
   منوی موبایل (Off-canvas Panel) - جایگزین دراپ‌داون قدیمی
========================================= */
.kn-mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1300;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.kn-mobile-nav-overlay.is-active { opacity: 1; visibility: visible; }

.kn-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 82%;
    max-width: 340px;
    background: #fff;
    z-index: 1400;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.18);
}
.kn-mobile-nav.is-active { transform: translateX(0); }

.kn-mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--primary-color);
    color: #fff;
    flex-shrink: 0;
}
.kn-mobile-nav-title { font-size: 15px; font-weight: 800; }
.kn-mobile-nav-close {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.kn-mobile-nav-close:hover { background: rgba(255,255,255,0.3); }

.kn-mobile-nav-body { flex: 1; overflow-y: auto; padding: 6px 0 20px; }

.kn-mobile-nav-list { list-style: none; margin: 0; padding: 0; }
.kn-mobile-nav-list li { border-bottom: 1px solid #f8fafc; }
.kn-mobile-nav-list > li > a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 15px 20px;
    font-size: 14px; font-weight: 700; color: var(--text-main);
    transition: color 0.2s, background 0.2s;
}
.kn-mobile-nav-list > li > a:hover,
.kn-mobile-nav-list > li > a:active { color: var(--accent-color); background: #f8fafc; }
.kn-mobile-nav-list li.menu-item-has-children > a .kn-submenu-arrow {
    width: 8px; height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s;
    opacity: 0.55;
    flex-shrink: 0;
}
.kn-mobile-nav-list li.menu-item-has-children.is-open > a .kn-submenu-arrow { transform: rotate(-135deg); }

.kn-mobile-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: #f8fafc;
    transition: max-height 0.3s ease;
}
.kn-mobile-nav-list li.is-open > .sub-menu { max-height: 900px; }
.kn-mobile-nav-list .sub-menu a {
    display: block;
    padding: 12px 20px;
    padding-right: 34px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}
.kn-mobile-nav-list .sub-menu a:hover { color: var(--primary-color); }

.kn-mobile-nav-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.kn-mobile-contact { display: block; font-size: 12px; color: var(--text-muted); text-align: center; }

body.kn-mobile-nav-open { overflow: hidden; }
/* =========================================
   دسته‌بندی‌ها
========================================= */
.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);}
.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: #64748b; 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(--accent-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(0,0,0,0.08); border-color: #e2e8f0; z-index: 10; }
.product-image { width: 100%; height: 140px; 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.1); }
.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; }
.product-price { font-size: 14px; font-weight: 800; color: var(--primary-color); }
.add-to-cart-btn { background-color: #f1f5f9; color: var(--primary-color); border: none; padding: 10px; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; width: 100%; font-family: inherit; text-align: center; display: block; transition: all 0.3s; }
.product-card:hover .add-to-cart-btn { background: var(--primary-color); color: #fff; }

/* =========================================
   نوار ویژگی‌های اعتماد (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);}
.trust-text { font-size: 11px; font-weight: 800; color: var(--text-main);}

/* =========================================
   پاورقی (Footer)
========================================= */
.site-footer { background-color: #ffffff; padding: 30px 20px 20px;}
.footer-widgets { display: grid; grid-template-columns: 1fr; gap: 25px; margin-bottom: 20px; }
.footer-widget h4 { color: var(--primary-color); font-size: 15px; font-weight: 800; margin-bottom: 12px; border-bottom: 2px solid var(--accent-color); display: inline-block; padding-bottom: 5px; }
.footer-widget p { font-size: 12px; color: var(--text-muted); line-height: 1.8; 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: 12px; 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: 11px; color: #94a3b8; }

/* =========================================
   نوار ناوبری پایین (موبایل)
========================================= */
.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; }
.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(--accent-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; text-justify: inter-word; }

.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(--accent-color); }
.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; text-justify: inter-word; }

/* =========================================
   صفحه فروشگاه (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; }
.disabled-btn:hover { background: #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::before, .related-products-section ul.products::after { display: none !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(0,0,0,0.08); border-color: #e2e8f0; z-index: 10; }
.related-products-section ul.products li.product img { width: 100%; height: 140px; 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.1); }
.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; }

/* =========================================
   سبد خرید دسکتاپ و چسبان موبایل
========================================= */
.desktop-cart-form { display: none; }
.sticky-mobile-cart-bar { position: fixed; bottom: 0; width: 100%; max-width: 420px; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px); border-top: 1px solid #f1f5f9; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; z-index: 1001; box-shadow: 0 -5px 25px rgba(0,0,0,0.08); }
.sticky-price-info { display: flex; flex-direction: column; flex-shrink: 1; overflow: hidden;}
.st-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; white-space: nowrap;}
.st-price { font-size: 15px; font-weight: 800; color: var(--primary-color); white-space: nowrap;} 
.sticky-btn-wrapper { flex-shrink: 0; }
.sticky-btn-wrapper form.cart { display: flex; margin: 0; }
.sticky-btn-wrapper .quantity { display: none; }
.sticky-btn-wrapper button.single_add_to_cart_button { background: var(--primary-color); color: #fff; border: none; padding: 12px 15px; border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 4px 15px rgba(156, 20, 189, 0.2); white-space: nowrap; }

/* =========================================
   ووکامرس و پرداخت
========================================= */
.woocommerce { padding: 20px 15px; background: transparent; border-radius: 0; margin: 0; box-shadow: none; }
.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; }
.woocommerce-checkout #place_order, .woocommerce-cart .checkout-button { background: #10b981; color: #fff; padding: 16px; font-size: 16px; font-weight: 800; border-radius: 12px; width: 100%; border: none; cursor: pointer; margin-top: 20px; font-family: inherit; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); transition: transform 0.3s; }
.woocommerce-checkout #place_order:hover, .woocommerce-cart .checkout-button:hover { transform: translateY(-2px); }

/* =========================================
   تنظیمات دسکتاپ
========================================= */
@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; }
    .sticky-mobile-cart-bar { display: none; }
    
    /* در دسکتاپ، منوی کشویی موبایل و دکمه همبرگری کاملاً غیرفعال می‌شوند */
    .kn-menu-toggle,
    .kn-mobile-nav,
    .kn-mobile-nav-overlay { display: none !important; }

    .site-header { padding: 0 5%; border-bottom: 1px solid #e2e8f0; }
    .site-header-inner { display: flex; flex-direction: row; align-items: center; gap: 25px; max-width: 1400px; margin: 0 auto; padding: 14px 0; }
    .header-top { display: contents; }
    .logo { order: 1; font-size: 24px; flex-shrink: 0; }
    .site-logo-img,
    .logo .custom-logo-link img,
    .logo img.custom-logo { height: 44px !important; max-width: 200px !important; }
    .site-logo-text { font-size: 17px; }
    .desktop-main-menu { display: block; order: 2; margin: 0 0 0 auto; padding: 0; border: none; flex-shrink: 0; }
    .desktop-main-menu ul { justify-content: flex-start; padding-right: 25px; gap: 4px; }
    .search-box { order: 3; margin: 0; width: 280px; max-width: 100%; }
    .cart-icon-wrapper { order: 4; flex-shrink: 0; }
    
    .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 { padding: 10px 3% 60px 3%; width: 100%;}
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; gap: 30px; }
    .product-image { height: 260px; 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 5% 20px 5%; border-radius: 0; }
    .footer-widgets, .footer-bottom { max-width: 1400px; margin-left: auto; margin-right: auto; }
    .footer-widgets { grid-template-columns: repeat(3, 1fr); gap: 40px; }

    .single-product-page { display: block; padding: 0; background: var(--bg-color); }
    .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 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; gap: 30px !important; }
    .related-products-section ul.products li.product img { height: 260px; 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; }

    .desktop-cart-form { display: block; margin-top: 30px;}
    .desktop-cart-form form.cart { display: flex; gap: 15px; align-items: center; }
    .desktop-cart-form .quantity input { width: 70px; padding: 12px; border: 2px solid #f1f5f9; border-radius: 10px; text-align: center; font-family: inherit; font-weight: bold; }
    .desktop-cart-form button { background: var(--primary-color); color: #fff; border: none; padding: 14px 40px; border-radius: 12px; font-family: inherit; font-weight: 800; cursor: pointer; font-size: 16px; transition: all 0.3s; }
    .desktop-cart-form button:hover { background: var(--accent-color); transform: translateY(-2px); }
    
    .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: 100%; margin-left: 0; margin-right: 0; }
    .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: #9c14bd !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: #64748b !important;
    font-weight: 400;
}

/* =========================================
   بازطراحی دکمه افزودن به سبد خرید (UX استاندارد)
========================================= */
.product-card .add-to-cart-btn {
    background-color: #da21fc !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: #9c14bd !important; /* تغییر به سرمه‌ای تیره در حالت هاور */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(218, 33, 252, 0.2);
}

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

/* استایل کپسول قرمز رنگ درصد تخفیف */
.dk-discount-badge {
    background-color: #DD0A18 !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;
}

/* اصلاح حاشیه پایین تگ del که قبلاً داده بودیم (چون الان داخل ردیف قرار گرفته) */
.product-price-box del,
.single-product-price del,
.related-products-section ul.products li.product .price del {
    margin-bottom: 0 !important; 
}

/* =========================================
   اصلاح بج تخفیف در «محصولات مرتبط» (هماهنگ با بج قرمز فروشگاه)
   + اصلاح طراز‌بندی کارت‌ها هنگام وجود/عدم وجود تخفیف
========================================= */

/* بج پیش‌فرض ووکامرس (onsale) را با استایل بج قرمز فروشگاه یکسان می‌کنیم */
.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;
}

/* ارتفاع ثابت برای باکس قیمت، تا کارت تخفیف‌دار (۲ خط) و بدون‌تخفیف (۱ خط) هم‌تراز بمانند */
.related-products-section ul.products li.product .price {
    min-height: 40px;
}

/* همین اصلاح را برای گرید محصولات صفحه اصلی/فروشگاه هم اعمال می‌کنیم تا کل سایت یکدست باشد */
.products-grid .product-price-box,
.product-card .product-price-box {
    min-height: 40px;
    display: flex;
    align-items: center;
}

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

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

/* رسپانسیو دسکتاپ: قرار دادن قیمت و دکمه دقیقاً در یک خط */
@media (min-width: 768px) {
    .product-action-box {
        display: flex;
        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 .desktop-cart-form {
        margin-top: 0 !important;
    }
}
/* =========================================
   اصلاح فرم افزودن به سبد خرید و فیلد تعداد
========================================= */

/* تنظیم چیدمان کلی فرم (قرارگیری دکمه و تعداد در یک خط) */
.product-action-box .desktop-cart-form form.cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

/* 1. اضافه کردن کلمه «تعداد:» با استفاده از CSS */
.product-action-box .desktop-cart-form .quantity {
    display: flex;
    align-items: center;
    margin: 0;
}

.product-action-box .desktop-cart-form .quantity::before {
    content: 'تعداد:';
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-left: 10px;
}

/* 2. استایل باکس عدد (زیباسازی و فارسی کردن اعداد) */
.product-action-box .desktop-cart-form .quantity input.qty {
    width: 60px;
    height: 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    /* اعمال فونت قالب که دارای اعداد فارسی است (FaNum) */
    font-family: 'IRANSans', Tahoma, sans-serif !important; 
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
    background: #ffffff;
    padding: 0;
    transition: border-color 0.3s;
}

.product-action-box .desktop-cart-form .quantity input.qty:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* مخفی کردن فلش‌های بالا/پایین پیش‌فرض مرورگر برای زیبایی و مدرن شدن باکس */
.product-action-box .desktop-cart-form .quantity input[type="number"]::-webkit-inner-spin-button,
.product-action-box .desktop-cart-form .quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.product-action-box .desktop-cart-form .quantity input[type="number"] {
    -moz-appearance: textfield;
}

/* 3. اصلاح رنگ و ظاهر دکمه اصلی افزودن به سبد خرید */
.product-action-box .desktop-cart-form button.single_add_to_cart_button {
    background-color: var(--accent-color) !important; /* رنگ آبی برند */
    color: #ffffff !important;
    border: none;
    padding: 0 25px;
    height: 45px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(218, 33, 252, 0.25); /* سایه همرنگ دکمه */
}

/* افکت جذاب هنگام رفتن موس روی دکمه (تغییر به رنگ سرمه‌ای تیره) */
.product-action-box .desktop-cart-form button.single_add_to_cart_button:hover {
    background-color: var(--primary-color) !important; 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 45, 60, 0.2);
}

/* =========================================
   استایل‌های اختصاصی باکس جستجوی زنده (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(218, 33, 252, 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: #9c14bd; /* سرمه‌ای تیره برند شما */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* استایل‌دهی به بخش قیمت داخل سرچ (سازگار با تابع فارسی‌ساز شما) */
.ajax-search-price {
    font-size: 12px;
    font-weight: 800;
    color: #da21fc; /* آبی دقیق برند */
}
.ajax-search-price del {
    font-size: 10px !important;
    color: #a1a3a8 !important;
    margin-left: 5px;
}
.ajax-search-price ins {
    text-decoration: none;
    color: #DD0A18 !important; /* قیمت جدید قرمز */
}

/* باکس وضعیت‌ها (درحال لود / بدون نتیجه) */
.search-loading, .ajax-search-no-result {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
}

.search-loading {
    color: #da21fc;
}

/* دکمه انتقال به صفحه آرشیو کامل جستجو */
.ajax-search-view-all {
    background: #f8fafc;
    color: #da21fc;
    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: #da21fc;
    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;
    }
}

/* =========================================
   استایل اختصاصی و مدرن بخش نظرات و دیدگاه‌ها (وبلاگ و ووکامرس)
========================================= */
.product-reviews-flat-section, .post-comments-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin: 25px 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: right;
    direction: rtl;
}

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

/* راست‌چین کردن اجباری ووکامرس */
#reviews {
    text-align: right;
    direction: rtl;
}

/* عنوان بخش نظرات */
#comments-title, .comment-reply-title, h2.woocommerce-Reviews-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
    margin-bottom: 25px !important;
    line-height: 1.8 !important;
    display: block;
}

/* -------------------------------------
   ۱. لیست کامنت‌های ثبت شده
------------------------------------- */
.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;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !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;
    padding: 2px !important;
    margin: 0 !important;
    position: static !important;
    float: none !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: #ffb100 !important;
}
.commentlist li.review .star-rating span::before {
    color: #ffb100 !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: #ffb100 !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(--accent-color) !important;
    background: #ffffff !important;
}

/* دکمه ارسال دیدگاه */
.form-submit {
    margin-bottom: 0 !important;
}

.form-submit input[type="submit"], #commentform #submit {
    background: var(--accent-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;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(218, 33, 252, 0.2) !important;
    margin-top: 10px !important;
}

.form-submit input[type="submit"]:hover, #commentform #submit:hover {
    background: var(--primary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(36, 45, 60, 0.2) !important;
}

/* مخفی کردن چک‌باکس ذخیره نام در مرورگر */
.comment-form-cookies-consent {
    display: none !important;
}
/* =========================================================================
   بخش: استایل صفحه سبد خرید کارت‌محور (Mobile-First)
   محل HTML مرتبط: woocommerce/cart/cart.php
   نکته: این بخش قبلاً نوشته نشده بود و به همین دلیل صفحه سبد خرید با
   ظاهر پیش‌فرض و خام ووکامرس نمایش داده می‌شد، نه طراحی کارتی این قالب.
   تمام رنگ‌ها از متغیرهای موجود در ابتدای همین فایل گرفته شده‌اند تا با
   هویت بصری فروشگاه (سرمه‌ای/آبی) هماهنگ بمانند.
========================================================================= */

.copify-cart-page {
    padding: 0 15px 30px;
}

.copify-cart-page .breadcrumb-container {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.copify-cart-page .breadcrumb-container a {
    color: var(--text-muted);
}
.copify-cart-page .breadcrumb-container a:hover {
    color: var(--primary-color);
}

.cart-page-header {
    margin-bottom: 16px;
}
.cart-page-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-page-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 999px;
}

.cart-page-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cart-item-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

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

.cart-item-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}
.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}
.cart-item-title a {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-item-title a:hover {
    color: var(--primary-color);
}
.cart-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.cart-item-remove {
    flex-shrink: 0;
}
.cart-item-remove .remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--brand-red);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.25s;
}
.cart-item-remove .remove:hover {
    background: var(--brand-red);
    color: #fff;
}

.cart-item-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #eef1f4;
}

.cart-item-price-block,
.cart-item-qty-block,
.cart-item-subtotal-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-block-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
}
.cart-item-block-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}
.cart-item-subtotal {
    color: var(--primary-color) !important;
}

.cart-item-qty-block .quantity {
    display: flex;
}
.cart-item-qty-block .qty {
    width: 56px;
    height: 30px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-main);
}

.cart-page-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-coupon-box {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 14px;
}
.cart-coupon-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}
.cart-coupon-inputs {
    display: flex;
    gap: 8px;
}
.cart-coupon-inputs .input-text {
    flex: 1;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-main);
}

.cart-btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 12px;
    border-radius: 10px;
    padding: 0 16px;
    height: 38px;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
}
.cart-btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.cart-btn-secondary {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: var(--text-main);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.25s;
}
.cart-btn-secondary:hover {
    background: #e2e8f0;
}

.cart-continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 14px;
}
.cart-continue-shopping .rtl-mirror {
    display: inline-block;
    transform: scaleX(-1);
}

.cart-summary-column {
    width: 100%;
}
.cart-summary-sticky {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}
.cart_totals h2 {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 14px;
}

.cart_totals table.shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.cart_totals table.shop_table tr {
    border-bottom: 1px solid #f1f5f9;
}
.cart_totals table.shop_table tr:last-child {
    border-bottom: none;
}
.cart_totals table.shop_table th,
.cart_totals table.shop_table td {
    padding: 10px 0;
    text-align: right;
    font-weight: 600;
    color: var(--text-main);
    vertical-align: top;
}
.cart_totals table.shop_table th {
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.cart_totals tr.order-total th,
.cart_totals tr.order-total td {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-color);
}

.copify-shipping-methods {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
}
.copify-shipping-method-item {
    font-size: 12px;
}
.copify-shipping-destination {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.copify-shipping-calc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent-color);
}
.copify-shipping-calc-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eef1f4;
}
.copify-shipping-calc-form .form-row {
    margin-bottom: 10px;
}
.copify-shipping-calc-form label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}
.copify-shipping-calc-form select,
.copify-shipping-calc-form input.input-text {
    width: 100%;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-main);
}
.copify-shipping-calc-submit {
    margin-top: 4px;
}

.wc-proceed-to-checkout {
    margin-top: 16px;
}
.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    transition: background 0.25s;
}
.cart-checkout-btn:hover {
    background: var(--accent-color);
    color: #fff;
}
.cart-checkout-btn .rtl-mirror {
    display: inline-block;
    transform: scaleX(-1);
}

/* رفع باگ: این بریک‌پوینت قبلاً 900px بود در حالی که چک‌اوت و حساب کاربری
   از 992px استفاده می‌کردند؛ اکنون هر سه صفحه دقیقاً در یک عرض یکسان به
   حالت دو ستونه دسکتاپ سوییچ می‌کنند. */
@media (min-width: 992px) {
    .cart-page-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 28px;
    }
    .cart-items-column {
        flex: 1 1 auto;
        min-width: 0;
    }
    .cart-summary-column {
        flex: 0 0 320px;
        position: sticky;
        top: 20px;
    }
    .cart-item-top-row {
        align-items: center;
    }
}

/* =========================================================================
   بخش: صفحه «تشکر از خرید / پرداخت موفق» (thankyou.php)
   نکته رفع باگ: این صفحه که مهم‌ترین لحظه‌ی اعتمادسازی بعد از خرید فیزیکی
   است، تا این نسخه هیچ CSSای نداشت و کاملاً خام/بی‌ظاهر نمایش داده می‌شد.
   کلاس‌های konkur-thankyou-* (وقتی سفارش موجود است) و copify-thankyou-*
   (فایل fallback در order-received.php برای وقتی سفارش شناسایی نشود) هر دو
   اینجا پوشش داده شده‌اند تا هر دو حالت یک ظاهر یکسان و حرفه‌ای داشته باشند.
========================================================================= */
.konkur-thankyou-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 20px 100px;
    text-align: center;
}

.konkur-thankyou-icon,
.copify-thankyou-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}
.konkur-thankyou-icon-error {
    background: rgba(221, 10, 24, 0.1);
    color: var(--brand-red);
}

.konkur-thankyou-title {
    font-size: 19px;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.6;
}
.konkur-thankyou-title-error { color: var(--brand-red); }

.konkur-thankyou-desc,
.copify-thankyou-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 24px;
    /* بازنویسی استایل پیش‌فرض نوتیس ووکامرس (که در order-received.php هم‌زمان
       با copify-thankyou-desc چاپ می‌شود) تا با طراحی کارتی قالب هماهنگ شود */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.konkur-order-summary-card {
    background: var(--card-bg);
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    text-align: right;
}
.konkur-order-overview {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.konkur-order-overview li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #eef1f4;
    font-size: 13px;
    color: var(--text-main);
}
.konkur-order-overview li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.konkur-order-overview li strong {
    font-weight: 800;
    color: var(--primary-color);
}
.konkur-order-overview .woocommerce-order-overview__total strong {
    color: var(--brand-red);
}
.konkur-overview-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.konkur-thankyou-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.konkur-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s;
}
.konkur-btn-primary {
    background: var(--primary-color);
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(36,45,60,0.25);
}
.konkur-btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}
/* دکمه‌های ثانویه (پیگیری سفارش/پشتیبانی) از کلاس عمومی cart-btn-outline
   استفاده می‌کنند که در بخش سبد خرید تعریف شده؛ اینجا فقط ارتفاع را با
   دکمه اصلی هم‌تراز می‌کنیم */
.konkur-thankyou-actions .cart-btn-outline {
    width: 100%;
    height: 48px;
}
.konkur-support-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

@media (min-width: 480px) {
    .konkur-thankyou-actions { flex-direction: row; flex-wrap: wrap; }
    .konkur-thankyou-actions .konkur-btn,
    .konkur-thankyou-actions .cart-btn-outline { flex: 1 1 auto; min-width: 140px; }
}

/* =========================================================================
   بخش: حالت «سبد خرید خالی» (کلاس‌های واقعی cart-empty.php که فراموش شده بود)
========================================================================= */
.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 500px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}
.cart-empty-icon {
    font-size: 46px;
    margin-bottom: 14px;
}
.cart-empty-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}
.cart-empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* بهبودهای اضافه‌ی سبد خرید (برگرفته از نسخه بهتر/کامل‌تر همین کلاس‌ها) */
.cart-item-card {
    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-remove .remove:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}
.cart-item-qty-block .qty:focus {
    border-color: var(--primary-color);
    outline: none;
}
.cart-btn-outline:focus-visible,
.cart-btn-secondary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
@media (min-width: 992px) {
    body.admin-bar .cart-summary-column {
        top: 132px;
    }
}


/* =========================================================================
   بخش: صفحه چک‌اوت (Checkout) — با پالت رنگی بامیزبان آی‌تی
   منبع کلاس‌ها: خروجی واقعی فایل‌های woocommerce/checkout/*.php این قالب
   (که برخی‌شان به‌اشتباه هنوز پیشوند konkur- دارند، ولی چون در HTML واقعی
   همین کلاس‌ها چاپ می‌شوند، همان‌ها استایل‌دهی شده‌اند)
========================================================================= */

.copify-checkout-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 15px 100px;
}

.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: 18px;
    font-weight: 900;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.copify-checkout-back-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    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,
.konkur-section-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}
.copify-section-title svg,
.konkur-section-title svg { flex-shrink: 0; }

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

/* گرید فیلدهای فرم (صورتحساب) */
.konkur-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 15px;
}
.konkur-fields-grid .form-row-first,
.konkur-fields-grid .form-row-last {
    grid-column: span 1;
}
.konkur-fields-grid .form-row-wide {
    grid-column: 1 / -1;
}
.konkur-fields-grid .form-row label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}
.konkur-fields-grid .input-text,
.konkur-fields-grid select {
    width: 100%;
    height: 42px;
    border: 2px solid #f1f5f9;
    border-radius: 10px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 13px;
    background: var(--bg-color);
    color: var(--text-main);
}
.konkur-fields-grid .input-text:focus,
.konkur-fields-grid select:focus {
    border-color: var(--primary-color);
    background: #fff;
    outline: none;
}

.konkur-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;
}
.konkur-create-account-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

/* --- کارت خلاصه سفارش --- */
.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: 14px;
    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; }

.konkur-review-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.konkur-review-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f1f5f9;
}
.konkur-review-item:last-child { border-bottom: none; padding-bottom: 0; }
.konkur-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;
}
.konkur-review-item-thumb img { width: 100%; height: 100%; object-fit: contain; }
.konkur-review-item-info { flex: 1; min-width: 0; }
.konkur-review-item-title { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-main); line-height: 1.6; }
.konkur-review-item-title a { color: inherit; }
.konkur-review-item-qty { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.konkur-review-item-subtotal { font-size: 13px; font-weight: 800; color: var(--primary-color); white-space: nowrap; flex-shrink: 0; }

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

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

/* --- روش‌های پرداخت (کارت‌های رادیویی) --- */
.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(36, 45, 60, 0.03);
    box-shadow: 0 4px 15px rgba(36,45,60,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: 13px;
    font-weight: 800;
    color: var(--text-main);
}
.copify-payment-method-name { line-height: 1.6; }
.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: 12px;
    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;
    /* رفع باگ: قبلاً max-width نداشت، به همین دلیل روی هر عرضی بزرگ‌تر از
       420px (که کل سایت داخل قاب موبایل .mobile-app-container محدود شده)
       این نوار به لبه‌های واقعی مرورگر می‌چسبید، نه به لبه‌های همان قاب؛
       در نتیجه نسبت به بقیه محتوای صفحه تراز نبود و انگار جای درستی
       نداشت. حالا دقیقاً مثل .sticky-mobile-cart-bar و .bottom-nav به
       عرض قاب موبایل محدود و در مرکز صفحه قرار می‌گیرد. */
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    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: 15.5px; 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(--primary-color) !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(36,45,60,0.25);
    transition: all .25s;
    white-space: nowrap;
    font-family: inherit;
}
.copify-place-order-btn:hover { background: var(--accent-color) !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: 11px; color: var(--text-muted);
    margin: 12px 0 90px;
    justify-content: center;
}

/* --- سایدبار خلاصه سفارش چسبان در دسکتاپ --- */
@media (min-width: 992px) {
    .copify-checkout-page { padding: 30px 5% 100px; }
    .copify-checkout-layout { grid-template-columns: 1fr 380px; gap: 30px; }
    .checkout-col-main { order: 1; }
    .checkout-col-summary { order: 2; }
    .copify-summary-sticky { position: sticky; top: 100px; }
}
body.admin-bar .copify-summary-sticky { top: 132px; }

/* رفع باگ: در دسکتاپ (چیدمان دوستونه چک‌اوت) چسباندن نوار پرداخت به پایین
   کل پنجره مرورگر معنا ندارد و باعث می‌شد دکمه ثبت سفارش خارج از قاب و
   بدون تراز با فرم بالای خودش دیده شود. از ۷۶۸px به بعد این نوار از حالت
   fixed خارج شده و مثل بقیه‌ی عناصر داخل کارت پرداخت در محل طبیعی خودش
   قرار می‌گیرد (دقیقاً مانند .desktop-cart-form در صفحه محصول). */
@media (min-width: 768px) {
    .copify-place-order-sticky {
        position: static;
        width: auto;
        max-width: none;
        margin: 20px 0 0;
        padding: 20px 0 0;
        border-top: 1px dashed #e2e8f0;
        box-shadow: none;
        flex-wrap: wrap;
    }
    .copify-secure-payment-note { margin-bottom: 0; }
}

/* =========================================================================
   بخش: تکمیل ناهماهنگی نام‌گذاری کلاس‌ها بین فایل‌های چک‌اوت
   (form-billing.php از پیشوند konkur- و form-shipping.php از پیشوند
   copify- برای همان ساختار استفاده می‌کنند؛ هر دو اینجا پوشش داده شدند)
========================================================================= */
.copify-fields-grid { display: grid; grid-template-columns: 1fr; gap: 0 15px; }
.copify-fields-grid .form-row-wide { grid-column: 1 / -1; }
.copify-fields-grid .form-row label {
    display: block; font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 6px;
}
.copify-fields-grid .input-text,
.copify-fields-grid select {
    width: 100%; height: 42px; border: 2px solid #f1f5f9; border-radius: 10px;
    padding: 0 12px; font-family: inherit; font-size: 13px; background: var(--bg-color); color: var(--text-main);
}
.copify-fields-grid .input-text:focus,
.copify-fields-grid select:focus { border-color: var(--primary-color); background: #fff; outline: none; }

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

.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;
}

/* --- کارت کد تخفیف در چک‌اوت (form-coupon.php) --- */
.copify-coupon-wrapper { margin-top: 4px; margin-bottom: 16px; }
.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.input-text {
    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.input-text:focus { border-color: var(--primary-color); outline: none; background: #fff; }

/* --- کارت ورود مشتری قبلی در چک‌اوت (form-login.php) --- */
.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-btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--primary-color); color: #fff !important;
    border: none; padding: 12px 22px; border-radius: 10px;
    font-weight: 800; font-size: 13px; cursor: pointer; text-decoration: none;
    transition: all .25s; font-family: inherit;
}
.copify-btn-primary:hover { background: var(--accent-color); color: #fff !important; }

.copify-form-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.copify-field-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* حالت خالی عمومی (دانلودها، سفارش‌ها، روش‌های پرداخت) */
.copify-account-empty-state {
    text-align: center; padding: 50px 20px; background: var(--card-bg);
    border: 1px solid #f1f5f9; border-radius: 18px; box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-account-empty-icon { font-size: 42px; margin-bottom: 12px; }
.copify-account-empty-state p { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }

/* =========================================================================
   بخش: چیدمان اصلی حساب کاربری (my-account.php)
========================================================================= */
.copify-account-page { max-width: 1300px; margin: 0 auto; padding: 15px 15px 60px; }

.copify-account-layout { display: flex; flex-direction: column; gap: 18px; }

.copify-account-sidebar { width: 100%; }
.copify-account-sidebar-sticky {
    background: var(--card-bg); border: 1px solid #f1f5f9; border-radius: 18px;
    padding: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-account-user-card {
    display: flex; align-items: center; gap: 12px; padding-bottom: 14px;
    margin-bottom: 14px; border-bottom: 1px dashed #e2e8f0;
}
.copify-account-user-info { flex: 1; min-width: 0; }
.copify-account-user-name { display: block; font-size: 14px; font-weight: 800; color: var(--text-main); }
.copify-account-user-label { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.copify-account-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.copify-account-nav-item a {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
    font-size: 13px; font-weight: 700; color: var(--text-main); transition: all .2s;
}
.copify-account-nav-item a:hover { background: var(--bg-color); color: var(--primary-color); }
.copify-account-nav-item.is-active a,
.copify-account-nav-item.woocommerce-MyAccount-navigation-link--dashboard.is-active a {
    background: var(--primary-color); color: #fff;
}
.copify-account-nav-icon { flex-shrink: 0; display: flex; }
.copify-account-nav-text { flex: 1; }

.copify-account-content { flex: 1; min-width: 0; }
.copify-account-heading { font-size: 17px; font-weight: 900; color: var(--text-main); margin-bottom: 6px; }
.copify-account-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.9; }

/* --- داشبورد --- */
.copify-dashboard-welcome { font-size: 14px; color: var(--text-main); margin-bottom: 18px; }
.copify-dashboard-notyou { font-size: 12px; color: var(--text-muted); }
.copify-dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.copify-dashboard-card {
    background: var(--card-bg); border: 1px solid #f1f5f9; border-radius: 16px; padding: 16px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: all .25s;
}
.copify-dashboard-card:hover { border-color: var(--primary-color); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.copify-dashboard-card-icon {
    width: 40px; height: 40px; border-radius: 10px; background: var(--bg-color);
    display: flex; align-items: center; justify-content: center; color: var(--primary-color);
}

/* --- سفارش‌ها (لیست کارتی) --- */
.copify-orders-list { display: flex; flex-direction: column; gap: 12px; }
.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);
}
.copify-order-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.copify-order-card-id { display: flex; flex-direction: column; gap: 2px; }
.copify-order-card-label { font-size: 10.5px; color: var(--text-muted); font-weight: 700; }
.copify-order-card-number { font-size: 14px; font-weight: 800; color: var(--text-main); }
.copify-order-status-badge {
    font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 20px;
    background: var(--bg-color); color: var(--text-muted); white-space: nowrap;
}
.copify-order-status-badge.completed,
.copify-order-status-badge.processing { background: rgba(16,185,129,0.12); color: #059669; }
.copify-order-status-badge.on-hold,
.copify-order-status-badge.pending { background: rgba(245,158,11,0.12); color: #b45309; }
.copify-order-status-badge.cancelled,
.copify-order-status-badge.failed,
.copify-order-status-badge.refunded { background: rgba(221,10,24,0.1); color: var(--brand-red); }

.copify-order-card-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.copify-order-card-extra { margin-bottom: 10px; }
.copify-order-card-bottom {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding-top: 10px; border-top: 1px dashed #eef1f4;
}
.copify-order-card-total { font-size: 14px; font-weight: 800; color: var(--primary-color); }
.copify-order-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copify-order-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 700;
    background: var(--bg-color); color: var(--primary-color); text-decoration: none; transition: all .2s;
}
.copify-order-action-btn:hover { background: var(--primary-color); color: #fff; }
.copify-orders-pagination { margin-top: 16px; text-align: center; }

/* --- جزئیات یک سفارش (view-order.php) --- */
.copify-order-view-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.copify-order-view-summary { font-size: 13px; color: var(--text-muted); }
.copify-order-details-wrap {
    background: var(--card-bg); border: 1px solid #f1f5f9; border-radius: 16px; padding: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 18px;
}
.copify-order-updates-section { margin-top: 18px; }
.copify-order-updates-title { font-size: 14px; font-weight: 800; color: var(--primary-color); margin-bottom: 12px; }
.copify-order-updates-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.copify-order-update-item { display: flex; gap: 10px; }
.copify-order-update-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); margin-top: 6px; flex-shrink: 0; }
.copify-order-update-content { flex: 1; background: var(--bg-color); border-radius: 12px; padding: 10px 14px; }
.copify-order-update-date { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.copify-order-update-text { font-size: 12.5px; color: var(--text-main); line-height: 1.8; }

/* --- آدرس‌ها --- */
.copify-address-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.copify-address-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);
}
.copify-address-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.copify-address-card-header { font-size: 14px; font-weight: 800; color: var(--primary-color); }
.copify-address-edit-link { font-size: 12px; font-weight: 700; color: var(--accent-color); }
.copify-address-card-body { font-size: 13px; color: var(--text-main); line-height: 2; }

/* --- دانلودها --- */
.copify-downloads-list-simple,
.copify-downloads-wrap ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.copify-download-item-simple {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--card-bg); border: 1px solid #f1f5f9; border-radius: 12px; padding: 12px 16px;
}
.copify-download-link { color: var(--primary-color); font-weight: 700; font-size: 13px; }
.copify-download-count { font-size: 11px; color: var(--text-muted); background: var(--bg-color); padding: 3px 10px; border-radius: 20px; }

/* --- روش‌های پرداخت ذخیره‌شده --- */
.copify-payment-methods-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.copify-payment-method-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--card-bg); border: 1px solid #f1f5f9; border-radius: 14px; padding: 14px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.copify-payment-method-icon { width: 40px; flex-shrink: 0; }
.copify-payment-method-info { flex: 1; min-width: 0; }
.copify-payment-method-expiry { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.copify-payment-method-default-badge {
    font-size: 10.5px; font-weight: 800; background: var(--bg-color); color: var(--primary-color);
    padding: 3px 10px; border-radius: 20px;
}
.copify-payment-method-actions { display: flex; gap: 6px; }
.copify-payment-add-btn { margin-top: 6px; }

/* =========================================================================
   بخش: صفحات ورود / ثبت‌نام / بازیابی رمز عبور
========================================================================= */
.copify-auth-page { max-width: 900px; margin: 0 auto; padding: 30px 15px 60px; }
.copify-auth-single { max-width: 460px; }
.copify-auth-columns { display: flex; flex-direction: column; gap: 20px; }
.copify-auth-col { flex: 1; min-width: 0; }
.copify-auth-card {
    background: var(--card-bg); border: 1px solid #f1f5f9; border-radius: 18px; padding: 22px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}
.copify-auth-row.form-row { margin-bottom: 14px; }
.copify-auth-row label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.copify-auth-submit { width: 100%; margin-top: 6px; }
.copify-remember-me { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); margin: 10px 0; }
.copify-lost-password-link { font-size: 12px; color: var(--primary-color); font-weight: 700; }
.copify-auth-divider { text-align: center; color: var(--text-muted); font-size: 12px; margin: 20px 0; position: relative; }

.copify-account-empty-state.copify-auth-confirmation { max-width: 460px; margin: 0 auto; }

/* =========================================================================
   بخش: مینی‌کارت (سبد خرید بازشو در هدر)
========================================================================= */
.copify-mini-cart { padding: 14px; width: 300px; max-width: 90vw; }
.copify-mini-cart-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; }
.copify-mini-cart-item { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed #f1f5f9; }
.copify-mini-cart-thumb { width: 46px; height: 46px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--bg-color); }
.copify-mini-cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.copify-mini-cart-info { flex: 1; min-width: 0; }
.copify-mini-cart-title { font-size: 12px; font-weight: 700; color: var(--text-main); display: block; line-height: 1.5; }
.copify-mini-cart-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.copify-mini-cart-qty { color: var(--text-muted); }
.copify-mini-cart-remove { color: var(--brand-red); font-size: 15px; flex-shrink: 0; }
.copify-mini-cart-total { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--primary-color); padding-top: 10px; border-top: 1px solid #f1f5f9; margin-bottom: 12px; }
.copify-mini-cart-buttons { display: flex; flex-direction: column; gap: 8px; }
/* رفع باگ: دکمه‌های «مشاهده سبد خرید» و «تسویه حساب» داخل مینی‌کارت هدر قبلاً
   هیچ استایل دکمه‌ای نداشتند (فقط لینک خام بدون رنگ/پس‌زمینه)؛ دقیقاً همان
   لحظه‌ای که باید بیشترین نرخ کلیک را داشته باشد. */
.copify-mini-cart-buttons a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 11px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    transition: all 0.25s;
}
.copify-mini-cart-buttons a.wc-forward {
    background: #f1f5f9;
    color: var(--primary-color);
}
.copify-mini-cart-buttons a.wc-forward:hover { background: #e2e8f0; }
/* دکمه «تسویه حساب» به‌عنوان اکشن اصلی؛ هماهنگ با رنگ دکمه نهایی پرداخت
   (.copify-place-order-btn) و دکمه سبد خرید (.cart-checkout-btn) در کل سایت */
.copify-mini-cart-buttons a.checkout.wc-forward {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(36,45,60,0.25);
}
.copify-mini-cart-buttons a.checkout.wc-forward:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}
.copify-mini-cart-empty { text-align: center; padding: 20px 10px; }
.copify-mini-cart-empty-icon { font-size: 32px; margin-bottom: 8px; }

/* =========================================================================
   بخش: پیشنهاد محصولات مرتبط (Cross-sells در سبد خرید)
========================================================================= */
.copify-cross-sells { margin-top: 24px; }
.copify-cross-sells-title { font-size: 15px; font-weight: 800; color: var(--primary-color); margin-bottom: 12px; }
.copify-cross-sells-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* =========================================================================
   بخش: صفحه پرداخت سفارش (order-pay) و رسید سفارش
========================================================================= */
.copify-pay-page { padding-bottom: 100px; }
.copify-order-summary-card.copify-receipt-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); margin-bottom: 16px;
}
.copify-order-overview { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; }
.copify-order-overview li { font-size: 12.5px; color: var(--text-main); }
.copify-overview-label { display: block; font-size: 10.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 2px; }

.copify-verify-email-page { max-width: 500px; margin: 0 auto; padding: 30px 15px 60px; }
.copify-verify-email-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.9; }

/* --- دسکتاپ: سایدبار حساب کاربری کنار محتوا --- */
/* رفع باگ: هماهنگ‌سازی بریک‌پوینت با سبد خرید و چک‌اوت (992px) */
@media (min-width: 992px) {
    .copify-account-layout { flex-direction: row; align-items: flex-start; gap: 26px; }
    .copify-account-sidebar { flex: 0 0 260px; position: sticky; top: 100px; }
    .copify-address-grid { grid-template-columns: repeat(2, 1fr); }
    .copify-auth-columns { flex-direction: row; }
    .copify-dashboard-grid { grid-template-columns: repeat(3, 1fr); }
}
body.admin-bar .copify-account-sidebar { top: 132px; }