/* ═══ shop-dark.css — جداشده از main.css (خطوط 7042-8141 نسخهٔ v1.1.267) بدون هیچ تغییری در محتوا/ترتیب.
   بازطراحی فروشگاه/دسته + دارک‌مود شاپ + badge v61
   ترتیب لود (زنجیرهٔ dependency در functions.php) = ترتیب قبلی داخل main.css. ═══ */
/* ═══════════════════════════════════════
   FIX v57 — Complete shop/category dark mode
   Based on actual WooCommerce shop markup:
   plist-item, plist-link, pcard, sidebar, filters, badges, price boxes.
   دارک مود اصولی: خاکستری/گرافیتی، نه مشکی خام.
═══════════════════════════════════════ */

:root{
    /*
     * Compatibility aliases only. The active Light/Dark values belong to the
     * global Vaslyar design system in vaslyar-shell.css.
     */
    --hg-shop-page-bg:var(--vy-paper);
    --hg-shop-bg-soft:var(--vy-subtle);
    --hg-shop-card:var(--vy-surface);
    --hg-shop-card-2:var(--vy-elevated);
    --hg-shop-card-3:var(--vy-hover);
    --hg-shop-ink:var(--vy-ink);
    --hg-shop-muted:var(--vy-muted);
    --hg-shop-muted-2:var(--vy-muted-2);
    --hg-shop-line:var(--vy-line);
    --hg-shop-line-soft:color-mix(in srgb,var(--vy-line) 70%,transparent);
    --hg-shop-primary:var(--vy-brand);
    --hg-shop-primary-hover:var(--vy-brand-hover);
    --hg-shop-primary-text:var(--vy-on-brand);
    --hg-shop-green:var(--vy-success);
    --hg-shop-green-bg:var(--vy-success-soft);
    --hg-shop-orange:var(--vy-warning);
    --hg-shop-orange-bg:var(--vy-warning-soft);
    --hg-shop-blue:var(--vy-info);
    --hg-shop-blue-bg:var(--vy-info-soft);
    --hg-shop-shadow:var(--vy-shadow);
    --hg-shop-shadow-soft:var(--vy-shadow-soft);
}

/* Page base */
body.hg-product-archive{
    background:
        radial-gradient(circle at 82% 0%, color-mix(in srgb,var(--vy-muted) 8%,transparent), transparent 30%),
        linear-gradient(180deg,var(--hg-shop-bg-soft),var(--hg-shop-page-bg))!important;
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] body.hg-product-archive{
    background:
        radial-gradient(circle at 82% 0%, color-mix(in srgb,var(--vy-muted) 8%,transparent), transparent 30%),
        linear-gradient(180deg,var(--hg-shop-bg-soft),var(--hg-shop-page-bg))!important;
}

.hg-product-archive .site-main,
.shop-container,
.shop-main{
    background:transparent!important;
    color:var(--hg-shop-ink)!important;
}

/* Breadcrumb */
.breadcrumb-wrap{
    color:var(--hg-shop-muted)!important;
}
.breadcrumb{
    background:var(--hg-shop-card)!important;
    border:1px solid var(--hg-shop-line)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
}
.breadcrumb,
.breadcrumb li,
.breadcrumb a,
.breadcrumb svg{
    color:var(--hg-shop-muted)!important;
}
.breadcrumb a:hover{
    color:var(--hg-shop-ink)!important;
}

/* Mobile filter bar */
.mobile-filter-bar{
    background:transparent!important;
}
.mf-btn,
.mf-sort-btn{
    background:var(--hg-shop-card)!important;
    border:1px solid var(--hg-shop-line)!important;
    color:var(--hg-shop-muted)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
}
.mf-btn svg{
    color:var(--hg-shop-muted)!important;
}
.mf-btn.active,
.mf-btn[aria-selected="true"]{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
    border-color:transparent!important;
}
.mf-btn.active svg,
.mf-btn[aria-selected="true"] svg{
    color:var(--hg-shop-primary-text)!important;
}

/* Sidebar and filter boxes */
.sidebar-card,
.sidebar-section,
.cat-search-wrap,
.cat-list-wrap,
.price-range-wrap,
.shop-topbar,
.no-products{
    background:var(--hg-shop-card)!important;
    border-color:var(--hg-shop-line)!important;
    color:var(--hg-shop-ink)!important;
    box-shadow:var(--hg-shop-shadow)!important;
}
.sidebar-card{
    border:1px solid var(--hg-shop-line)!important;
}
.sidebar-section{
    box-shadow:none!important;
    border-color:var(--hg-shop-line-soft)!important;
}
.sidebar-title,
.price-label,
.result-count,
.result-count strong,
.woocommerce-ordering label{
    color:var(--hg-shop-ink)!important;
}
.cat-search,
.price-input,
.sort-select,
select.sort-select{
    background:var(--hg-shop-card-2)!important;
    border:1px solid var(--hg-shop-line)!important;
    color:var(--hg-shop-ink)!important;
    box-shadow:none!important;
}
.cat-search::placeholder,
.price-input::placeholder{
    color:var(--hg-shop-muted-2)!important;
}
.cat-search-ico,
.price-sep-line{
    color:var(--hg-shop-muted)!important;
    border-color:var(--hg-shop-line-soft)!important;
}
.cat-search-ico svg{
    color:var(--hg-shop-muted)!important;
    stroke:currentColor!important;
}

/* Category filter buttons */
.cat-btn{
    background:transparent!important;
    color:var(--hg-shop-muted)!important;
    border:1px solid transparent!important;
    box-shadow:none!important;
}
.cat-btn:hover{
    background:var(--hg-shop-card-2)!important;
    color:var(--hg-shop-ink)!important;
    border-color:var(--hg-shop-line-soft)!important;
}
.cat-btn.active{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
    border-color:transparent!important;
}
.cat-count{
    background:var(--hg-shop-card-3)!important;
    color:var(--hg-shop-muted)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
}
.cat-btn.active .cat-count{
    background:color-mix(in srgb,var(--vy-on-brand) 16%,transparent)!important;
    color:var(--hg-shop-primary-text)!important;
    border-color:transparent!important;
}
.btn-price-apply{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
    border-color:transparent!important;
}

/* Topbar + view buttons */
.shop-topbar{
    background:var(--hg-shop-card)!important;
    border:1px solid var(--hg-shop-line)!important;
}
.result-count{
    color:var(--hg-shop-muted)!important;
}
.result-count strong{
    color:var(--hg-shop-ink)!important;
}
.view-toggle{
    background:var(--hg-shop-card-2)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
}
.vbtn{
    background:transparent!important;
    border:1px solid transparent!important;
    color:var(--hg-shop-muted)!important;
}
.vbtn svg{
    stroke:currentColor!important;
}
.vbtn:hover{
    background:var(--hg-shop-card)!important;
    color:var(--hg-shop-ink)!important;
}
.vbtn.active,
.vbtn[aria-pressed="true"]{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
    border-color:transparent!important;
}

/* Grid product cards */
.products-grid,
.products-list{
    color:var(--hg-shop-ink)!important;
}
.product-card,
.pcard-link,
.plist-item,
.plist-link{
    background:var(--hg-shop-card)!important;
    border-color:var(--hg-shop-line)!important;
    color:var(--hg-shop-ink)!important;
}
.product-card,
.plist-item{
    box-shadow:var(--hg-shop-shadow)!important;
}
.product-card:hover,
.plist-item:hover{
    border-color:var(--hg-shop-line)!important;
    box-shadow:var(--hg-shop-shadow)!important;
}
html[data-hg-theme="dark"] .product-card:hover,
html[data-hg-theme="dark"] .plist-item:hover{
    box-shadow:var(--hg-shop-shadow)!important;
}
.pcard-img,
.plist-thumb{
    background:linear-gradient(145deg,var(--hg-shop-card-2),var(--hg-shop-card-3))!important;
    border-color:var(--hg-shop-line-soft)!important;
}
.pcard-img img,
.plist-thumb img{
    filter:none!important;
}
html[data-hg-theme="dark"] .pcard-img img,
html[data-hg-theme="dark"] .plist-thumb img{
    filter:brightness(.92) contrast(1.04)!important;
}
.pcard-img svg,
.plist-thumb svg{
    color:var(--hg-shop-muted)!important;
    stroke:currentColor!important;
}
.pcard-body,
.plist-info,
.plist-actions{
    background:transparent!important;
    color:var(--hg-shop-ink)!important;
}
.pcard-cat,
.plist-cat{
    color:var(--hg-shop-muted)!important;
}
.pcard-name,
.plist-name,
.product-card h2,
.plist-item h2{
    color:var(--hg-shop-ink)!important;
}
.pcard-footer,
.plist-link{
    border-color:var(--hg-shop-line-soft)!important;
}

/* Prices */
.pcard-price,
.plist-price,
.pcard-price ins,
.plist-price ins,
.pcard-price .woocommerce-Price-amount,
.plist-price .woocommerce-Price-amount,
.pcard-price bdi,
.plist-price bdi{
    color:var(--hg-shop-ink)!important;
}
.pcard-price del,
.plist-price del{
    color:var(--hg-shop-muted-2)!important;
}
body:not(.woocommerce-account) .woocommerce-Price-currencySymbol{
    color:inherit!important;
}

/* Badges and tags */
.badge,
.pcard-save-badge,
.plist-tag,
.save-badge{
    background:var(--hg-shop-card-2)!important;
    color:var(--hg-shop-muted)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
}
.badge-instant,
.plist-tag:not(.plist-tag-sale){
    background:var(--hg-shop-green-bg)!important;
    color:var(--hg-shop-green)!important;
    border-color:var(--vy-success-line)!important;
}
.badge-sale,
.plist-tag-sale,
.save-badge,
.pcard-save-badge{
    background:var(--hg-shop-orange-bg)!important;
    color:var(--hg-shop-orange)!important;
    border-color:var(--vy-warning-line)!important;
}

/* Buttons */
.pcard-buy,
.plist-buy,
.add_to_cart_button,
.button.product_type_simple,
body:not(.woocommerce-account) .woocommerce a.button,
body:not(.woocommerce-account) .woocommerce button.button{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
    border-color:transparent!important;
    box-shadow:none!important;
}
.pcard-buy:hover,
.plist-buy:hover,
.add_to_cart_button:hover,
body:not(.woocommerce-account) .woocommerce a.button:hover,
body:not(.woocommerce-account) .woocommerce button.button:hover{
    opacity:.92!important;
}

/* Hidden state should remain hidden */
.products-grid.hidden,
.products-list.hidden,
.hidden{
    display:none!important;
}

/* Woo messages and notices inside shop */
body:not(.woocommerce-account) .woocommerce-info,
body:not(.woocommerce-account) .woocommerce-message,
body:not(.woocommerce-account) .woocommerce-error{
    background:var(--hg-shop-card)!important;
    color:var(--hg-shop-ink)!important;
    border:1px solid var(--hg-shop-line)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
}
body:not(.woocommerce-account) .woocommerce-error li,
body:not(.woocommerce-account) .woocommerce-message a,
body:not(.woocommerce-account) .woocommerce-info a{
    color:var(--hg-shop-ink)!important;
}

/* Pagination */
body:not(.woocommerce-account) .pagination,
body:not(.woocommerce-account) .woocommerce-pagination{
    color:var(--hg-shop-ink)!important;
}
body:not(.woocommerce-account) .pagination ul li a,
body:not(.woocommerce-account) .pagination ul li span,
body:not(.woocommerce-account) .woocommerce-pagination ul.page-numbers li a,
body:not(.woocommerce-account) .woocommerce-pagination ul.page-numbers li span{
    background:var(--hg-shop-card)!important;
    border:1px solid var(--hg-shop-line)!important;
    color:var(--hg-shop-muted)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
}
body:not(.woocommerce-account) .pagination .current,
body:not(.woocommerce-account) .woocommerce-pagination .current{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
}

/* Category header if exists */
.woocommerce-products-header,
.woocommerce-products-header__title,
.term-description{
    color:var(--hg-shop-ink)!important;
}
.term-description{
    background:var(--hg-shop-card)!important;
    border:1px solid var(--hg-shop-line)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
}

/* Mobile refine */
@media(max-width:760px){
    .breadcrumb{
        background:var(--hg-shop-card)!important;
    }
    .mobile-filter-bar{
        padding-bottom:2px!important;
    }
    .products-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:9px!important;
    }
    .product-card{
        border-radius:18px!important;
    }
    .pcard-img{
        min-height:112px!important;
        height:112px!important;
    }
    .pcard-body{
        padding:9px!important;
    }
    .pcard-name{
        font-size:11.5px!important;
        line-height:1.55!important;
    }
    .pcard-cat{
        font-size:9.4px!important;
    }
    .pcard-buy{
        height:28px!important;
        min-height:28px!important;
        border-radius:10px!important;
        font-size:9.8px!important;
        padding:0 9px!important;
    }
    .pcard-price ins,
    .pcard-price .woocommerce-Price-amount{
        font-size:10.5px!important;
    }
    .badge{
        font-size:8px!important;
        padding:4px 7px!important;
    }

    /* list view mobile */
    .plist-item{
        border-radius:18px!important;
    }
    .plist-link{
        gap:10px!important;
        padding:10px!important;
    }
    .plist-thumb{
        width:56px!important;
        height:56px!important;
        flex-basis:56px!important;
        border-radius:14px!important;
    }
    .plist-name{
        font-size:12px!important;
    }
    .plist-cat,
    .plist-tag,
    .save-badge{
        font-size:8.8px!important;
    }
    .plist-buy{
        height:28px!important;
        border-radius:10px!important;
        font-size:9.5px!important;
    }
}

/* Ultra-specific fallback for any remaining white blocks on shop/category */
body.woocommerce-shop html[data-hg-theme="dark"],
html[data-hg-theme="dark"] body.hg-product-archive .shop-container *{
    scrollbar-color:var(--hg-shop-card-3) var(--hg-shop-bg-soft);
}
html[data-hg-theme="dark"] body.hg-product-archive .sidebar-card,
html[data-hg-theme="dark"] body.hg-product-archive .shop-topbar,
html[data-hg-theme="dark"] body.hg-product-archive .product-card,
html[data-hg-theme="dark"] body.hg-product-archive .plist-item{
    background-color:var(--hg-shop-card)!important;
}


/* ═══════════════════════════════════════
   FIX v58 — Hide visual breadcrumb on shop/category safely
   Breadcrumb markup remains in DOM for accessibility; JSON-LD is added in wp_head.
═══════════════════════════════════════ */

body.hg-product-archive .breadcrumb-wrap{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
    border:0!important;
}

/* Remove the visual top gap that breadcrumb used to create */
body.hg-product-archive .site-main{
    padding-top:18px!important;
}

@media(max-width:760px){
    body.hg-product-archive .site-main{
        /* v1.1.219 — فاصله‌ی بیشتر از هدر شناور تا محتوای شاپ به بالا نچسبد */
        padding-top:22px!important;
    }
}


/* ═══════════════════════════════════════
   FIX v59 — Product category dark-mode polish
   هدف: دکمه‌ها در دارک‌مود زیاد سفید نباشند + بخش‌های روشن واقعی دسته‌بندی پوشش داده شوند
   Markup covered: cat-hero, cat-sort-bar, sidebar, product grid/list, badges, buttons.
═══════════════════════════════════════ */

/* whole category/shop page background */
html[data-hg-theme="dark"] body.hg-product-archive{
    background:
        radial-gradient(circle at 82% 0%, color-mix(in srgb,var(--vy-muted) 7%,transparent), transparent 32%),
        radial-gradient(circle at 10% 80%, color-mix(in srgb,var(--vy-muted) 5%,transparent), transparent 28%),
        linear-gradient(180deg,var(--hg-shop-bg-soft),var(--hg-shop-page-bg))!important;
    color:var(--hg-shop-ink)!important;
}

/* category hero was still light */
html[data-hg-theme="dark"] .cat-hero,
html[data-hg-theme="dark"] .cat-hero-inner{
    background:transparent!important;
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .cat-hero-inner{
    border:1px solid var(--hg-shop-line)!important;
    background:
        radial-gradient(circle at 84% 0%, color-mix(in srgb,var(--vy-ink) 5.5%,transparent), transparent 32%),
        var(--vy-gradient-surface)!important;
    box-shadow:var(--hg-shop-shadow)!important;
}
html[data-hg-theme="dark"] .cat-hero-title{
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .cat-hero-desc,
html[data-hg-theme="dark"] .cat-hero-text p{
    color:var(--hg-shop-muted)!important;
}
html[data-hg-theme="dark"] .cat-hero-count,
html[data-hg-theme="dark"] .cat-hero-meta span{
    background:var(--hg-shop-card-2)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
    color:var(--hg-shop-muted)!important;
}

/* category mobile sort bar was still light */
html[data-hg-theme="dark"] .cat-sort-bar{
    background:var(--hg-shop-card)!important;
    border:1px solid var(--hg-shop-line)!important;
    color:var(--hg-shop-ink)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
}
html[data-hg-theme="dark"] .cat-sort-label{
    color:var(--hg-shop-muted)!important;
}
html[data-hg-theme="dark"] .cat-sort-select,
html[data-hg-theme="dark"] .cat-sort-bar select{
    background:var(--hg-shop-card-2)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
    color:var(--hg-shop-ink)!important;
    box-shadow:none!important;
}

/* sidebar and filter internals */
html[data-hg-theme="dark"] .sidebar,
html[data-hg-theme="dark"] .shop-main,
html[data-hg-theme="dark"] .shop-container{
    background:transparent!important;
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .sidebar-card,
html[data-hg-theme="dark"] .sidebar-section,
html[data-hg-theme="dark"] .price-range-wrap,
html[data-hg-theme="dark"] .shop-topbar{
    background:var(--hg-shop-card)!important;
    border-color:var(--hg-shop-line)!important;
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .sidebar-section{
    background:var(--hg-shop-card-2)!important;
}
html[data-hg-theme="dark"] .sidebar-title,
html[data-hg-theme="dark"] .price-label,
html[data-hg-theme="dark"] .cat-sort-label,
html[data-hg-theme="dark"] .result-count{
    color:var(--hg-shop-muted)!important;
}
html[data-hg-theme="dark"] .result-count strong{
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .price-input,
html[data-hg-theme="dark"] .sort-select,
html[data-hg-theme="dark"] #sortSelect,
html[data-hg-theme="dark"] #priceMin,
html[data-hg-theme="dark"] #priceMax{
    background:var(--vy-input-bg)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .price-input::placeholder{
    color:var(--hg-shop-muted-2)!important;
}
html[data-hg-theme="dark"] .price-sep-line{
    background:var(--hg-shop-line)!important;
}

/* buttons: graphite instead of bright white */
html[data-hg-theme="dark"] .btn-price-apply,
html[data-hg-theme="dark"] .pcard-buy,
html[data-hg-theme="dark"] .plist-buy,
html[data-hg-theme="dark"] .add_to_cart_button,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce a.button,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce button.button{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
    border:1px solid var(--vy-brand-line)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
}
html[data-hg-theme="dark"] .btn-price-apply:hover,
html[data-hg-theme="dark"] .pcard-buy:hover,
html[data-hg-theme="dark"] .plist-buy:hover,
html[data-hg-theme="dark"] .add_to_cart_button:hover,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce a.button:hover,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce button.button:hover{
    background:var(--hg-shop-primary-hover)!important;
    color:var(--hg-shop-primary-text)!important;
}

/* view toggle buttons */
html[data-hg-theme="dark"] .view-toggle{
    background:var(--hg-shop-card-2)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
}
html[data-hg-theme="dark"] .vbtn{
    background:transparent!important;
    color:var(--hg-shop-muted)!important;
}
html[data-hg-theme="dark"] .vbtn.active,
html[data-hg-theme="dark"] .vbtn[aria-pressed="true"]{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
    border:1px solid var(--vy-brand-line)!important;
}
html[data-hg-theme="dark"] .vbtn svg{
    stroke:currentColor!important;
}

/* product cards: all inner white areas */
html[data-hg-theme="dark"] .product-card,
html[data-hg-theme="dark"] .pcard-link,
html[data-hg-theme="dark"] .plist-item,
html[data-hg-theme="dark"] .plist-link{
    background:var(--hg-shop-card)!important;
    border-color:var(--hg-shop-line)!important;
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .pcard-body,
html[data-hg-theme="dark"] .pcard-footer,
html[data-hg-theme="dark"] .plist-info,
html[data-hg-theme="dark"] .plist-actions{
    background:transparent!important;
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .pcard-img,
html[data-hg-theme="dark"] .plist-thumb{
    background:var(--vy-gradient-surface)!important;
    border-color:var(--hg-shop-line-soft)!important;
}
html[data-hg-theme="dark"] .pcard-img img,
html[data-hg-theme="dark"] .plist-thumb img{
    filter:brightness(.90) contrast(1.05)!important;
}
html[data-hg-theme="dark"] .pcard-img svg,
html[data-hg-theme="dark"] .plist-thumb svg{
    stroke:var(--hg-shop-muted)!important;
    color:var(--hg-shop-muted)!important;
}

/* text and price */
html[data-hg-theme="dark"] .pcard-name,
html[data-hg-theme="dark"] .plist-name{
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .pcard-cat,
html[data-hg-theme="dark"] .plist-cat{
    color:var(--hg-shop-muted)!important;
}
html[data-hg-theme="dark"] .pcard-price,
html[data-hg-theme="dark"] .plist-price,
html[data-hg-theme="dark"] .pcard-price ins,
html[data-hg-theme="dark"] .plist-price ins,
html[data-hg-theme="dark"] .pcard-price bdi,
html[data-hg-theme="dark"] .plist-price bdi,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce-Price-amount{
    color:var(--hg-shop-ink)!important;
}
html[data-hg-theme="dark"] .pcard-price del,
html[data-hg-theme="dark"] .plist-price del{
    color:var(--hg-shop-muted-2)!important;
}

/* badges: softer in dark */
html[data-hg-theme="dark"] .badge,
html[data-hg-theme="dark"] .pcard-save-badge,
html[data-hg-theme="dark"] .plist-tag,
html[data-hg-theme="dark"] .save-badge{
    background:var(--hg-shop-card-2)!important;
    color:var(--hg-shop-muted)!important;
    border:1px solid var(--hg-shop-line-soft)!important;
}
html[data-hg-theme="dark"] .badge-instant,
html[data-hg-theme="dark"] .plist-tag:not(.plist-tag-sale){
    background:var(--hg-shop-green-bg)!important;
    color:var(--hg-shop-green)!important;
    border-color:var(--vy-success-line)!important;
}
html[data-hg-theme="dark"] .badge-sale,
html[data-hg-theme="dark"] .plist-tag-sale,
html[data-hg-theme="dark"] .save-badge,
html[data-hg-theme="dark"] .pcard-save-badge{
    background:var(--hg-shop-orange-bg)!important;
    color:var(--hg-shop-orange)!important;
    border-color:var(--vy-warning-line)!important;
}

/* list view leftovers */
html[data-hg-theme="dark"] .products-list,
html[data-hg-theme="dark"] .products-grid{
    background:transparent!important;
}
html[data-hg-theme="dark"] .plist-tags{
    background:transparent!important;
}

/* pagination / empty */
html[data-hg-theme="dark"] body:not(.woocommerce-account) .pagination,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .pagination *,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce-pagination,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce-pagination *{
    color:var(--hg-shop-muted)!important;
}
html[data-hg-theme="dark"] body:not(.woocommerce-account) .pagination .current,
html[data-hg-theme="dark"] body:not(.woocommerce-account) .woocommerce-pagination .current{
    background:var(--hg-shop-primary)!important;
    color:var(--hg-shop-primary-text)!important;
}

/* If any internal div still inherits pure white */
html[data-hg-theme="dark"] body.hg-product-archive .shop-container .sidebar-card *,
html[data-hg-theme="dark"] body.hg-product-archive .shop-container .shop-topbar *,
html[data-hg-theme="dark"] body.hg-product-archive .shop-container .product-card *,
html[data-hg-theme="dark"] body.hg-product-archive .shop-container .plist-item *{
    border-color:inherit;
}

/* Mobile: category hero and sort compact + dark */
@media(max-width:760px){
    html[data-hg-theme="dark"] .cat-hero-inner{
        border-radius:22px!important;
    }
    html[data-hg-theme="dark"] .cat-sort-bar{
        border-radius:18px!important;
    }
    html[data-hg-theme="dark"] .cat-sort-select{
        min-height:34px!important;
        border-radius:13px!important;
    }
}


/* ═══════════════════════════════════════
   FIX v60 — Category hero dark-mode layout stability
   مشکل: در دارک‌مود cat-hero جمع می‌شد و فرم خودش را از دست می‌داد.
   این بخش layout را در روز/شب ثابت نگه می‌دارد و فقط رنگ‌ها را عوض می‌کند.
═══════════════════════════════════════ */

.cat-hero{
    width:min(1180px, calc(100% - 28px))!important;
    margin:22px auto 18px!important;
    padding:0!important;
    display:block!important;
    position:relative!important;
    overflow:visible!important;
    color:var(--hg-shop-ink)!important;
    background:transparent!important;
}

.cat-hero-inner{
    width:100%!important;
    min-height:112px!important;
    padding:24px 26px!important;
    display:grid!important;
    grid-template-columns:minmax(0, 1fr) auto!important;
    align-items:center!important;
    gap:18px!important;
    border-radius:30px!important;
    border:1px solid var(--hg-shop-line)!important;
    background:
        radial-gradient(circle at 84% 0%, color-mix(in srgb,var(--vy-ink) 5%,transparent), transparent 34%),
        var(--vy-gradient-surface)!important;
    box-shadow:var(--hg-shop-shadow)!important;
    overflow:hidden!important;
    position:relative!important;
    box-sizing:border-box!important;
}

.cat-hero-inner::before{
    content:""!important;
    position:absolute!important;
    inset:auto 18px 16px auto!important;
    width:94px!important;
    height:94px!important;
    border-radius:999px!important;
    background:radial-gradient(circle, color-mix(in srgb,var(--vy-ink) 5.5%,transparent), transparent 70%)!important;
    pointer-events:none!important;
}

.cat-hero-text{
    min-width:0!important;
    position:relative!important;
    z-index:1!important;
}

.cat-hero-title{
    margin:0!important;
    padding:0!important;
    color:var(--hg-shop-ink)!important;
    font-size:clamp(22px, 3vw, 34px)!important;
    font-weight:1000!important;
    line-height:1.35!important;
    letter-spacing:-.7px!important;
    white-space:normal!important;
}

.cat-hero-desc,
.cat-hero-text p{
    margin:8px 0 0!important;
    max-width:720px!important;
    color:var(--hg-shop-muted)!important;
    font-size:12px!important;
    line-height:1.9!important;
    font-weight:750!important;
}

.cat-hero-meta{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    min-width:max-content!important;
    position:relative!important;
    z-index:1!important;
}

.cat-hero-count{
    min-width:96px!important;
    min-height:42px!important;
    padding:0 15px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    border-radius:999px!important;
    border:1px solid var(--hg-shop-line)!important;
    background:color-mix(in srgb,var(--hg-shop-card) 82%,transparent)!important;
    color:var(--hg-shop-muted)!important;
    font-size:12px!important;
    font-weight:950!important;
    white-space:nowrap!important;
    box-shadow:none!important;
}

/* Dark mode: same structure, only premium graphite colors */
html[data-hg-theme="dark"] .cat-hero{
    color:var(--hg-shop-ink)!important;
    background:transparent!important;
}

html[data-hg-theme="dark"] .cat-hero-inner{
    min-height:112px!important;
    padding:24px 26px!important;
    display:grid!important;
    grid-template-columns:minmax(0, 1fr) auto!important;
    align-items:center!important;
    gap:18px!important;
    border-radius:30px!important;
    border:1px solid var(--hg-shop-line)!important;
    background:
        radial-gradient(circle at 84% 0%, color-mix(in srgb,var(--vy-muted) 13%,transparent), transparent 34%),
        var(--vy-gradient-surface)!important;
    box-shadow:var(--hg-shop-shadow)!important;
    overflow:hidden!important;
}

html[data-hg-theme="dark"] .cat-hero-inner::before{
    background:radial-gradient(circle, color-mix(in srgb,var(--vy-muted) 12%,transparent), transparent 70%)!important;
}

html[data-hg-theme="dark"] .cat-hero-title{
    color:var(--hg-shop-ink)!important;
}

html[data-hg-theme="dark"] .cat-hero-desc,
html[data-hg-theme="dark"] .cat-hero-text p{
    color:var(--hg-shop-muted)!important;
}

html[data-hg-theme="dark"] .cat-hero-count{
    min-width:96px!important;
    min-height:42px!important;
    padding:0 15px!important;
    border:1px solid var(--hg-shop-line)!important;
    background:color-mix(in srgb,var(--hg-shop-card-2) 82%,transparent)!important;
    color:var(--hg-shop-muted)!important;
}

/* Mobile: keep hero from collapsing */
@media(max-width:760px){
    .cat-hero{
        width:min(100% - 18px, 100%)!important;
        margin:14px auto 12px!important;
    }

    .cat-hero-inner,
    html[data-hg-theme="dark"] .cat-hero-inner{
        min-height:94px!important;
        padding:17px 16px!important;
        grid-template-columns:minmax(0, 1fr)!important;
        gap:12px!important;
        border-radius:22px!important;
        align-items:start!important;
    }

    .cat-hero-title{
        font-size:22px!important;
        line-height:1.35!important;
    }

    .cat-hero-desc,
    .cat-hero-text p{
        font-size:10.5px!important;
        line-height:1.75!important;
        margin-top:5px!important;
    }

    .cat-hero-meta{
        justify-content:flex-start!important;
        min-width:0!important;
    }

    .cat-hero-count,
    html[data-hg-theme="dark"] .cat-hero-count{
        min-width:0!important;
        min-height:32px!important;
        padding:0 11px!important;
        font-size:10px!important;
    }

    .cat-hero-inner::before{
        width:72px!important;
        height:72px!important;
        inset:auto 14px 12px auto!important;
    }
}


/* ═══════════════════════════════════════
   FIX v61 — Discount save badge dark-mode
   Target:
   <div class="pcard-save-wrap"><span class="pcard-save-badge">... صرفه‌جویی</span></div>
   مشکل: در دارک‌مود روشن می‌ماند؛ این rule با specificity بالا و بدون سفید خام فیکس می‌کند.
═══════════════════════════════════════ */

html[data-hg-theme="dark"] .pcard-save-wrap,
html[data-hg-theme="dark"] .product-card .pcard-save-wrap,
html[data-hg-theme="dark"] body.hg-product-archive .pcard-save-wrap{
    background:transparent!important;
    box-shadow:none!important;
}

html[data-hg-theme="dark"] .pcard-save-badge,
html[data-hg-theme="dark"] .product-card .pcard-save-badge,
html[data-hg-theme="dark"] .pcard-save-wrap .pcard-save-badge,
html[data-hg-theme="dark"] body.hg-product-archive .pcard-save-wrap .pcard-save-badge{
    background:var(--hg-shop-orange-bg)!important;
    color:var(--hg-shop-orange)!important;
    border:1px solid var(--vy-warning-line)!important;
    box-shadow:var(--hg-shop-shadow-soft)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
}

/* If Woo/product-card stylesheet loads after main.css, this keeps the light-mode clean too */
.pcard-save-badge{
    border:1px solid var(--vy-warning-line)!important;
}

/* List-view saving badge too */
html[data-hg-theme="dark"] .save-badge,
html[data-hg-theme="dark"] .plist-price .save-badge,
html[data-hg-theme="dark"] body.hg-product-archive .plist-price .save-badge{
    background:var(--hg-shop-orange-bg)!important;
    color:var(--hg-shop-orange)!important;
    border:1px solid var(--vy-warning-line)!important;
    box-shadow:none!important;
}

/* Mobile: keep badge compact and readable */
@media(max-width:760px){
    html[data-hg-theme="dark"] .pcard-save-badge,
    html[data-hg-theme="dark"] .product-card .pcard-save-badge{
        font-size:8px!important;
        padding:4px 7px!important;
        border-radius:999px!important;
    }
}
