/* =====================================================================
   تابی گوندەکان — دیزاینی نوێ (v8)
   بانەری سەرەوە + گەڕان + فلتەری پارێزگا + کارتی وێنەدار
   ===================================================================== */

.vg-view{
  /* بەرزی سەردێڕی شناوی ئەپ */
  --vg-clear:calc(84px + env(safe-area-inset-top, 0px));
  --vg-max:980px;

  display:none;
  min-height:100vh;
  padding:calc(var(--vg-clear) + 8px) 0 calc(120px + env(safe-area-inset-bottom, 0px));
  background:var(--stone);
}
.vg-view.active{ display:block; }

/* ---------------------------------------------------------------------
   بانەر
   --------------------------------------------------------------------- */
.vg-hero{
  max-width:var(--vg-max);
  margin:0 auto;
  padding:0 16px;
}
.vg-hero-in{
  position:relative;
  overflow:hidden;
  border-radius:26px;
  padding:22px 20px 18px;
  color:#fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(150deg, #3E7A55 0%, #2E5A3F 55%, #24402F 100%);
  box-shadow:0 10px 30px rgba(36,64,47,.22);
}
/* هێڵە کۆنتۆرییەکانی چیا — تەنها ڕازاندنەوە */
.vg-hero-in::before{
  content:"";
  position:absolute;
  inset:auto -40px -70px auto;
  width:260px;height:260px;
  border-radius:50%;
  background:
    repeating-radial-gradient(circle at center,
      rgba(255,255,255,.10) 0 1.5px, transparent 1.5px 16px);
  pointer-events:none;
}
.vg-hero-in::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:46px;
  background:
    linear-gradient(135deg, transparent 49%, rgba(255,255,255,.06) 50%) 0 0/46px 46px,
    linear-gradient(225deg, transparent 49%, rgba(255,255,255,.06) 50%) 0 0/46px 46px;
  pointer-events:none;
}
.vg-hero-in > *{ position:relative; z-index:1; }

/* وێنەی پاشبنەما — لە پانێڵی «دیزاینی تابی گوندەکان»ـەوە دادەنرێت */
.vg-hero-in{
  --vg-img:none;
  --vg-dim:.45;
}
.vg-hero-in.has-img{
  background:
    linear-gradient(0deg, rgba(10,18,13,var(--vg-dim)), rgba(10,18,13,var(--vg-dim))),
    linear-gradient(0deg, rgba(10,18,13,.38), transparent 62%),
    var(--vg-img) center / cover no-repeat,
    #24402F;
  animation:vgHeroFade .5s ease both;
}
.vg-hero-in.has-img::before,
.vg-hero-in.has-img::after{ display:none; }
.vg-hero-in.has-img .vg-title,
.vg-hero-in.has-img .vg-sub{ text-shadow:0 1px 10px rgba(0,0,0,.35); }
.vg-hero-in.has-img .vg-stat{
  background:rgba(255,255,255,.14);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
@keyframes vgHeroFade{ from{ opacity:.6; } to{ opacity:1; } }
.vg-stats[hidden]{ display:none; }

.vg-kicker{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 11px;
  border-radius:99px;
  font-size:11.5px;
  font-weight:600;
  background:rgba(255,255,255,.16);
  color:#fff;
}
.vg-kicker svg{ width:13px;height:13px;fill:currentColor; }

.vg-title{
  margin:12px 0 4px;
  font-size:22px;
  font-weight:800;
  line-height:1.45;
  color:#fff;
}
.vg-sub{
  margin:0;
  max-width:44ch;
  font-size:13px;
  line-height:1.9;
  color:rgba(255,255,255,.86);
}

.vg-stats{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  margin-top:16px;
}
.vg-stat{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:1px;
  padding:9px 12px;
  border-radius:15px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.14);
  min-width:0;
}
.vg-stat b{
  direction:ltr;
  font-size:19px;
  font-weight:800;
  line-height:1.3;
  color:#fff;
  font-variant-numeric:tabular-nums;
}
.vg-stat span{
  font-size:11px;
  color:rgba(255,255,255,.82);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

/* ---------------------------------------------------------------------
   گەڕان + فلتەر — دەچەسپێت لە ژێر بانەری ئەپ
   --------------------------------------------------------------------- */
.vg-bar{
  position:sticky;
  top:var(--vg-clear);
  z-index:20;
  padding:14px 0 8px;
  background:var(--stone);
}
/* سێبەرێکی نەرم لە ژێر بەشی چەسپاو — کارتەکان لە ژێریدا ون دەبن */
.vg-bar::after{
  content:"";
  position:absolute;
  left:0;right:0;
  top:100%;
  height:14px;
  background:linear-gradient(180deg, var(--stone), rgba(244,244,240,0));
  pointer-events:none;
}
.vg-bar-in{
  max-width:calc(var(--vg-max) - 32px);
  margin:0 16px;
  display:flex;
  align-items:center;
  gap:10px;
  height:52px;
  padding-inline:16px 8px;
  border-radius:18px;
  background:var(--card);
  box-shadow:0 3px 16px rgba(36,64,47,.09);
  border:1.5px solid transparent;
  transition:box-shadow .2s var(--ease), border-color .2s var(--ease);
}
@media (min-width:1012px){
  .vg-bar-in{ margin:0 auto; }
}
.vg-bar-in:focus-within{
  border-color:rgba(62,122,85,.55);
  box-shadow:0 6px 22px rgba(36,64,47,.14);
}
.vg-bar-in > svg{
  width:20px;height:20px;
  flex:none;
  fill:var(--leaf);
}
.vg-bar-in input{
  flex:1;
  min-width:0;
  height:100%;
  border:0;
  background:transparent;
  font-family:inherit;
  font-size:15px;
  color:var(--bark);
}
.vg-bar-in input:focus{ outline:0; }
.vg-bar-in input::placeholder{ color:#8E9A92; }
.vg-bar-in input::-webkit-search-cancel-button{ display:none; }

.vg-clear{
  flex:none;
  width:34px;height:34px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:12px;
  background:var(--stone);
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transform:scale(.8);
  transition:opacity .18s ease, transform .18s var(--ease), visibility .18s;
}
.vg-bar-in.has-text .vg-clear{ opacity:1; visibility:visible; transform:none; }
.vg-clear svg{ width:15px;height:15px;fill:#5E6B63; }
.vg-clear:active{ background:#E7E9E3; }

/* فلتەری پارێزگاکان */
.vg-chips{
  max-width:var(--vg-max);
  margin:10px auto 0;
  display:flex;
  gap:8px;
  padding:2px 16px 4px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.vg-chips::-webkit-scrollbar{ display:none; }
.vg-chips:empty{ display:none; }

.vg-chip{
  flex:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:34px;
  padding:0 14px;
  border-radius:99px;
  border:1px solid rgba(36,64,47,.10);
  background:var(--card);
  color:var(--bark);
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, border-color .18s ease, transform .15s var(--ease);
}
.vg-chip i{
  font-style:normal;
  direction:ltr;
  min-width:20px;
  height:20px;
  padding:0 6px;
  display:inline-grid;
  place-items:center;
  border-radius:99px;
  font-size:11px;
  font-weight:700;
  background:var(--stone);
  color:#4F5E55;
}
.vg-chip:active{ transform:scale(.96); }
.vg-chip.is-on{
  background:var(--bark);
  border-color:var(--bark);
  color:#fff;
}
.vg-chip.is-on i{ background:rgba(255,255,255,.18); color:#fff; }

.vg-count{
  display:block;
  max-width:var(--vg-max);
  margin:8px auto 0;
  padding-inline:20px;
  font-size:12px;
  font-weight:600;
  color:#6F7D74;
}
.vg-count:empty{ display:none; }

/* ---------------------------------------------------------------------
   لیست — تۆڕی کارت
   --------------------------------------------------------------------- */
.vg-list{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(158px, 1fr));
  gap:14px;
  max-width:var(--vg-max);
  margin:0 auto;
  padding:8px 16px 0;
}
@media (min-width:700px){
  .vg-list{ grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:18px; }
}

.vg-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  border-radius:22px;
  overflow:hidden;
  background:var(--card);
  box-shadow:0 2px 14px rgba(36,64,47,.07);
  border:1px solid rgba(36,64,47,.05);
  cursor:pointer;
  container-type:inline-size;
  animation:vgIn .42s var(--ease) both;
  animation-delay:calc(min(var(--i, 0), 12) * 40ms);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease);
}
@media (hover:hover){
  .vg-card:hover{ transform:translateY(-3px); box-shadow:0 10px 28px rgba(36,64,47,.14); }
  .vg-card:hover .vg-media img.vg-photo{ transform:scale(1.05); }
}
.vg-card:active{ transform:scale(.98); }
.vg-card:focus-visible{ outline:2.5px solid var(--leaf); outline-offset:2px; }

@keyframes vgIn{
  from{ opacity:0; transform:translateY(12px); }
  to  { opacity:1; transform:none; }
}

/* وێنە */
.vg-media{
  position:relative;
  aspect-ratio:4 / 3;
  overflow:hidden;
  background:#DDE5DE;
}
.vg-media img.vg-photo{
  width:100%;height:100%;
  display:block;
  object-fit:cover;
  transition:transform .5s var(--ease);
}
.vg-media::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:48%;
  background:linear-gradient(0deg, rgba(20,34,25,.42), transparent);
  pointer-events:none;
}

/* کاتێک وێنە نییە */
.vg-media.is-icon{
  display:grid;
  place-items:center;
  background:
    repeating-radial-gradient(circle at 20% 110%,
      rgba(62,122,85,.10) 0 1.5px, transparent 1.5px 14px),
    linear-gradient(150deg, #E6EFE8, #D3E2D7);
}
.vg-media.is-icon::after{ display:none; }
.vg-ico{
  width:58px;height:58px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:#fff;
  box-shadow:0 6px 18px rgba(36,64,47,.14);
}
.vg-ico img{ width:30px;height:30px; }

/* نیشانەکانی سەر وێنە */
.vg-tag{
  position:absolute;
  z-index:2;
  top:10px;
  right:10px;
  max-width:calc(100% - 20px);
  padding:4px 10px;
  border-radius:99px;
  font-size:11px;
  font-weight:700;
  line-height:1.6;
  color:var(--bark);
  background:rgba(255,255,255,.94);
  box-shadow:0 2px 8px rgba(0,0,0,.10);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.vg-star{
  position:absolute;
  z-index:2;
  top:10px;
  left:10px;
  width:28px;height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#F2C14E;
  box-shadow:0 2px 8px rgba(0,0,0,.16);
}
.vg-star svg{ width:15px;height:15px;fill:#5A3F00; }

/* دەق */
.vg-body{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
  padding:11px 13px 12px;
  min-width:0;
}
.vg-name{
  margin:0;
  font-size:15.5px;
  font-weight:800;
  line-height:1.5;
  color:var(--bark);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.vg-where{
  margin:0;
  display:flex;
  align-items:center;
  gap:4px;
  font-size:12px;
  line-height:1.6;
  color:#66756B;
  min-width:0;
}
.vg-where svg{ flex:none; width:13px;height:13px;fill:var(--leaf); }
.vg-where span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.vg-foot{
  margin-top:auto;
  padding-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border-top:1px dashed rgba(36,64,47,.12);
}
.vg-pop{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-width:0;
  font-size:11.5px;
  font-weight:600;
  color:#5E6B63;
}
.vg-pop svg{ flex:none; width:14px;height:14px;fill:#8FA096; }
.vg-pop b{ direction:ltr; font-weight:700; color:var(--bark); font-variant-numeric:tabular-nums; }
.vg-pop.is-none{ color:#8A968E; font-weight:500; }

.vg-go{
  flex:none;
  width:30px;height:30px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:rgba(62,122,85,.11);
  transition:background .2s ease;
}
.vg-go svg{ width:17px;height:17px;fill:var(--leaf); }
@media (hover:hover){
  .vg-card:hover .vg-go{ background:var(--leaf); }
  .vg-card:hover .vg-go svg{ fill:#fff; }
}

/* ---------------------------------------------------------------------
   دۆخی بارکردن (skeleton) و بەتاڵی
   --------------------------------------------------------------------- */
.vg-skel{
  border-radius:22px;
  overflow:hidden;
  background:var(--card);
  box-shadow:0 2px 14px rgba(36,64,47,.05);
}
.vg-skel i{
  display:block;
  background:linear-gradient(90deg, #ECEFEA 25%, #F6F7F4 50%, #ECEFEA 75%);
  background-size:200% 100%;
  animation:vgShine 1.2s linear infinite;
}
.vg-skel i:first-child{ aspect-ratio:4 / 3; }
.vg-skel i + i{ height:12px; margin:12px 13px 0; border-radius:6px; }
.vg-skel i:last-child{ width:55%; margin-bottom:16px; }
@keyframes vgShine{ to{ background-position:-200% 0; } }

.vg-empty{
  grid-column:1 / -1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  text-align:center;
  padding:48px 28px;
  border-radius:24px;
  background:var(--card);
  border:1.5px dashed rgba(36,64,47,.14);
}
.vg-empty-ico{
  width:64px;height:64px;
  display:grid;
  place-items:center;
  margin-bottom:6px;
  border-radius:20px;
  background:rgba(62,122,85,.10);
}
.vg-empty-ico svg{ width:30px;height:30px;fill:var(--leaf); }
.vg-empty b{ font-size:16px; font-weight:800; color:var(--bark); }
.vg-empty span{
  font-size:13px;
  color:#66756B;
  line-height:1.9;
  max-width:34ch;
}
.vg-empty button{
  margin-top:8px;
  height:40px;
  padding:0 20px;
  border:0;
  border-radius:13px;
  background:var(--bark);
  color:#fff;
  font-family:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}

/* کارتی تەسک — دوگمەی تیر لادەبرێت تا ژمارەی دانیشتوان جێی ببێتەوە */
@container (max-width:190px){
  .vg-go{ display:none; }
}

/* شاشەی زۆر بچووک — کارتی ئاسۆیی */
@media (max-width:359px){
  .vg-title{ font-size:19px; }
  .vg-stat{ padding:8px 9px; }
  .vg-stat b{ font-size:16px; }
  .vg-list{ grid-template-columns:1fr; gap:11px; }
  .vg-card{ flex-direction:row; min-height:112px; }
  .vg-media{ flex:none; width:108px; aspect-ratio:auto; }
  .vg-ico{ width:48px;height:48px;border-radius:15px; }
  .vg-ico img{ width:26px;height:26px; }
  .vg-tag{ top:auto; bottom:8px; right:8px; left:auto; font-size:10px; padding:2px 8px; max-width:92px; }
  .vg-star{ width:24px;height:24px; top:8px; left:auto; right:8px; }
  .vg-star svg{ width:13px;height:13px; }
  .vg-body{ padding:10px 12px; }
}
@media (min-width:700px){
  .vg-hero-in{ padding:30px 30px 24px; }
  .vg-title{ font-size:27px; }
  .vg-stats{ max-width:460px; }
}

@media (prefers-reduced-motion:reduce){
  .vg-card{ animation:none; transition:none; }
  .vg-hero-in.has-img{ animation:none; }
  .vg-media img.vg-photo{ transition:none; }
  .vg-skel i{ animation:none; }
}
