/* ── Cards — Jinx original style ── */

.category-section         { display: none; }
.category-section.visible { display: block; }

/* ── Section title — مثل .category در jinx اصلی ── */
.section-title-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #a60b0b 0%, #7a0808 100%);
  border-radius: 10px;
  padding: 10px 18px;
  margin: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.06);
}

.section-title-fa {
  font-size: clamp(0.95rem, 2.8vw, 1.08rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-align: center;
}

.section-title-en { display: none; }

.cat-section-header { padding: 16px 0 8px; }

/* ── Grid ── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 4px 0 12px;
}

@media (min-width: 560px)  { .items-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px)  { .items-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .items-grid { grid-template-columns: repeat(5, 1fr); } }

/* ── Card — مثل .item در jinx اصلی ── */
.item-card {
  position: relative;
  background-color: #626262;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  animation: fadeUp 0.35s both;
}

.item-card:hover {
  transform: translateY(-4px);
  background-color: #6e6e6e;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.item-card:active { transform: scale(0.97); }

/* ── Image — square, full-width ── */
.item-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #555555;
}

.item-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.item-card:hover .item-img-wrap img { transform: scale(1.05); }

.item-img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: #555555;
}

/* ── Discount badge ── */
.badge-discount {
  position: absolute; top: 8px; right: 8px;
  font-size: 0.65rem; font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
  background: #a60b0b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}

/* ── Body ── */
.item-body {
  padding: 10px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.item-name {
  font-size: clamp(0.85rem, 2.2vw, 1rem);
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  text-align: center;
  width: 100%;
}

.item-desc {
  font-size: clamp(0.62rem, 1.6vw, 0.72rem);
  color: rgba(255,255,255,0.6);
  line-height: 1.45;
  flex: 1;
  text-align: center;
}

.item-price {
  margin-top: 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.price-old {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  text-decoration: line-through;
}

.price-new {
  font-size: clamp(0.85rem, 2.2vw, 1rem);
  font-weight: 900;
  color: #FF9800;
  white-space: nowrap;
}

.discount-chip {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700;
  background: rgba(166,11,11,0.3);
  color: #ff6b6b;
  padding: 2px 7px;
  border-radius: 6px;
  margin-bottom: 2px;
}

/* ── Unavailable badge ── */
.badge-unavailable {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem; font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
  pointer-events: none;
  background: rgba(0,0,0,0.7);
  color: rgba(255,255,255,0.9);
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  z-index: 4; white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Unavailable card ── */
.item-card--unavailable { cursor: default; }
.item-card--unavailable:hover { transform: none; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.item-card--unavailable:active { transform: none; }

.item-card--unavailable::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  border-radius: inherit; pointer-events: none; z-index: 3;
}

.item-card--unavailable .item-img-wrap img {
  filter: grayscale(80%) brightness(0.5);
}
