:root{
    --ink:#1c1b19;
    --paper:#f8f6f2;
    --line:#e7e2d9;
    --muted:#857f74;
    --rust:#2563EB;       /* تیره‌تر شد → کنتراست ~3.4:1 با متن سفید، مناسب دکمه */
    --rust-dark:#0F4C81;  /* برای متن/لینک روی پس‌زمینه روشن → کنتراست ~4.6:1 ✓ */
    --teal:#0F4C81;
    --teal-soft:#eaf0ef;
    --gold:#c98f3c;
    --surface:#fff;
    --radius:14px;
    color-scheme:light;
}

html[data-theme="dark"]{
    --ink:#f2f0ec;
    --paper:#15171a;
    --line:#2b2e31;
    --muted:#9a978f;
    --rust:#2fd8d8;        /* روشن‌تر شد → روی پس‌زمینه تیره کنتراست کافی */
    --rust-dark:#5ce3e3;
    --teal:#eaf0ef;
    --teal-soft:#1e2624;
    --gold:#d9a45c;
    --surface:#1e2124;
    color-scheme:dark;
}
html[data-theme="dark"] img:not([src*=".svg"]){
    filter:brightness(.92);
}
*{box-sizing:border-box;}
body{
    font-family:'Vazirmatn',sans-serif;
    background:var(--paper);
    color:var(--ink);
    font-size:15px;
}
.btn-auth-outline{
    border:1.5px solid var(--ink);
    color:var(--ink);
    border-radius:8px;
    padding:6px 16px;
    font-size:13.5px;
    font-weight:600;
    display:inline-flex;align-items:center;
    transition:.15s;
}
.btn-auth-outline:hover{background:var(--ink);color:#fff;}
.btn-auth-fill{
    background:var(--rust);
    border:1.5px solid var(--rust);
    color:#fff;
    border-radius:8px;
    padding:6px 16px;
    font-size:13.5px;
    font-weight:600;
    display:inline-flex;align-items:center;
    transition:.15s;
}
.btn-auth-fill:hover{background:var(--rust-dark);border-color:var(--rust-dark);color:#fff;}
a{text-decoration:none;}

/* ---- top bar ---- */
.topbar{
    background:var(--ink);
    color:#eee5d8;
    font-size:12.5px;
    padding:8px 44px;
    min-height:34px;
    letter-spacing:.02em;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    gap:10px;
    overflow:hidden;
}
.topbar.has-bg-image::before{
    content:'';
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.4);
    z-index:0;
}
.topbar-inner{
    position:relative;
    z-index:1;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}
.topbar-inner-linked{
    color:inherit;
    text-decoration:none;
}
.topbar-inner-linked:hover{
    text-decoration:underline;
}
.topbar-close{
    position:absolute;
    inset-inline-end:14px;
    top:50%;
    transform:translateY(-50%);
    background:transparent;
    border:0;
    color:inherit;
    opacity:.75;
    font-size:16px;
    line-height:1;
    cursor:pointer;
    padding:2px 4px;
    z-index:2;
}
.topbar-close:hover{opacity:1;}
.navbar-shop{
    background:var(--header-bg, var(--paper));
    border-bottom:1px solid var(--line);
    padding:14px 0;
}

.brand-mark .dot{
    width:9px;height:9px;border-radius:50%;background:var(--rust);
    display:inline-block;
}

.icon-btn{
    width:40px;height:40px;border-radius:50%;
    display:inline-flex;align-items:center;justify-content:center;
    border:1px solid var(--line);background:var(--surface);color:var(--ink);position:relative;
}
.icon-btn .badge-dot{
    position:absolute;top:-4px;left:-4px;background:var(--rust);color:#fff;
    font-size:10px;width:18px;height:18px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;font-weight:700;
}

/* ---- دکمه تغییر حالت روشن/تیره ---- */
.theme-toggle-btn{cursor:pointer;transition:.2s;}
.theme-toggle-btn:hover{border-color:var(--rust);color:var(--rust);}
.theme-toggle-btn .theme-toggle-icon-dark{display:none;}
html[data-theme="dark"] .theme-toggle-btn .theme-toggle-icon-light{display:none;}
html[data-theme="dark"] .theme-toggle-btn .theme-toggle-icon-dark{display:block;}

/* ---- breadcrumb ---- */
.crumb{font-size:12.5px;color:var(--muted);}
.crumb a{color:var(--muted);}
.crumb a:hover{color:var(--rust);}

/* ---- gallery ---- */
.gallery-wrap{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:18px;
    position:relative;
}
.swiper-main{
    border-radius:10px;
    overflow:hidden;
}
.swiper-main .swiper-slide{
    display:flex;align-items:center;justify-content:center;
    aspect-ratio:1/1;
    background:radial-gradient(circle at 50% 40%, #fbf9f5 0%, #f1ece2 100%);
}

.swiper-thumbs{margin-top:12px;}
.swiper-thumbs .swiper-slide{
    border:1.5px solid var(--line);
    border-radius:8px;
    overflow:hidden;
    cursor:pointer;
    aspect-ratio:1/1;
    opacity:.7;
    background:var(--surface);
    display:flex;align-items:center;justify-content:center;
    transition:.2s;
}
.swiper-thumbs .swiper-slide img{width:70%;height:70%;object-fit:contain;}
.swiper-thumbs .swiper-slide-thumb-active{
    border-color:var(--rust);
    opacity:1;
}
.gallery-actions{
    position:absolute;top:24px;left:24px;display:flex;flex-direction:column;gap:8px;z-index:5;
}
.gallery-nav-btn{
    position:absolute;top:50%;transform:translateY(-50%);
    width:36px;height:36px;border-radius:50%;
    background:var(--surface);border:1px solid var(--line);
    display:flex;align-items:center;justify-content:center;z-index:5;color:var(--ink);
    cursor:pointer;
}
.gallery-nav-btn.prev{right:14px;}
.gallery-nav-btn.next{left:14px;}

/* ---- badges / rating ---- */
.rating-chip{
    background:var(--teal-soft);
    color:var(--teal);
    font-size:12.5px;
    font-weight:700;
    border-radius:8px;
    padding:4px 10px;
    display:inline-flex;align-items:center;gap:4px;
}
.title-block h1{
    font-size:22px;
    font-weight:700;
    line-height:1.6;
    margin-bottom:4px;
}
.title-block .subtitle{
    color:var(--muted);
    font-size:13.5px;
}

/* ---- color swatches ---- */
.swatch-label{font-size:13px;color:var(--muted);margin-bottom:8px;}
.swatch{
    width:34px;height:34px;border-radius:50%;
    border:2px solid #fff;
    outline:1px solid var(--line);
    cursor:pointer;
    display:inline-flex;align-items:center;justify-content:center;
    position:relative;
}
.swatch.active{outline:2px solid var(--rust);}
.swatch.active::after{
    content:'✓';color:#fff;font-size:13px;font-weight:700;
    text-shadow:0 0 2px rgba(0,0,0,.4);
}

/* ---- feature pills ---- */
.feat-pill{
    border:1px solid var(--line);
    background:var(--surface);
    border-radius:10px;
    padding:10px 12px;
    font-size:12.5px;
}
.feat-pill .k{color:var(--muted);display:block;margin-bottom:3px;}
.feat-pill .v{font-weight:700;}

/* ---- price box ---- */
.buybox{
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:var(--surface);
    padding:20px;
    position:sticky;
    top:90px;
}
.seller-line{
    display:flex;align-items:center;justify-content:space-between;
    font-size:13px;color:var(--muted);margin-bottom:14px;
}
.price-old{
    text-decoration:line-through;color:var(--muted);font-size:13px;
}
.price-now{
    font-size:24px;font-weight:800;color:var(--ink);
}
.price-now .toman{font-size:13px;font-weight:500;color:var(--muted);margin-right:4px;}

/* قیمت داخل باکس خرید (هم محصول ساده، هم محصول متغیر) — خروجی wc_price()/get_price_html() */
.buybox p.price{
    font-size:24px;font-weight:800;color:var(--ink);margin-bottom:10px;
}
.buybox p.price del{
    text-decoration:line-through;color:var(--muted);font-size:14px;font-weight:500;margin-left:8px;
    opacity:.8;
}
.buybox p.price ins{
    text-decoration:none;color:var(--rust);
}
.buybox .js-variation-price-hint{
    margin-bottom:14px;
}

/* جلوگیری از نمایش تکراری قیمت خام و بدون استایل ووکامرس داخل فرم انتخاب واریانت،
   چون قیمت به‌صورت استایل‌دار در باکس خرید (ستون سمت راست) نمایش داده می‌شود.
   !important عمداً اضافه شده چون این described selector می‌تواند توسط
   استایل‌های پیش‌فرض ووکامرس (که با اولویت بالاتر یا بعد از این فایل بارگذاری
   می‌شوند) بازنویسی شود. */
.product-variations-wrapper .woocommerce-variation-price,
.product-variations-wrapper .woocommerce-variation-availability{
    display:none !important;
}
/* تعداد و دکمه‌ی «افزودن به سبد خرید» پیش‌فرض ووکامرس هم مخفی می‌شود، چون
   باکس خرید حالا استپر تعداد و دکمه‌ی خودش را دارد (js-variation-add-to-cart)
   که با variation_id همین فرم هماهنگ می‌شود. فیلدهای مخفی (variation_id و...)
   داخل این بلوک همچنان در DOM و کاملاً کاربردی باقی می‌مانند؛ فقط نمایش
   بصری‌شان مخفی می‌شود. */
.product-variations-wrapper .woocommerce-variation-add-to-cart{
    display:none !important;
}
/* فرم انتخاب واریانت حالا داخل باکس خرید (ستون باریک‌تر) رندر می‌شود؛
   چیدمان جدول attribute های ووکامرس (label کنار select) در این عرض تنگ
   می‌شود، پس این‌جا آن را به‌صورت ستونی (label بالای select) نمایش می‌دهیم. */
.buybox .product-variations-wrapper table.variations,
.buybox .product-variations-wrapper table.variations tbody,
.buybox .product-variations-wrapper table.variations tr{
    display:block;
    width:100%;
}
.buybox .product-variations-wrapper table.variations th.label,
.buybox .product-variations-wrapper table.variations td.value{
    display:block;
    width:100%;
    padding:0 0 6px;
    text-align:right;
}
.buybox .product-variations-wrapper table.variations select{
    width:100%;
    max-width:100%;
    /* از اساس مخفی می‌شود تا قبل از اجرای variation-swatches.js یک لحظه
       دیده نشود (رفع پرش/فلش هنگام رفرش). اگر جاوااسکریپت غیرفعال باشد،
       قانون noscript پایین همین فایل دوباره نمایانش می‌کند. */
    display:none;
}
.buybox .product-variations-wrapper .reset_variations{
    display:inline-block;
    margin-top:6px;
    font-size:12px;
    /* پیش‌فرض مخفی — ووکامرس با visibility (نه display) این لینک را پس از
       انتخاب یک گزینه نمایان می‌کند؛ همینجا هم از visibility استفاده شده
       تا استایل inline خودِ ووکامرس بعداً بتواند رویش override کند. */
    visibility:hidden;
}
/* دکمه‌های سویچ برای انتخاب واریانت، جایگزین دراپ‌داون select */
.next-variation-swatches{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:2px;
}
.next-variation-swatch{
    padding:8px 16px;
    border:1.5px solid var(--line, #e2ddd3);
    border-radius:10px;
    background:#fff;
    color:var(--ink);
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:border-color .15s, background .15s, color .15s;
}
.next-variation-swatch:hover{
    border-color:var(--rust);
}
.next-variation-swatch.is-active{
    border-color:var(--rust);
    background:var(--rust);
    color:#fff;
}
.discount-tag{
    background:var(--rust);color:#fff;font-size:12px;font-weight:700;
    padding:2px 8px;border-radius:6px;
}
.btn-buy{
    background:var(--rust);
    border:none;
    color:#fff;
    font-weight:700;
    border-radius:10px;
    padding:13px;
    width:100%;
    font-size:15px;
    transition:.15s;
}
.btn-buy:hover{background:var(--rust-dark);color:#fff;}
.btn-cart-outline{
    border:1.5px solid var(--ink);
    color:var(--ink);
    border-radius:10px;
    padding:13px;
    width:100%;
    font-weight:700;
    background:transparent;
}
.qty-stepper{
    display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden;
}
.qty-stepper button{
    background:var(--surface);border:none;width:38px;height:40px;font-size:18px;color:var(--ink);
}
.qty-stepper input{
    width:42px;text-align:center;border:none;outline:none;font-weight:700;
}
.mini-info{
    font-size:12.5px;color:var(--muted);
    display:flex;gap:8px;align-items:flex-start;padding:9px 0;border-bottom:1px dashed var(--line);
}
.mini-info:last-child{border-bottom:none;}
.mini-info i{color:var(--teal);margin-top:1px;}

/* ---- other sellers ---- */
.seller-row{
    border:1px solid var(--line);
    border-radius:12px;
    padding:14px 16px;
    display:flex;align-items:center;justify-content:space-between;
    background:var(--surface);
    gap:12px;
    flex-wrap:wrap;
}
.seller-row .name{font-weight:700;font-size:14px;}
.trust-badge{
    font-size:11px;background:var(--teal-soft);color:var(--teal);padding:2px 7px;border-radius:6px;font-weight:700;
}

/* ---- tabs ---- */
.nav-tabs.shop-tabs{
    border-bottom:1px solid var(--line);
    gap:6px;
}
.shop-tabs .nav-link{
    border:none;
    color:var(--muted);
    font-weight:700;
    font-size:14px;
    padding:12px 6px;
    border-bottom:2px solid transparent;
    border-radius:0;
}
.shop-tabs .nav-link.active{
    color:var(--ink);
    border-bottom-color:var(--rust);
    background:transparent;
}
.spec-table tr td{
    padding:11px 4px;
    font-size:13.5px;
    border-bottom:1px solid var(--line);
}
.spec-table tr td:first-child{color:var(--muted);width:42%;}
.spec-table tr td:last-child{font-weight:600;}

/* ---- review ---- */
.review-summary{
    display:flex;align-items:center;gap:18px;
    background:var(--teal-soft);
    border-radius:12px;
    padding:18px;
    margin-bottom:18px;
}
.review-score{font-size:34px;font-weight:800;color:var(--teal);}
.stars{color:var(--gold);font-size:14px;}
.review-card{
    border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:10px;background:var(--surface);
}
.review-card .name{font-weight:700;font-size:13.5px;}
.review-card .date{font-size:11.5px;color:var(--muted);}
.review-card p{font-size:13.5px;margin:8px 0 0;line-height:1.8;}

/* ── فرم ثبت دیدگاه ───────────────────────────────── */
.review-form-wrap{
    background:var(--surface,#fff);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:20px;
}
.review-form label{
    display:block;
    font-size:13px;
    font-weight:700;
    margin-bottom:6px;
}
.review-form label .req{color:#d33;}
.review-form input[type="text"],
.review-form input[type="email"],
.review-form textarea{
    width:100%;
    border:1px solid var(--line);
    border-radius:10px;
    padding:10px 12px;
    font-size:13.5px;
    font-family:inherit;
    background:var(--paper);
    color:var(--ink);
    outline:none;
    transition:.15s;
}
.review-form textarea{resize:vertical;min-height:110px;}
.review-form input:focus,
.review-form textarea:focus{border-color:var(--rust);}

/* ── ویجت امتیازدهی ستاره‌ای ──────────────────────── */
.star-picker{
    display:flex;
    gap:2px;
    font-size:0;
}
.star-picker input{
    position:absolute;
    width:1px;height:1px;
    padding:0;margin:0;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}
.star-picker label{
    display:inline-block;
    font-size:26px;
    line-height:1;
    color:var(--line,#ddd);
    cursor:pointer;
    transition:color .15s;
    margin-bottom:0;
}
.star-picker input:checked ~ label,
.star-picker label:hover,
.star-picker label:hover ~ label{
    color:var(--gold,#f5a623);
}

/* section title */
.section-title{
    font-weight:700;font-size:17px;margin-bottom:14px;display:flex;align-items:center;gap:8px;
}
.section-title::before{
    content:'';width:4px;height:18px;background:var(--rust);border-radius:2px;display:inline-block;
}

/* related products */
.product-card{
    border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:12px;height:100%;transition:.18s;
}
.product-card:hover{box-shadow:0 8px 20px rgba(0,0,0,.06);transform:translateY(-2px);}
.product-card img{height:130px;object-fit:contain;width:100%;}
.product-card .pname{font-size:13px;font-weight:600;line-height:1.6;min-height:42px;}
.product-card .pprice{font-weight:800;font-size:14px;margin-top:6px;}

::-webkit-scrollbar{width:8px;height:8px;}
::-webkit-scrollbar-thumb{background:var(--line);border-radius:8px;}

@media(max-width:991px){
    .buybox{position:static;margin-top:18px;}
}

.footer-link{color:#cfc9bd;}
.footer-link:hover{color:var(--rust);}
.footer-cert{
    font-size:11.5px;border:1px solid #494640;color:#a39c8d;padding:5px 10px;border-radius:8px;
}
.brand-mark .desktop-logo
{
    height: 35px;
}


/* ================================================
   FiboSearch - AJAX Search for WooCommerce
   Styled to match the theme's .search-shell design
   ================================================ */

/* --- Wrapper: pill shape matching .search-shell --- */
.dgwt-wcas-search-wrapp {
    max-width: 800px!important;

}

.dgwt-wcas-sf-wrapp {
    border: 1px solid #e7e2d9;          /* var(--line) */
    border-radius: 999px;
    background: var(--surface);
    display: flex;
    align-items: center;
    padding: 6px 8px 6px 6px;          /* RTL: padding-left for button side */
    transition: border-color .2s;
}

.dgwt-wcas-sf-wrapp:focus-within {
    border-color: #1c1b19;              /* var(--ink) on focus */
}

/* --- Input field --- */
.dgwt-wcas-sf-wrapp input[type="search"],
.dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    flex: 1;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    color: #1c1b19;
    padding: 0 10px;
    height: auto;
    line-height: 1.5;
    direction: rtl;
}

.dgwt-wcas-sf-wrapp input::placeholder {
    color: #857f74;                     /* var(--muted) */
    font-size: 13.5px;
}

/* --- Search submit button: dark pill on the left (RTL) --- */
.dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier-handler,
.dgwt-wcas-sf-wrapp button[type="submit"] {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: #1c1b19 !important;     /* var(--ink) */
    border: none !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    order: -1;                          /* push to left in RTL layout */
    transition: background .15s;
}

.dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier-handler:hover,
.dgwt-wcas-sf-wrapp button[type="submit"]:hover {
    background: #00baba !important;     /* var(--rust) on hover */
}

/* Hide FiboSearch's default magnifier icon, keep only the button shape */
.dgwt-wcas-ico-magnifier {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* --- Close/clear button --- */
.dgwt-wcas-sf-wrapp .dgwt-wcas-close {
    color: #857f74;
    background: transparent;
    border: none;
    padding: 0 6px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* --- Suggestions dropdown --- */
.dgwt-wcas-suggestions-wrapp {
    border: 1px solid #e7e2d9;
    border-radius: 14px;                /* var(--radius) */
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    margin-top: 6px;
    overflow: hidden;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
}

/* Each suggestion row */
.dgwt-wcas-suggestion {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e7e2d9;
    transition: background .12s;
    cursor: pointer;
}

.dgwt-wcas-suggestion:last-child {
    border-bottom: none;
}

.dgwt-wcas-suggestion:hover,
.dgwt-wcas-suggestion.dgwt-wcas-suggestion--highlight {
    background: #f8f6f2;                /* var(--paper) */
}

/* Product image in suggestion */
.dgwt-wcas-suggestion .dgwt-wcas-si {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e7e2d9;
    flex-shrink: 0;
}

/* Product title */
.dgwt-wcas-suggestion .dgwt-wcas-st {
    font-size: 13.5px;
    font-weight: 600;
    color: #1c1b19;
    line-height: 1.5;
}

/* Highlighted match text */
.dgwt-wcas-suggestion .dgwt-wcas-st strong,
.dgwt-wcas-suggestion mark {
    color: #00baba;                     /* var(--rust) */
    background: transparent;
    font-weight: 700;
}

/* Price */
.dgwt-wcas-suggestion .dgwt-wcas-sp {
    font-size: 12.5px;
    color: #857f74;
    margin-top: 2px;
}

/* "See all results" footer row */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggester-wrapp .dgwt-wcas-btn-see-all,
.dgwt-wcas-see-all {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #1c1b19;
    border-top: 1px solid #e7e2d9;
    background: #f8f6f2;
    transition: color .15s;
}

.dgwt-wcas-see-all:hover {
    color: #00baba;
}

/* --- Loading spinner color --- */
.dgwt-wcas-preloader {
    border-top-color: #00baba !important;
}
/* ================================================
   MEGA MENU  –  3-level / half-width panel
   ================================================ */
.megamenu-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 999;
}
.megamenu-bar .container {
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.megamenu-bar .container::-webkit-scrollbar { display: none; }

/* ── Level-1 list ── */
.megamenu-bar > .container > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    width: 100%;
}
.megamenu-bar > .container > ul > li {
    position: static;   /* panel is relative to .megamenu-bar, not li */
}
.megamenu-bar > .container > ul > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.megamenu-bar > .container > ul > li > a:hover,
.megamenu-bar > .container > ul > li.mm-open > a {
    color: var(--rust);
    border-bottom-color: var(--rust);
}
.mm-arrow {
    font-size: 9px;
    color: var(--muted);
    transition: transform .2s;
    margin-top: 1px;
}
.mm-item.mm-open > a .mm-arrow {
    transform: rotate(180deg);
    color: var(--rust);
}

/* ── Panel (half-width, anchored to right) ── */
.mm-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 16px 40px rgba(0,0,0,.10);
    z-index: 1000;
    animation: mmFadeIn .18s ease;
    overflow: hidden;
}
.mm-panel.mm-active { display: block; }

@keyframes mmFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Inner 2-column layout ── */
.mm-panel-inner {
    display: flex;
    min-height: 200px;
}

/* ── Level-2: category sidebar ── */
.mm-l2-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    width: 42%;
    flex-shrink: 0;
    border-left: 1px solid var(--line);     /* RTL: divider on left */
    background: var(--paper);
}
.mm-l2-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    transition: background .12s, color .12s;
    gap: 6px;
}
.mm-l2-item > a:hover,
.mm-l2-item.mm-l2-active > a {
    background: var(--surface);
    color: var(--rust);
}
.mm-l2-arrow {
    font-size: 16px;
    color: var(--muted);
    line-height: 1;
}
.mm-l2-item.mm-l2-active > a .mm-l2-arrow {
    color: var(--rust);
}

/* ── Level-3: sub-list area ── */
.mm-l3-wrap {
    flex: 1;
    padding: 14px 18px;
    overflow-y: auto;
}
.mm-l3-list {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mm-l3-list.mm-l3-active { display: block; }

.mm-l3-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 0 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
}
.mm-l3-title a {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    transition: color .15s;
}
.mm-l3-title a:hover { color: var(--rust); }
.mm-l3-list li:not(.mm-l3-title) a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 6px;
    font-size: 13px;
    color: var(--ink);
    border-radius: 7px;
    transition: background .12s, color .12s;
}
.mm-l3-list li:not(.mm-l3-title) a::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--line);
    flex-shrink: 0;
    transition: background .12s;
}
.mm-l3-list li:not(.mm-l3-title) a:hover {
    background: var(--teal-soft);
    color: var(--rust);
}
.mm-l3-list li:not(.mm-l3-title) a:hover::before { background: var(--rust); }

/* ── Overlay ── */
.mm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.16);
    z-index: 998;
}
.mm-overlay.mm-active { display: block; }

/* ── Hide on mobile ── */
@media(max-width:767px) {
    .megamenu-bar { display: none; }
}
/* ── Responsive panel width ── */
@media(max-width:991px) {
    .mm-panel { width: 70%; }
}
/* ── Primary Menu (inline with megamenu-bar) ── */
.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    margin-right: auto;
}
.primary-menu li a {
    display: block;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.primary-menu li a:hover,
.primary-menu li.current-menu-item > a,
.primary-menu li.current-menu-ancestor > a {
    color: var(--rust);
    border-bottom-color: var(--rust);
}

/* ================================================
   PAGE & SINGLE
   ================================================ */

/* ── Page ── */
.page-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--ink);
}
.page-content,
.single-content {
    font-size: 15px;
    line-height: 2;
    color: var(--ink);
}
.page-content p,
.single-content p { margin-bottom: 1.4em; }

.page-content img,
.single-content img {
    max-width: 100%;
    border-radius: 10px;
    height: auto;
}

/* ── Editor alignment classes (aligncenter / alignleft / alignright) ── */
.page-content .aligncenter,
.single-content .aligncenter,
.aligncenter {
    display: block;
    float: none;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}
.page-content .alignleft,
.single-content .alignleft,
.alignleft {
    float: left;
    margin: 6px 20px 15px 0;
}
.page-content .alignright,
.single-content .alignright,
.alignright {
    float: right;
    margin: 6px 0 15px 20px;
}
.page-content .alignnone,
.single-content .alignnone,
.alignnone {
    margin: 6px 0 15px;
}
.page-content img.aligncenter,
.page-content img.alignleft,
.page-content img.alignright,
.page-content img.alignnone,
.single-content img.aligncenter,
.single-content img.alignleft,
.single-content img.alignright,
.single-content img.alignnone {
    max-width: 100%;
    height: auto;
}

/* ── Captions (classic editor "Insert Image" caption) ── */
.wp-caption {
    max-width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 8px 4px;
}
.wp-caption.aligncenter { display: table; margin-left: auto; margin-right: auto; }
.wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0 auto;
}
.wp-caption .wp-caption-text,
.wp-caption-dd {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    margin: 6px 0 2px;
    padding: 0 4px;
}


.page-links {
    margin-top: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    transition: .15s;
}
.page-links a:hover { background: var(--rust); border-color: var(--rust); color: #fff; }

/* ── Single Header ── */
.single-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.7;
    margin-bottom: 12px;
    color: var(--ink);
}
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: var(--muted);
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}
.single-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.single-meta a { color: var(--muted); }
.single-meta a:hover { color: var(--rust); }

/* ── Tags ── */
.tag-pill {
    display: inline-block;
    background: var(--teal-soft);
    color: var(--teal);
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 6px;
    margin-bottom: 6px;
    transition: .15s;
}
.tag-pill:hover { background: var(--teal); color: #fff; }

/* ── Post Navigation ── */
.single-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.single-nav-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
.single-nav-item:hover {
    border-color: var(--rust);
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.single-nav-label {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
}
.single-nav-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5;
}
.single-nav-next { text-align: left; }

/* ── Sidebar ── */
.page-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}
.widget-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

/* ============================================================
   Next Pro — TOC Widget (فهرست مطالب)
   ============================================================ */
[id^="next-toc-h2-"] { scroll-margin-top: 100px; }

.next-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.next-toc-item { position: relative; }
.next-toc-link {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
    border-radius: 8px;
    border-right: 2px solid transparent;
    transition: .15s;
}
.next-toc-link:hover { color: var(--ink); background: var(--paper); }
.next-toc-link.is-active {
    color: var(--rust);
    font-weight: 700;
    background: var(--teal-soft);
    border-right-color: var(--rust);
}

/* ============================================================
   Next Pro — Related Posts (مطالب مرتبط)
   ============================================================ */
.next-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.next-related-item + .next-related-item { padding-top: 12px; border-top: 1px solid var(--line); }
.next-related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}
.next-related-link:hover .next-related-title { color: var(--rust); }
.next-related-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--paper);
}
.next-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.next-related-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.next-related-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: .15s;
}
.next-related-date { font-size: 11px; color: var(--muted); }

/* ============================================================
   Next Pro — Related Posts، حالت تمام‌عرض (بدون سایدبار)
   نمایش زیر محتوای پست و قبل از نظرات، به‌صورت گرید کارتی
   ============================================================ */
.next-related-full-item {
    display: block;
    color: var(--ink);
}
.next-related-full-thumb {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--paper);
    margin-bottom: 10px;
}
.next-related-full-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .25s;
}
.next-related-full-item:hover .next-related-full-thumb img { transform: scale(1.05); }
.next-related-full-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: .15s;
}
.next-related-full-item:hover .next-related-full-title { color: var(--rust); }
.next-related-full-date { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   Next Pro — Comments (comments.php)
   Uses the same visual language as the theme (cards, var(--*))
   ============================================================ */
.comments-area { margin-top: 8px; }

.comments-title,
.comment-reply-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 18px;
}
.comment-reply-title { font-size: 16px; margin-bottom: 14px; }

.comment-list,
.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list .children {
    padding-right: 34px;
    margin-top: 14px;
}

.comment-item {
    margin-bottom: 14px;
}
.comment-item.review-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    background: var(--surface);
    margin-bottom: 0;
}
.comment-item.comment-unapproved { opacity: .65; }

.comment-body { display: flex; gap: 12px; align-items: flex-start; }
.comment-avatar img { border-radius: 50%; display: block; }
.comment-main { flex: 1; min-width: 0; }

.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment-meta .name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.comment-meta .date { font-size: 11.5px; color: var(--muted); }

.comment-text { font-size: 13.5px; line-height: 1.9; color: var(--ink); }
.comment-text p { margin-bottom: .8em; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-awaiting-moderation {
    font-size: 12px;
    color: var(--gold);
    background: rgba(201, 143, 60, .1);
    border-radius: 8px;
    padding: 6px 10px;
    margin: 6px 0;
    display: inline-block;
}

.comment-reply { margin-top: 8px; }
.comment-reply a,
.comment-reply .comment-reply-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--rust);
}
.comment-reply a:hover { color: var(--rust-dark); }

.comments-closed {
    font-size: 13.5px;
    color: var(--muted);
    background: var(--teal-soft);
    border-radius: 10px;
    padding: 12px 16px;
}

/* ── Comment form ── */
.comment-form-wrap { margin-top: 22px; }
.comment-form-wrap .comment-notes,
.comment-form-wrap .logged-in-as { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.comment-form-wrap .logged-in-as a { color: var(--rust); }

.cf-group { margin-bottom: 14px; }
.cf-group label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 5px;
}
.cf-group .req { color: var(--rust); }
.cf-group input[type="text"],
.cf-group input[type="email"],
.cf-group input[type="url"],
.cf-group textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: border-color .2s;
    background: var(--surface);
    color: var(--ink);
}
.cf-group input[type="text"]:focus,
.cf-group input[type="email"]:focus,
.cf-group input[type="url"]:focus,
.cf-group textarea:focus { border-color: var(--rust); }
.cf-group textarea { min-height: 120px; resize: vertical; }

.comment-form-wrap .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 14px;
}

.cf-submit { margin-top: 4px; }
.btn-comment-submit {
    background: var(--rust);
    border: none;
    color: #fff;
    font-weight: 700;
    font-family: inherit;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 14px;
    cursor: pointer;
    transition: .15s;
}
.btn-comment-submit:hover { background: var(--rust-dark); }

@media (max-width: 575px) {
    .comment-list .children { padding-right: 16px; }
    .comment-body { gap: 9px; }
    .comment-avatar img { width: 36px; height: 36px; }
}

/* ============================================================
   Next Pro — WooCommerce Notices
   Overrides for woocommerce/notices/{success,error,notice}.php
   Uses theme tokens from main.css (:root)
   ============================================================ */

.next-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: var(--radius, 14px);
    padding: 14px 18px;
    margin: 0 0 16px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    line-height: 1.9;
    list-style: none;
    border: 1px solid transparent;
}

.next-notice__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.next-notice__text {
    flex: 1;
    min-width: 0;
}

.next-notice__text a:not(.button) {
    color: inherit;
    text-decoration: underline;
}

/* <ul class="woocommerce-error"> wrapper reset — each <li> is its own next-notice card */
ul.woocommerce-error {
    margin: 0 0 16px;
    padding: 0;
}
ul.woocommerce-error li {
    margin-bottom: 8px;
}
ul.woocommerce-error li:last-child {
    margin-bottom: 0;
}

/* success */
.next-notice--success {
    background: var(--teal-soft);
    color: var(--teal);
    border-color: #c3dbd8;
}
.next-notice--success .next-notice__icon { color: var(--teal); }

/* error */
.next-notice--error {
    background: #fdecea;
    color: #c0392b;
    border-color: #f5c6c2;
}
.next-notice--error .next-notice__icon { color: #c0392b; }

/* info */
.next-notice--info {
    background: #fff8ec;
    color: var(--gold);
    border-color: #f3dfb4;
}
.next-notice--info .next-notice__icon { color: var(--gold); }

/* inline action link WooCommerce adds automatically, e.g. "مشاهده سبد خرید" / View cart */
.next-notice .button,
.next-notice a.wc-forward {
    display: inline-block;
    background: var(--rust);
    color: #fff !important;
    font-weight: 700;
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none !important;
    margin-inline-start: 10px;
    transition: .15s;
}
.next-notice .button:hover,
.next-notice a.wc-forward:hover {
    background: var(--rust-dark);
}

@media (max-width: 575px) {
    .next-notice {
        padding: 12px 14px;
        font-size: 13px;
        gap: 8px;
    }
    .next-notice .button,
    .next-notice a.wc-forward {
        display: block;
        margin: 8px 0 0;
        text-align: center;
    }
}


/* ===== Page wrapper ===== */
.woocommerce-account .page-title-bar{
    border-bottom:1px solid var(--line);
    padding-bottom:20px;
    margin-bottom:32px;
}
.woocommerce-account .page-title-bar h1{font-size:22px;font-weight:800;}
.woocommerce-account .page-title-bar p{font-size:13px;color:var(--muted);margin-top:4px;}

.woocommerce-account .acc-wrap{
    display:flex;
    gap:24px;
    align-items:flex-start;
    font-family:'Vazirmatn',sans-serif;
    color:var(--ink);
}
.woocommerce-account .acc-sidebar{
    flex:0 0 280px;
    position:sticky;
    top:24px;
}
.woocommerce-account .acc-content{flex:1 1 0%; width:100%; min-width:0;}

@media (max-width:900px){
    .woocommerce-account .acc-wrap{flex-direction:column;}
    .woocommerce-account .acc-sidebar{flex:1 1 auto; width:100%; position:static;}
}

/* ===== User card / nav (replaces woocommerce_account_navigation) ===== */
.user-card{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    margin-bottom:16px;
}
.user-card-header{
    background:var(--ink);
    padding:24px 20px 20px;
    text-align:center;
}
.avatar-ring{
    width:72px;height:72px;border-radius:50%;
    border:3px solid rgba(255,255,255,.2);
    background:var(--rust);
    display:flex;align-items:center;justify-content:center;
    font-size:26px;font-weight:800;color:#fff;
    margin:0 auto 12px;letter-spacing:-1px;
    overflow:hidden;
}
.avatar-ring img{width:100%;height:100%;object-fit:cover;}
.user-card-header h5{font-size:15px;font-weight:700;color:#fff;margin-bottom:3px;}
.user-card-header span{font-size:12px;color:#b5aea2;}
.user-card-body{padding:0;}

.acc-nav-item{
    display:flex;align-items:center;gap:10px;
    padding:13px 18px;
    font-size:14px;font-weight:600;
    border-bottom:1px solid var(--line);
    color:var(--ink);
    transition:.15s;
}
.acc-nav-item:last-child{border-bottom:none;}
.acc-nav-item .nav-icon{
    width:32px;height:32px;border-radius:8px;
    background:var(--paper);
    display:flex;align-items:center;justify-content:center;
    font-size:15px;flex-shrink:0;transition:.15s;
}
.acc-nav-item:hover{background:var(--paper);}
.acc-nav-item:hover .nav-icon{background:var(--line);}
.acc-nav-item .nav-label{flex:1;}
li.is-active .acc-nav-item,
.woocommerce-MyAccount-navigation-link--active .acc-nav-item{
    background:var(--rust-soft);color:var(--rust);
}
li.is-active .acc-nav-item .nav-icon,
.woocommerce-MyAccount-navigation-link--active .acc-nav-item .nav-icon{
    background:rgba(0,186,186,.12);
}

.loyalty-card{
    background:var(--ink);border-radius:var(--radius);
    padding:18px 20px;color:#fff;
}
.loyalty-card .lc-label{font-size:11.5px;color:#b5aea2;margin-bottom:4px;}
.loyalty-card .lc-pts{font-size:28px;font-weight:800;color:#fff;letter-spacing:-1px;margin-bottom:14px;}
.loyalty-card .lc-pts span{font-size:14px;font-weight:500;color:#b5aea2;}
.progress-bar-custom{background:rgba(255,255,255,.15);border-radius:4px;height:5px;overflow:hidden;margin-bottom:8px;}
.progress-bar-fill{height:100%;background:var(--gold);border-radius:4px;}
.loyalty-card .lc-meta{display:flex;justify-content:space-between;font-size:11.5px;color:#b5aea2;}
.loyalty-card .lc-meta span:last-child{color:var(--gold);}

/* ===== Content cards (wrap real WooCommerce content) ===== */
.content-card{
    background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
    margin-bottom:20px;overflow:hidden;
}
.content-card-header{
    padding:18px 24px;border-bottom:1px solid var(--line);
    display:flex;align-items:center;justify-content:space-between;
}
.content-card-header h2{font-size:16px;font-weight:700;}
.content-card-body{padding:24px;}

/* stats row on dashboard */
.stats-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px;}
.stat-box{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:16px 14px;text-align:center;}
.stat-box .stat-val{font-size:22px;font-weight:800;color:var(--ink);letter-spacing:-1px;margin-bottom:4px;}
.stat-box .stat-label{font-size:11.5px;color:var(--muted);font-weight:600;}

/* order rows (used inside dashboard recent-orders list) */
.order-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line);}
.order-row:last-child{border-bottom:none;}
.order-thumb{
    width:52px;height:52px;border-radius:8px;background:var(--paper);
    border:1px solid var(--line);display:flex;align-items:center;justify-content:center;
    font-size:22px;flex-shrink:0;
}
.order-info{flex:1;min-width:0;}
.order-info .order-name{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:3px;}
.order-info .order-meta{font-size:12px;color:var(--muted);}
.order-info .order-meta span{margin-left:10px;}
.order-status{font-size:11.5px;font-weight:700;padding:4px 10px;border-radius:20px;flex-shrink:0;white-space:nowrap;}
.status-completed,.status-delivered{background:var(--teal-soft);color:var(--teal);}
.status-processing,.status-pending,.status-on-hold{background:var(--gold-soft);color:#8a5e1c;}
.status-cancelled,.status-failed,.status-refunded{background:#fdf0f0;color:#a33;}
.order-price{font-size:14px;font-weight:700;text-align:left;white-space:nowrap;flex-shrink:0;min-width:80px;}

/* ===== Re-skin native WooCommerce order table / forms to match cards ===== */
.acc-content table.shop_table{
    width:100%;border-collapse:collapse;font-size:13.5px;
}
.acc-content table.shop_table th{
    text-align:right;font-size:11.5px;color:var(--muted);font-weight:700;
    padding:10px 4px;border-bottom:1px solid var(--line);
}
.acc-content table.shop_table td{padding:12px 4px;border-bottom:1px solid var(--line);}
.acc-content table.shop_table tr:last-child td{border-bottom:none;}
.acc-content .woocommerce-button,
.acc-content .button{
    background:var(--rust);border:none;color:#fff !important;font-weight:700;
    border-radius:10px;padding:10px 20px;font-size:13.5px;
    font-family:'Vazirmatn',sans-serif;transition:.15s;cursor:pointer;
}
.acc-content .woocommerce-button:hover,
.acc-content .button:hover{background:var(--rust-dark);color:#fff !important;}

.acc-content .woocommerce-Address{
    border:1.5px solid var(--line);border-radius:10px;padding:16px;
    position:relative;
}
.acc-content .woocommerce-Addresses{
    display:grid !important;grid-template-columns:1fr 1fr;gap:14px;
    align-items:start;
}
.acc-content .woocommerce-Addresses::before,
.acc-content .woocommerce-Addresses::after{
    content:none !important;display:none !important;
}
/* Bootstrap defines .col-1 / .col-2 as 12-col grid widths (8.33%, 16.66%)
   which collides with WooCommerce's own .col-1 / .col-2 address-column
   classes. Force them back to full width inside our grid. */
.acc-content .woocommerce-Addresses > .col-1,
.acc-content .woocommerce-Addresses > .col-2,
.acc-content .woocommerce-Addresses > [class*="u-column"]{
    width:100% !important;
    max-width:100% !important;
    float:none !important;
    flex:none !important;
    padding:0 !important;
    margin:0 !important;
}
.acc-content .woocommerce-Address-title,
.acc-content .woocommerce-Address-title.title{
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    margin-bottom:10px;
    order:-1; /* show the type label + edit button above the address text */
}
.acc-content .woocommerce-Address-title h2,
.acc-content .woocommerce-Address-title h3{
    font-size:11px;font-weight:700;color:var(--muted);
    text-transform:uppercase;letter-spacing:.02em;margin:0;
    display:flex;align-items:center;gap:6px;
}
/* type icons, matching the mockup's 🏠 / 🏢 */
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address-title h2::before,
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address-title h3::before{
    content:"🏠";font-size:13px;
}
.acc-content .woocommerce-Addresses > :nth-child(2) .woocommerce-Address-title h2::before,
.acc-content .woocommerce-Addresses > :nth-child(2) .woocommerce-Address-title h3::before{
    content:"🏢";font-size:13px;
}
.acc-content .woocommerce-Address-title a.edit,
.acc-content .woocommerce-Address-title a.delete{
    font-size:12px;font-weight:600;
    padding:5px 12px;border-radius:7px;
    border:1.5px solid var(--line);
    background:var(--surface);color:var(--ink);
    transition:.15s;flex-shrink:0;
}
.acc-content .woocommerce-Address-title a.edit:hover,
.acc-content .woocommerce-Address-title a.delete:hover{border-color:var(--ink);}
.acc-content .woocommerce-Address-title a.delete{color:#a33;border-color:#f0cccc;}
.acc-content .woocommerce-Address-title a.delete:hover{border-color:#a33;}

/* highlight the billing address like the "default" card in the mockup */
.acc-content .woocommerce-Addresses > :nth-child(1).woocommerce-Address,
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address{
    border-color:var(--teal);
    background:var(--teal-soft);
}
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address-title::after{
    content:"پیش‌فرض";
    background:var(--teal);color:#fff;
    font-size:10px;font-weight:700;
    padding:2px 7px;border-radius:20px;
    margin-inline-end:auto;
}

.acc-content address{
    font-size:13px;color:var(--muted);line-height:1.8;
    font-style:normal;
}
.acc-content address strong{
    display:block;font-size:15px;font-weight:700;color:var(--ink);
    margin-bottom:4px;
}

.acc-content .woocommerce-form-row{margin-bottom:18px;}
.acc-content .woocommerce-form-row label{
    display:block;font-size:13px;font-weight:600;margin-bottom:7px;color:var(--ink);
}
.acc-content input.input-text,
.acc-content select{
    width:100%;border:1.5px solid var(--line);border-radius:10px;
    padding:0 14px;height:46px;font-family:'Vazirmatn',sans-serif;
    font-size:14.5px;color:var(--ink);background:var(--surface);outline:none;transition:.2s;
}
.acc-content input.input-text:focus,
.acc-content select:focus{border-color:var(--ink);}

@media(max-width:768px){
    .stats-row{grid-template-columns:repeat(3,1fr);}
    .acc-content .woocommerce-Addresses{grid-template-columns:1fr;}
}

/* =========================================================
   Payment methods (My Account) — list + add form
   Templates: woocommerce/myaccount/payment-methods.php
              woocommerce/myaccount/form-add-payment-method.php
   ========================================================= */

.pm-head { margin-bottom: 16px; }

.pm-empty {
    background: var(--paper); color: var(--muted);
    border: 1px dashed var(--line); border-radius: 10px;
    padding: 16px 18px; font-size: 13.5px;
}

/* ── saved methods grid ── */
.payment-methods-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.payment-method-card {
    position: relative;
    border: 1.5px solid var(--line); border-radius: 10px;
    padding: 16px; background: var(--surface);
}
.payment-method-card.is-default { border-color: var(--teal); background: var(--teal-soft); }
.payment-method-card .pm-default-badge {
    position: absolute; inset-inline-end: 14px; top: 14px;
    background: var(--teal); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 9px; border-radius: 20px;
}
.pm-icon {
    width: 42px; height: 30px; border: 1px solid var(--line); border-radius: 6px;
    background: var(--paper); display: flex; align-items: center; justify-content: center;
    color: var(--muted); margin-bottom: 12px;
}
.pm-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.pm-row .pm-label { color: var(--muted); }
.pm-row .pm-value { color: var(--ink); font-weight: 600; }
.pm-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pm-actions .button { padding: 7px 14px; font-size: 12.5px; }
.pm-actions .button.delete { background: #fdecea; color: #c0392b !important; }
.pm-actions .button.delete:hover { background: #f9d7d3; }

/* ── add payment method form: reuse checkout's radio-card look ── */
.radio-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.radio-card {
    border: 1.5px solid var(--line); border-radius: 12px;
    padding: 14px 18px; cursor: pointer; transition: .18s;
    display: flex; align-items: center; gap: 14px;
}
.radio-card:hover    { border-color: #aaa; }
.radio-card.selected { border-color: var(--rust); background: var(--rust-soft); }

.radio-card input[type="radio"] {
    accent-color: var(--rust); width: 18px; height: 18px; flex-shrink: 0; cursor: pointer;
}

.radio-card-body  { flex: 1; }
.radio-card-title { font-size: 14px; font-weight: 700; }
.radio-card-sub   { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.pay-icon {
    width: 40px; height: 28px; border: 1px solid var(--line); border-radius: 6px;
    background: var(--surface); display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.pay-icon img { max-width: 32px; max-height: 22px; object-fit: contain; }

.payment_box {
    margin-top: 12px; padding: 12px 14px; background: var(--paper);
    border-radius: 10px; font-size: 13.5px; line-height: 1.8;
}
.payment_box p { margin: 0; }
.payment_box input.input-text {
    width: 100%; border: 1.5px solid var(--line); border-radius: 8px;
    padding: 0 12px; height: 42px; font-family: inherit; font-size: 14px;
    outline: none; margin-top: 8px; transition: .2s;
}
.payment_box input.input-text:focus { border-color: var(--rust); }

.pm-form-actions { display: flex; align-items: center; gap: 12px; }
.pm-form-actions .button.alt { padding: 12px 26px; font-size: 14px; }

@media (max-width: 768px) {
    .payment-methods-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Next Pro — Blog Template (template-blog.php)
   ============================================================ */
.blog-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow .2s, transform .2s;
}
.blog-card:hover { box-shadow: 0 10px 24px rgba(28,27,25,.08); transform: translateY(-2px); }

.blog-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16/10;
    background: var(--paper);
    overflow: hidden;
}
.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }
.blog-card-noimg { display: block; width: 100%; height: 100%; background: var(--teal-soft); }
.blog-card-cat {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--rust);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.blog-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-title { font-size: 15.5px; font-weight: 700; line-height: 1.6; margin: 0; }
.blog-card-title a { color: var(--ink); }
.blog-card-title a:hover { color: var(--rust); }
.blog-card-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.blog-card-excerpt { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0; flex: 1; }
.blog-card-more { font-size: 12.5px; font-weight: 700; color: var(--rust); margin-top: auto; }
.blog-card-more:hover { color: var(--rust-dark); }

/* ── Pagination ── */
.next-pagination { display: flex; justify-content: center; }
.next-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.next-pagination .page-numbers a,
.next-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    transition: .15s;
}
.next-pagination .page-numbers a:hover { border-color: var(--rust); color: var(--rust); }
.next-pagination .page-numbers.current { background: var(--rust); border-color: var(--rust); color: #fff; }
.next-pagination .page-numbers.dots { border: none; background: transparent; }

@media (min-width: 992px) {
    .next-col-5 { flex: 0 0 20%; max-width: 20%; }
}

@media (max-width: 575px) {
    .blog-card-body { padding: 12px; }
}

/* ════════════════════════════════════════════════════════════════
   هدر ریسپانسیو: دکمه همبرگری، منوی موبایل (Offcanvas)، تماس سریع
   ════════════════════════════════════════════════════════════════ */

/* جعبه جستجو: به‌جای عرض ثابت، منعطف باشد تا در صفحات کوچک جمع شود */
.navbar-search-wrap{
    flex:1 1 auto;
    min-width:0;
}
.navbar-search-wrap .dgwt-wcas-search-wrapp{
    width:100%!important;
}

/* دکمه تماس سریع (نسخه دسکتاپ - آیکون + شماره) */
.quick-call-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border:1.5px solid var(--line);
    color:var(--ink);
    border-radius:8px;
    padding:6px 14px;
    font-size:13px;
    font-weight:600;
    white-space:nowrap;
    transition:.15s;
}
.quick-call-btn svg{color:var(--rust);flex-shrink:0;}
.quick-call-btn:hover{border-color:var(--rust);color:var(--rust);}

/* دکمه همبرگری منوی موبایل */
.nav-toggle-btn{flex-shrink:0;}

/* Offcanvas منوی موبایل */
.next-mobile-nav{
    width:280px;
    max-width:85vw;
    background:var(--surface);
}
.next-mobile-nav .offcanvas-header{
    border-bottom:1px solid var(--line);
    padding:14px 16px;
}
.next-mobile-nav .offcanvas-title{
    font-size:15px;
    font-weight:700;
    color:var(--ink);
}
.next-mobile-nav .offcanvas-body{
    padding:16px;
}

.mobile-quick-call{
    display:flex;
    align-items:center;
    gap:8px;
    background:var(--teal-soft);
    color:var(--teal);
    border-radius:10px;
    padding:11px 14px;
    font-size:13.5px;
    font-weight:700;
    margin-bottom:18px;
}
.mobile-quick-call svg{color:var(--rust);flex-shrink:0;}

.mobile-nav-list{list-style:none;margin:0;padding:0;}
.mobile-nav-list > li{border-bottom:1px solid var(--line);}
.mobile-nav-list > li > a,
.mobile-nav-list details > summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:13px 2px;
    font-size:14px;
    font-weight:600;
    color:var(--ink);
    cursor:pointer;
    list-style:none;
}
.mobile-nav-list details > summary::-webkit-details-marker{display:none;}
.mobile-nav-arrow{
    font-size:10px;
    color:var(--muted);
    transition:transform .2s;
}
.mobile-nav-list details[open] > summary .mobile-nav-arrow{transform:rotate(180deg);}

.mobile-nav-list ul{
    list-style:none;
    margin:0 0 8px;
    padding-inline-start:14px;
    border-inline-start:2px solid var(--teal-soft);
}
.mobile-nav-list ul li a,
.mobile-nav-list ul li details > summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 2px;
    font-size:13.5px;
    font-weight:500;
    color:var(--ink);
}
.mobile-nav-list ul ul{padding-inline-start:12px;}
.mobile-nav-list ul ul li a{font-weight:400;color:var(--muted);}

/* اصلاح چیدمان نوار هدر در سایزهای کوچک تا از هم‌پوشانی/سرریز جلوگیری شود */
@media(max-width:767px){
    .navbar-shop .container{
        flex-wrap:wrap;
        gap:8px;
    }
    .navbar-shop .brand-mark .desktop-logo{height:28px;}
    .quick-call-btn{display:none!important;}

    /* ردیف اول: همبرگری + لوگو + ورود/سبد (چپ‌چین با ms-auto)
       ردیف دوم: نوار جستجو با عرض کامل، زیر ردیف اول */
    .navbar-search-wrap{
        order:10;
        flex-basis:100%;
        min-width:100%;
        margin-top:0;
    }
}

@media(max-width:400px){
    .icon-btn{width:36px;height:36px;}
    .navbar-shop .brand-mark .desktop-logo{height:24px;}
    .navbar-shop .container{gap:6px;}
}


/* هدر چسبنده (کنترل‌پذیر از تنظیمات قالب → هدر → «هدر چسبنده») */
.site-header.is-sticky{
    position:sticky;
    top:0;
    z-index:1000;
}

/* ══════════════════════════════════════════════════════════════════
   مینی سبد خرید (هاور روی آیکن سبد در هدر)
   ══════════════════════════════════════════════════════════════════ */
.mini-cart-wrap{
    position:relative;
}
.mini-cart-panel{
    position:absolute;
    top:calc(100% + 12px);
    left:0;
    width:380px;
    max-width:92vw;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:0 18px 40px rgba(0,0,0,.14);
    z-index:1050;
    opacity:0;
    visibility:hidden;
    transform:translateY(8px);
    transition:opacity .18s ease, transform .18s ease, visibility .18s;
}
.mini-cart-panel::before{
    content:'';
    position:absolute;
    top:-6px;
    left:24px;
    width:12px;height:12px;
    background:var(--surface);
    border:1px solid var(--line);
    border-bottom:none;
    border-left:none;
    transform:rotate(-45deg);
}
.mini-cart-wrap.is-open .mini-cart-panel{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}
.mini-cart-panel-inner{
    max-height:min(560px, 75vh);
    display:flex;
    flex-direction:column;
}

.mini-cart-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:16px 18px 12px;
    border-bottom:1px solid var(--line);
}
.mini-cart-title{
    font-size:14.5px;
    font-weight:700;
    color:var(--ink);
    display:flex;
    align-items:center;
    gap:8px;
}
.mini-cart-count{
    font-size:11.5px;
    font-weight:600;
    color:var(--muted);
}
.mini-cart-view-link{
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:12px;
    font-weight:600;
    color:var(--rust);
    white-space:nowrap;
}
.mini-cart-view-link:hover{color:var(--rust-dark);}

.mini-cart-items{
    overflow-y:auto;
    padding:6px 10px;
    flex:1;
}
.mini-cart-item{
    display:flex;
    gap:12px;
    padding:12px 8px;
    border-bottom:1px solid var(--line);
}
.mini-cart-item:last-child{border-bottom:none;}
.mc-item-img{
    width:64px;height:64px;
    flex-shrink:0;
    border:1px solid var(--line);
    border-radius:10px;
    overflow:hidden;
    background:var(--surface);
    display:flex;align-items:center;justify-content:center;
}
.mc-item-img img{width:100%;height:100%;object-fit:contain;padding:6px;}
.mc-item-body{flex:1;min-width:0;}
.mc-item-name{
    display:block;
    font-size:13px;
    font-weight:600;
    color:var(--ink);
    line-height:1.5;
    overflow:hidden;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
}
.mc-item-name:hover{color:var(--rust);}
.mc-item-sku{font-size:11px;color:var(--muted);margin-top:2px;}
.mc-item-meta{font-size:11px;color:var(--muted);margin-top:2px;}
.mc-item-meta p{margin:0;}
.mc-item-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-top:8px;
}
.mc-item-price{font-size:13px;font-weight:700;color:var(--ink);white-space:nowrap;}
.mc-item-price .woocommerce-Price-amount{font-size:inherit;}

.mc-qty-ctrl{
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid var(--line);
    border-radius:20px;
    padding:3px 10px;
    flex-shrink:0;
}
.mc-remove{
    background:none;border:none;padding:0;
    color:var(--muted);
    display:flex;align-items:center;justify-content:center;
    cursor:pointer;
    transition:.15s;
}
.mc-remove:hover{color:#d64545;}
.mc-qty-val{font-size:12.5px;font-weight:700;color:var(--ink);min-width:14px;text-align:center;}
.mc-plus{
    background:none;border:none;padding:0;
    width:16px;height:16px;
    display:flex;align-items:center;justify-content:center;
    font-size:15px;font-weight:700;
    color:var(--ink);
    cursor:pointer;
}
.mc-plus:hover{color:var(--rust);}
.mc-minus{
    background:none;border:none;padding:0;
    width:16px;height:16px;
    display:flex;align-items:center;justify-content:center;
    font-size:15px;font-weight:700;
    color:var(--ink);
    cursor:pointer;
}
.mc-minus:hover{color:var(--rust);}

.mini-cart-empty{
    padding:36px 20px 30px;
    text-align:center;
    color:var(--muted);
}
.mini-cart-empty svg{opacity:.5;margin-bottom:10px;}
.mini-cart-empty p{font-size:13px;margin-bottom:14px;}
.mini-cart-shop-link{
    display:inline-flex;
    background:var(--rust);
    color:#fff;
    font-size:12.5px;
    font-weight:600;
    padding:8px 18px;
    border-radius:8px;
}
.mini-cart-shop-link:hover{background:var(--rust-dark);}

.mini-cart-footer{
    padding:14px;
    border-top:1px solid var(--line);
}
.mini-cart-checkout-btn{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    background:var(--ink);
    color:#fff;
    border:none;
    border-radius:10px;
    padding:13px 18px;
    font-size:13.5px;
    font-weight:700;
    cursor:pointer;
    transition:.15s;
}
.mini-cart-checkout-btn:hover{background:var(--teal);}
.mini-cart-checkout-btn .mc-total{font-weight:700;}
.mini-cart-checkout-btn .woocommerce-Price-amount{color:#fff;font-size:inherit;}

.mini-cart-panel.is-loading{pointer-events:none;opacity:.6;}

@media (max-width:576px){
    .mini-cart-panel{
        position:fixed;
        top:auto;
        bottom:0;
        left:0;
        right:0;
        width:100%;
        max-width:100%;
        border-radius:16px 16px 0 0;
        transform:translateY(12px);
    }
    .mini-cart-panel::before{display:none;}
    .mini-cart-wrap.is-open .mini-cart-panel{transform:translateY(0);}
}

/* ══════════════════════════════════════════════════════════════════
   دکمه بازگشت به بالا (Back To Top)
   ══════════════════════════════════════════════════════════════════ */
.back-to-top-btn{
    --btt-bg: var(--rust);
    position:fixed;
    bottom:26px;
    left:26px;
    z-index:1060;
    width:46px;
    height:46px;
    border:none;
    border-radius:50%;
    background:var(--btt-bg);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 8px 20px rgba(0,0,0,.2);
    cursor:pointer;
    opacity:0;
    visibility:hidden;
    transform:translateY(14px) scale(.9);
    transition:opacity .25s ease, transform .25s ease, visibility .25s, filter .15s;
}
.back-to-top-btn.pos-right{
    left:auto;
    right:26px;
}
.back-to-top-btn svg{
    width:20px;
    height:20px;
    stroke:currentColor;
}
.back-to-top-btn:hover{
    filter:brightness(.9);
    box-shadow:0 10px 24px rgba(0,0,0,.28);
}
.back-to-top-btn:active{
    transform:translateY(0) scale(.94);
}
.back-to-top-btn.is-visible{
    opacity:1;
    visibility:visible;
    transform:translateY(0) scale(1);
}

@media (max-width:576px){
    .back-to-top-btn{
        width:40px;
        height:40px;
        bottom:18px;
        left:18px;
    }
    .back-to-top-btn.pos-right{
        left:auto;
        right:18px;
    }
    .back-to-top-btn svg{width:17px;height:17px;}
}

@media (prefers-reduced-motion: reduce){
    .back-to-top-btn{transition:opacity .01s, visibility .01s;}
}

/* ====== WhatsApp support widget ====== */
.wa-support-widget{
    position:fixed;
    bottom:26px;
    z-index:1059;
    display:flex;
    align-items:flex-end;
    gap:10px;
}
.wa-support-widget.pos-right{
    right:26px;
    flex-direction:row-reverse;
}
.wa-support-widget.pos-left{
    left:26px;
    flex-direction:row;
}

.wa-btn{
    position:relative;
    flex-shrink:0;
    width:52px;
    height:52px;
    border:none;
    border-radius:50%;
    background:var(--wa-color,#25D366);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    box-shadow:0 8px 20px rgba(0,0,0,.18);
    cursor:pointer;
    transition:box-shadow .2s ease, transform .2s ease, filter .15s;
}
.wa-btn:hover{
    filter:brightness(.95);
    box-shadow:0 10px 24px rgba(0,0,0,.24);
    transform:translateY(-2px);
    color:#fff;
}
.wa-btn:active{ transform:translateY(0); }
.wa-btn svg{ width:26px; height:26px; }
.wa-icon-chat,
.wa-icon-close{
    display:flex;
    align-items:center;
    justify-content:center;
    transition:opacity .15s ease, transform .2s ease;
}
.wa-icon-close{
    position:absolute;
    inset:0;
    align-items:center;
    justify-content:center;
    opacity:0;
    transform:scale(.6) rotate(-45deg);
    pointer-events:none;
}
.wa-icon-close svg{ width:22px; height:22px; }
.wa-support-widget.is-open .wa-icon-chat{
    opacity:0;
    transform:scale(.6) rotate(45deg);
}
.wa-support-widget.is-open .wa-icon-close{
    opacity:1;
    transform:scale(1) rotate(0);
    pointer-events:auto;
}

.wa-status-dot{
    position:absolute;
    top:2px;
    inset-inline-end:2px;
    width:12px;
    height:12px;
    border-radius:50%;
    border:2px solid #fff;
    z-index:1;
}
.wa-status-dot.is-online{ background:#2ecc71; }
.wa-status-dot.is-offline{ background:#b9b4a8; }

.wa-label{
    background:var(--surface);
    color:var(--ink);
    font-size:13.5px;
    font-weight:600;
    padding:9px 16px;
    border-radius:20px;
    box-shadow:0 6px 16px rgba(0,0,0,.12);
    white-space:nowrap;
    align-self:center;
}

.wa-bubble{
    position:relative;
    max-width:220px;
    align-self:center;
    background:var(--surface);
    color:var(--ink);
    font-size:13px;
    line-height:1.7;
    padding:12px 30px 12px 14px;
    border-radius:14px;
    box-shadow:0 10px 26px rgba(0,0,0,.14);
    opacity:0;
    visibility:hidden;
    transform:translateY(8px) scale(.96);
    transition:opacity .3s ease, transform .3s ease, visibility .3s;
}
.wa-bubble.is-visible{
    opacity:1;
    visibility:visible;
    transform:translateY(0) scale(1);
}
.wa-bubble-close{
    position:absolute;
    top:6px;
    inset-inline-end:8px;
    background:none;
    border:none;
    font-size:16px;
    line-height:1;
    color:var(--muted);
    cursor:pointer;
    padding:2px;
}
.wa-bubble-close:hover{ color:var(--ink); }

/* ── پنل تیم پشتیبانی ── */
.wa-panel{
    position:absolute;
    bottom:64px;
    width:min(330px, calc(100vw - 32px));
    background:var(--surface);
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 20px 48px rgba(0,0,0,.22);
    opacity:0;
    visibility:hidden;
    transform:translateY(14px) scale(.97);
    transform-origin:bottom;
    transition:opacity .22s ease, transform .22s ease, visibility .22s;
    pointer-events:none;
}
.wa-support-widget.pos-right .wa-panel{ right:0; }
.wa-support-widget.pos-left .wa-panel{ left:0; }
.wa-support-widget.is-open .wa-panel{
    opacity:1;
    visibility:visible;
    transform:translateY(0) scale(1);
    pointer-events:auto;
}

.wa-panel-head{
    background:var(--wa-color,#25D366);
    color:#fff;
    padding:16px 18px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}
.wa-panel-title{ font-size:15.5px; font-weight:700; margin-bottom:4px; }
.wa-panel-subtitle{ font-size:12.5px; opacity:.9; }
.wa-panel-head-icon{
    flex-shrink:0;
    width:34px;
    height:34px;
    border-radius:50%;
    background:rgba(255,255,255,.18);
    display:flex;
    align-items:center;
    justify-content:center;
}
.wa-panel-head-icon svg{ width:19px; height:19px; }

.wa-panel-body{
    max-height:320px;
    overflow-y:auto;
}
.wa-agent-row{
    display:flex;
    align-items:center;
    gap:12px;
    padding:13px 16px;
    text-decoration:none;
    color:var(--ink);
    border-bottom:1px solid var(--line);
    transition:background .15s ease;
}
.wa-agent-row:last-child{ border-bottom:none; }
.wa-agent-row:hover{ background:var(--paper); }

.wa-agent-avatar{
    flex-shrink:0;
    width:44px;
    height:44px;
    border-radius:50%;
    object-fit:cover;
}
.wa-agent-avatar-fallback{
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--teal-soft);
    color:var(--teal);
    font-weight:700;
    font-size:16px;
}

.wa-agent-info{
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
}
.wa-agent-name{ font-size:14px; font-weight:700; color:var(--ink); }
.wa-agent-role{ font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wa-agent-role.wa-agent-pending{ color:var(--gold); }

.wa-agent-icon{
    flex-shrink:0;
    width:30px;
    height:30px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
}
.wa-agent-icon svg{ width:16px; height:16px; }
.wa-agent-icon.is-online{ background:var(--wa-color,#25D366); }
.wa-agent-icon.is-pending{ background:var(--line); color:var(--muted); }

@media (max-width:576px){
    .wa-support-widget{ bottom:18px; }
    .wa-support-widget.pos-right{ right:18px; }
    .wa-support-widget.pos-left{ left:18px; }
    .wa-btn{ width:46px; height:46px; }
    .wa-btn svg{ width:22px; height:22px; }
    .wa-label{ display:none; }
    .wa-bubble{ max-width:170px; font-size:12.5px; padding:10px 26px 10px 12px; }
    .wa-panel{ bottom:58px; }
}

@media (prefers-reduced-motion: reduce){
    .wa-bubble,
    .wa-panel,
    .wa-icon-chat,
    .wa-icon-close{ transition:opacity .01s, visibility .01s; }
}