.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 26px;              /* horizont + vertikál együtt */
  margin-top: 16px;

  /* FIX: grid elemek ne “ússzanak” */
  align-items: stretch;
}

/* ===== TERMÉKKÁRTYA ===== */

.product-card {
  background:
    linear-gradient(180deg, rgba(40,22,18,.92), rgba(22,14,20,.90));
  border-radius: 14px;
  padding: 10px;
  border: 1px solid rgba(247,211,122,.18);
  box-shadow:
    0 18px 55px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.04);

  display: flex;
  flex-direction: column;
  height: 100%;

  position: relative;

  /* FIX: semmi ne lóghasson ki a kártyából */
  overflow: hidden;
}

/* háttérfény RÉTEG – csak háttér legyen */
.product-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;

  background:
    radial-gradient(520px 220px at 20% 10%, rgba(255,200,120,.12), transparent 65%),
    radial-gradient(520px 220px at 80% 0%, rgba(120,200,255,.06), transparent 70%);

  opacity: .9;
  border-radius: 14px;

  /* FIX: biztosan a tartalom ALATT */
  z-index: 0;
}

/* FIX: minden tartalom a háttér fölött legyen */
.product-card > *{
  position: relative;
  z-index: 1;
}

/* ===== FIX KÉPTARTÓ ===== */

.product-media {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 8px;

  border: 1px solid rgba(247,211,122,.18);
  box-shadow:
    0 14px 35px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(255,255,255,.04);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* ===== FLAGEK A KÉPEN BELÜL ===== */

.product-badges {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: none;
}

.pflag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;

  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: .35px;

  border: 1px solid rgba(255,255,255,.26);
  box-shadow:
    0 3px 10px rgba(0,0,0,.50),
    inset 0 0 0 1px rgba(255,255,255,.14);

  text-shadow:
    0 1px 3px rgba(0,0,0,.65);
}

.pflag--new {
  background:
    radial-gradient(circle at 30% 30%, #8dffbf, #1ea35a);
  color: #042e1c;
}

.pflag--used {
  background:
    radial-gradient(circle at 30% 30%, #ffe1a6, #d19322);
  color: #2f1d03;
}

.pflag--faulty {
  background:
    radial-gradient(circle at 30% 30%, #ffb1b1, #a61f1f);
  color: #2a0505;
}

/* ===== SZÖVEGES RÉSZ ===== */

.product-name {
  font-weight: 800;
  margin-bottom: 4px;
  color: #f8f3e6;
  letter-spacing: .2px;
  text-shadow: 0 2px 12px rgba(255,180,90,.12);
}

.product-name.clickable { cursor: pointer; }
.product-name.clickable:hover { text-decoration: underline; }

.product-desc {
  font-size: 0.92rem;
  color: #d6cbb4;
  margin-bottom: 6px;
  flex-grow: 1;
  line-height: 1.4;
}

/* ===== Ár + darabszám egy sorban ===== */

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.product-price {
  font-weight: 800;
  color: #ffffff;
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  margin-bottom: 0;
}

.product-qty {
  font-weight: 700;
  font-size: 0.9rem;
  color: #e5e7eb;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* ===== GOMB ===== */

.product-card button {
  padding: 8px 14px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.12);

  background: linear-gradient(180deg, #374151, #1f2937);
  color: #ffffff;

  cursor: pointer;

  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: .2px;

  box-shadow:
    0 10px 22px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.06);
}

.product-card button:hover { filter: brightness(1.08); }

.product-card button[disabled] {
  background: linear-gradient(180deg, #4b5563, #374151);
  border: 1px solid rgba(255,255,255,.08);
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== ELFOGYOTT BADGE ===== */

.badge-sold {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;

  background: linear-gradient(180deg, #ff8c8c, #9f1d1d);
  color: #2b0a0a;

  font-size: 0.82rem;
  font-weight: 800;
  margin-left: 6px;

  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 10px 22px rgba(0,0,0,.25),
    inset 0 0 0 1px rgba(255,255,255,.10);

  text-shadow: 0 1px 2px rgba(255,255,255,.18);
}
