/* ریست */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: #111;
  color: #fff;
  line-height: 1.7;
  direction: rtl;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* ----------------------- */
/* هدر + سرچ + منوها */
.header {
  margin-bottom: 24px;
}
.site-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}
.sub {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
}

/* سرچ */
.search {
  position: relative;
  margin-bottom: 16px;
}
.search input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 15px;
  background: #1e1e1e;
  color: #fff;
}
.search .icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

/* دکمه‌های پلتفرم */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.categories button {
  padding: 6px 14px;
  border: none;
  border-radius: 20px;
  background: #222;
  color: #ccc;
  cursor: pointer;
  transition: 0.2s;
}
.categories button.active {
  background: #ff4c4c;
  color: #fff;
  font-weight: 600;
}
.categories button:hover {
  background: #333;
  color: #fff;
}

/* بخش فیلترها */
.genres-filter, .modes-filter, .new-filter {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.genres-filter label,
.modes-filter label,
.new-filter label {
  font-size: 14px;
  color: #bbb;
  font-weight: 500;
  white-space: nowrap;
}

/* استایل زیبای منو */
.genres-filter select,
.modes-filter select,
.new-filter select {
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid #333;
  background: rgba(30, 30, 30, 0.8);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
}

/* وقتی موس روش میره */
.genres-filter select:hover,
.modes-filter select:hover,
.new-filter select:hover {
  border-color: #1976d2;
  background: rgba(40, 40, 40, 0.95);
}

/* وقتی انتخاب میشه */
.genres-filter select:focus,
.modes-filter select:focus,
.new-filter select:focus {
  border-color: #1976d2;
  box-shadow: 0 0 6px #1976d280;
}

/* استایل برای گزینه‌ها */
.genres-filter option,
.modes-filter option,
.new-filter option {
  background: #1e1e1e;
  color: #fff;
  padding: 10px;
}


/* ----------------------- */
/* گرید کارت‌ها */
.grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* کارت‌ها */
.list-card {
  display: flex;
  align-items: stretch;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform .2s;
}
.list-card:hover {
  transform: translateY(-4px);
}

/* تصویر */
.thumb-box {
  flex: 0 0 220px;
  max-width: 220px;
  overflow: hidden;
}
.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* توضیحات */
.info-box {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.info-box .title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.info-box .title a {
  color: #fff;
  text-decoration: none;
}
.info-box .title a:hover {
  color: #ff4c4c;
}
.info-box .desc {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
   line-clamp: 3;

  /* بقیه نیازها برای ellipsis */
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@supports (line-clamp: 3) {
  .info-box .desc{
    /* در پیاده‌سازی استاندارد نیاز به -webkit-box نیست */
    display: block;
    line-clamp: 3;
  }
}

.meta {
  font-size: 14px;
  margin: 6px 0;
}
.meta .pill {
  display: inline-block;
  background: #333;
  padding: 4px 10px;
  margin: 0 4px 4px 0;
  border-radius: 20px;
  font-size: 13px;
  color: #fff;
}
.meta .genre {
  background: #444e;
}
.meta .mode {
  background: #2255aa;
}

/* highlight */
mark {
  background: #ff4c4c;
  color: #fff;
  padding: 0 2px;
  border-radius: 3px;
}

/* پیام خالی */
.empty {
  text-align: center;
  padding: 30px;
  font-size: 16px;
  color: #aaa;
}


/* --- استایل انتخاب دستهبندی --- */
.select select {
  width: 200px;
  padding: 14px 14px;
  border-radius: calc(var(--radius) + 6px);
  background: color-mix(in oklab, var(--card), #fff 2%);
  backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.08);
  outline: 0;
  color: var(--text);
  font-size: 16px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.04), var(--shadow);
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.select select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(124,92,255,.35), var(--shadow);
  background: color-mix(in oklab, var(--card), #fff 6%);
}

/* مخفیسازی بصری برای لیبل دسترسپذیر */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.price-box {
  margin-top: 8px;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.price-box-details {
  margin: 1.5rem 0 1rem;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 24px #0002;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(200,220,255,0.18);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.15em;
  font-weight: bold;
}

.platform-label {
  background: #1976d2;
  color: #fff;
  padding: 2px 12px;
  border-radius: 8px;
  font-size: 0.95em;
  margin-left: 8px;
}

.old-price {
  color: #fff;
  text-decoration: line-through;
  font-weight: normal;
}

.final-price {
  color: #43ea7c;
  font-weight: bold;
  font-size: 1.1em;
}

.discount {
  background: #ff5252;
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.95em;
  margin-right: 8px;
}


.btn-back {
  background: linear-gradient(90deg, #f7fafc 0%, #e3e8ee 100%);
  color: #222;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  font-weight: 600;
  padding: 0.5em 1.5em;
  border-radius: 2em;
  transition: box-shadow 0.2s, background 0.2s;
  margin-left: 0.5em;
}

.btn-back:hover, .btn-back:focus {
  background: linear-gradient(90deg, #fff 0%, #e3e8ee 100%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  color: #1976d2;
  outline: none;
}



.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}

.lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 40, 0.85);
  backdrop-filter: blur(8px);
}

.lightbox img {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 18px;
  box-shadow: 0 8px 32px #0008;
  z-index: 1;
  background: #fff;
  padding: 8px;
}

.desc-justify {
  text-align: justify;
  line-height: 2.1;
  font-size: 1.08em;
  color: #fff;
  font-weight: bold;
  margin-bottom: 2.5rem;
}

.pill.new {
  background: #ff9800;
  color: #fff;
  font-weight: 600;
}

/* حالت موبایل */
@media (max-width: 768px) {
  .list-card {
    flex-direction: column;   /* عکس بالا، توضیحات پایین */
  }

  .thumb-box {
    flex: unset;
    max-width: 100%;          /* عکس عرض کامل */
  }

  .info-box {
    padding: 12px 14px;
  }
}


.price-box-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* هر ردیف قیمت (دسکتاپ: افقی) */
.price-row {
  display: flex;
  flex-wrap: wrap;   /* اجازه بده بشکنه */
  align-items: center;
  gap: 8px;
}

/* موبایل: چینش عمودی */
@media (max-width: 768px) {
  .price-row {
    flex-direction: column;
    align-items: flex-start; /* بچسبن به سمت راست */
  }
}
