/* تم نیمه‌شب «نئون»: همیشه تیره، شبکهٔ محو، نوار جست‌وجوی فرمانی، کارت پوستری، چیدمان بنتو، درخشش نئونی */
:root,:root:not([data-theme=light]){--accent:#38bdf8;--accent-ink:#04202e;--bg:#070b14;--surface:#0e1525;--ink:#e8eef9;--muted:#9aa9c2;--line:#1d2943;--soft:#152038;--radius:14px;--radius-lg:20px;--e1:none;--e2:0 12px 28px -14px rgba(0,0,0,.7);--e3:0 24px 50px -16px rgba(0,0,0,.85);--shadow:none;--fbg:#05080f;--fink:#9aa9c2;--fhead:#e8eef9;--fline:#1d2943;--glow:0 0 22px color-mix(in srgb,var(--accent) 26%,transparent);--glow-b:color-mix(in srgb,var(--accent) 45%,var(--line));color-scheme:dark}
.theme-midnight[data-o-glow=off]{--glow:0 0 0 transparent}
.theme-midnight[data-o-glow=strong]{--glow:0 0 30px color-mix(in srgb,var(--accent) 52%,transparent);--glow-b:var(--accent)}
.theme-midnight{background:radial-gradient(900px 420px at 85% -80px,color-mix(in srgb,var(--accent) 11%,transparent),transparent),var(--bg)}
.theme-midnight .btn{box-shadow:var(--glow);border-radius:10px}
.theme-midnight .btn:hover{filter:brightness(1.12)}
.theme-midnight .icon-btn{background:var(--surface);border-radius:10px}
.theme-midnight .icon-btn:hover{border-color:var(--accent);box-shadow:var(--glow)}
.theme-midnight .chip{background:color-mix(in srgb,var(--accent) 14%,transparent);border:1px solid color-mix(in srgb,var(--accent) 28%,transparent);border-radius:8px}

/* ----- هدر شیشه‌ای و جست‌وجوی فرمانی ----- */
.theme-midnight .site-header{background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.theme-midnight .brand::before{content:"";flex:none;width:10px;height:10px;border-radius:50%;background:var(--accent);box-shadow:0 0 14px var(--accent)}
.theme-midnight .brand:has(img)::before{display:none}
.theme-midnight .search input{background:#050912;border-radius:10px;border-color:var(--line);height:44px}
.theme-midnight .search input:focus{border-color:var(--accent);box-shadow:var(--glow)}
.theme-midnight .search .btn{min-height:44px;border-radius:10px;width:46px;padding:0}
.theme-midnight .search .btn span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.theme-midnight .search:not(.search-hero)::after{content:"/";position:absolute;inset-inline-end:60px;top:11px;width:22px;height:22px;display:grid;place-items:center;border:1px solid var(--line);border-radius:6px;font-size:.78rem;line-height:1;color:var(--muted);pointer-events:none}
@media (hover:none){.theme-midnight .search::after{display:none}}
.theme-midnight .sugg{background:var(--surface);border-color:var(--glow-b);border-radius:12px}
.theme-midnight .cats ul{padding-bottom:0}
.theme-midnight .cats a{border-radius:0;border:0;border-bottom:2px solid transparent;min-height:42px;color:var(--muted)}
.theme-midnight .cats a:hover{background:none;color:var(--ink);border-bottom-color:var(--line)}
.theme-midnight .cats a[aria-current=page]{background:none;color:var(--at);border-bottom-color:var(--accent);box-shadow:0 8px 14px -10px var(--accent)}
.theme-midnight .drawer{border-inline-end:1px solid var(--line)}

/* ----- هیرو: شبکه + درخشش ----- */
.theme-midnight .hero{background:radial-gradient(70% 140% at 88% -10%,color-mix(in srgb,var(--accent) 20%,transparent),transparent 70%),var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.theme-midnight .hero::before{background:linear-gradient(var(--line) 1px,transparent 1px) 0 0/38px 38px,linear-gradient(90deg,var(--line) 1px,transparent 1px) 0 0/38px 38px;-webkit-mask-image:radial-gradient(75% 95% at 78% 35%,#000,transparent);mask-image:radial-gradient(75% 95% at 78% 35%,#000,transparent);opacity:.8}
.theme-midnight[data-o-gridbg=off] .hero::before{display:none}
.theme-midnight .hero h1{font-size:clamp(2rem,5.6vw,3.5rem);letter-spacing:-.01em;text-shadow:0 0 36px color-mix(in srgb,var(--accent) 30%,transparent)}
.theme-midnight .lead{color:var(--muted)}
.theme-midnight .search-hero input{height:58px;border-radius:12px;background:#050912;border:1px solid var(--glow-b);box-shadow:var(--glow);font-size:1.02rem}
.theme-midnight .search-hero .btn{min-height:58px;width:auto;padding:0 26px;border-radius:12px}
.theme-midnight .search-hero .btn span{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
.theme-midnight .hero-links a{background:#0a1120;border-radius:8px;border-color:var(--line)}
.theme-midnight .hero-links a:hover{border-color:var(--accent);color:var(--at)}
.theme-midnight .trust-strip li{background:#09101e;border-color:var(--line);border-radius:12px;box-shadow:none}
.theme-midnight .trust-strip .ico{background:color-mix(in srgb,var(--accent) 14%,transparent);box-shadow:0 0 16px -4px var(--accent);border-radius:10px}

.theme-midnight .sec-head h2::before,.theme-midnight section>h2::before{width:4px;border-radius:2px;box-shadow:0 0 12px var(--accent)}
.theme-midnight .sec-head a{background:var(--soft);border:1px solid var(--line);border-radius:8px}
.theme-midnight .sec-head a:hover{border-color:var(--accent);background:var(--soft)}
.theme-midnight .cat-grid a{background:var(--surface);border-radius:12px}
.theme-midnight .cat-grid a:hover{border-color:var(--glow-b);box-shadow:var(--glow)}
.theme-midnight .cat-grid .ico{background:color-mix(in srgb,var(--accent) 14%,transparent);border-radius:10px}

/* ----- پوستر ----- */
.theme-midnight .grid{gap:16px}
.theme-midnight .card{background:var(--surface);border-color:var(--line);border-radius:16px}
@media (hover:hover){.theme-midnight .card:hover{transform:translateY(-4px);border-color:var(--glow-b);box-shadow:var(--glow),var(--e2)}}
.theme-midnight[data-o-poster=poster] .card{display:grid;aspect-ratio:3/4;overflow:hidden}
.theme-midnight[data-o-poster=poster] .card-img,.theme-midnight[data-o-poster=poster] .card-body{grid-area:1/1;min-width:0}
.theme-midnight[data-o-poster=poster] .card-img{aspect-ratio:auto;height:100%}
.theme-midnight[data-o-poster=poster] .card-img img{transition:transform .5s}
@media (hover:hover){.theme-midnight[data-o-poster=poster] .card:hover .card-img img{transform:scale(1.06)}}
.theme-midnight[data-o-poster=poster] .card-body{align-self:end;position:static;padding:64px 14px 14px;background:linear-gradient(to top,rgba(5,8,16,.97) 28%,rgba(5,8,16,.78) 68%,transparent);gap:6px}
.theme-midnight[data-o-poster=poster] .card-body .chip{position:absolute;top:12px;inset-inline-start:12px;background:rgba(5,8,16,.72);backdrop-filter:blur(6px);color:var(--at)}
.theme-midnight[data-o-poster=poster] .card-title{color:#fff;font-size:1rem}
.theme-midnight[data-o-poster=poster] .card-title a{color:#fff}
.theme-midnight[data-o-poster=poster] .card-title a:hover{color:var(--accent)}
.theme-midnight[data-o-poster=poster] .card-foot{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px;padding-top:2px}
.theme-midnight[data-o-poster=poster] .card-foot .btn{background:var(--accent);color:var(--accent-ink);border:0;box-shadow:var(--glow)}
.theme-midnight[data-o-poster=poster] .card-foot .btn:hover{background:var(--accent);filter:brightness(1.12)}
.theme-midnight[data-o-poster=poster] .price b{color:var(--accent);font-size:1.12rem;text-shadow:0 0 14px color-mix(in srgb,var(--accent) 50%,transparent)}
.theme-midnight[data-o-poster=poster] .price small{color:#b5c2d8}
.theme-midnight[data-o-poster=poster] .price.none{color:#b5c2d8}
.theme-midnight[data-o-poster=card] .card-foot .btn{background:transparent;color:var(--at);border-color:var(--glow-b)}
.theme-midnight .price b{color:var(--at)}
.theme-midnight .noimg{background-color:var(--soft)}

/* بنتو: اولین محصول دو برابر */
@media (min-width:900px){
  .theme-midnight[data-o-bento=on][data-o-poster=poster] .sec-latest .grid{grid-auto-flow:dense}
  .theme-midnight[data-o-bento=on][data-o-poster=poster] .sec-latest .grid>.card:first-child{grid-column:span 2;grid-row:span 2;aspect-ratio:auto}
  .theme-midnight[data-o-bento=on][data-o-poster=poster] .sec-latest .grid>.card:first-child .card-title{font-size:1.5rem;-webkit-line-clamp:3}
  .theme-midnight[data-o-bento=on][data-o-poster=poster] .sec-latest .grid>.card:first-child .card-body{padding:96px 24px 22px}
  .theme-midnight[data-o-bento=on][data-o-poster=poster] .sec-latest .grid>.card:first-child .price b{font-size:1.5rem}
}
@media (max-width:640px){.theme-midnight[data-o-poster=poster] .card{aspect-ratio:3/4}.theme-midnight[data-o-poster=poster] .card-body{padding:48px 10px 10px}.theme-midnight[data-o-poster=poster] .card-foot .btn-sm{width:100%}}
.theme-midnight .toolbar .muted{font-size:.9rem}
.theme-midnight .sorts a,.theme-midnight .pager a,.theme-midnight .pager span,.theme-midnight .tag-list a{border-radius:8px;background:var(--surface)}
.theme-midnight .sorts a[aria-current],.theme-midnight .pager span[aria-current]{background:var(--accent);box-shadow:var(--glow)}

/* ----- محصول ----- */
.theme-midnight .product{background:var(--surface);border-radius:var(--radius-lg);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.theme-midnight .p-media img,.theme-midnight .p-media .noimg{border-radius:14px;border-color:var(--line)}
.theme-midnight .buy{background:#09101e;border-color:var(--glow-b);box-shadow:var(--glow);border-radius:16px}
.theme-midnight .p-price .price b{color:var(--accent);text-shadow:0 0 18px color-mix(in srgb,var(--accent) 45%,transparent)}
.theme-midnight .share,.theme-midnight .desc-more{border-radius:10px;background:var(--surface)}
.theme-midnight .sticky-cta{background:color-mix(in srgb,var(--bg) 92%,transparent)}
.theme-midnight .prose{background:var(--surface)}

/* ----- پاورقی ----- */
.theme-midnight .site-footer{position:relative;border-top:1px solid var(--line);margin-top:24px;background:var(--fbg)}
.theme-midnight .site-footer::before{content:"";position:absolute;top:-1px;inset-inline:12%;height:1px;background:linear-gradient(90deg,transparent,var(--accent),transparent);box-shadow:0 0 18px var(--accent)}
.theme-midnight .foot-badges li{border-radius:8px;border-color:var(--glow-b)}
.theme-midnight .foot-badges svg{color:var(--accent)}
.theme-midnight .foot-note{border-radius:12px;background:var(--surface)}
.theme-midnight .to-top{border-radius:8px}
.theme-midnight .to-top:hover{border-color:var(--accent);box-shadow:var(--glow)}
