/* ═══════════════════════════════════════════════════════════════
   PRODUCTS — compact card grid on clearly gray background
═══════════════════════════════════════════════════════════════ */

#products {
  background: #DDE2EA;            /* clearly gray, distinct from page bg */
  padding: 48px 48px;
}
.prod-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
}
.prod-view-all {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text2);
  text-decoration: none;
  border: 1px solid rgba(13,21,38,.15);
  padding: 8px 16px;
  border-radius: var(--rfull);
  transition: border-color .2s, color .2s;
  white-space: nowrap;
  background: rgba(255,255,255,.5);
}
.prod-view-all:hover { border-color: var(--gold); color: var(--gold); background: #fff; }

/* Flex grid (not CSS grid) so every row — including a partial last
   row — is centered, never left-ragged. Cards keep a fixed basis and
   don't grow, so they stay uniform and the whole group sits centered. */
.pgrid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
}

/* ── Product card ──────────────────────────────────────────── */
.pc {
  flex: 0 1 340px;
  max-width: 360px;
  display: flex;
  flex-direction: column;          /* body grows, footer pins to bottom */
  background: var(--bg);
  border-radius: var(--rmd);
  border: 1px solid #D4D9E2;
  overflow: hidden;
  position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pc:hover {
  border-color: rgba(201,168,76,.35);
  box-shadow: 0 6px 16px rgba(13,21,38,.08);
  transform: translateY(-2px);
}
/* Featured card: same footprint as the rest (keeps the grid aligned),
   set apart by a gold frame instead of by breaking the layout. */
.pc.feat {
  border-color: rgba(201,168,76,.55);
  box-shadow: 0 4px 14px rgba(201,168,76,.14);
}

/* ── Badge ─────────────────────────────────────────────────── */
.pc-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 10px;
  border-radius: var(--rfull);
  font-size: 9px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase;
}
.badge-gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--navy); }
.badge-new  { background: var(--navy); color: var(--gold2); }
.badge-sale { background: #DC2626; color: #fff; }

/* ── Visual area ───────────────────────────────────────────── */
.pvis {
  position: relative;
  height: 150px; overflow: hidden;
  background: linear-gradient(135deg, #F4F6FA 0%, #E6EAF1 100%);
  display: flex; align-items: center; justify-content: center;
}
/* Product photo fills the visual box, cropped centered — keeps every
   card's image area identical regardless of the source image size. */
.p-photo {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.pvis-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 60%, rgba(201,168,76,.06) 0%, transparent 65%);
}
.pvis-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(201,168,76,.08);
  animation: spinR 24s linear infinite;
}
.pvis-ring.r1 { width: 100px; height: 100px; }
.pvis-ring.r2 { width: 140px; height: 140px; border-color: rgba(201,168,76,.05); animation-duration: 36s; animation-direction: reverse; }
@keyframes spinR { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.p-icon {
  font-size: 34px; position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.p-icon .ic { width: 38px; height: 38px; }

/* ── Product body ──────────────────────────────────────────── */
.pbody  { padding: 14px 14px 12px; display: flex; flex-direction: column; flex: 1; }
.pcat   { font-size: 9.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.pname  { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--navy); margin-bottom: 4px; }
.pc.feat .pname { font-size: 18px; }
.pdesc  { font-size: 12px; line-height: 1.45; color: var(--text2); margin-bottom: 10px; }

.pspecs { border-top: 1px solid #EAEDF2; padding-top: 8px; margin-bottom: 10px; }
.srow   { display: flex; justify-content: space-between; font-size: 11px; padding: 3px 0; }
.srow .k { color: var(--muted); font-weight: 500; }
.srow .v { color: var(--navy); font-weight: 700; }

.pfoot  { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.pprice { display: flex; flex-direction: column; line-height: 1.1; }
.price-label { font-size: 9px; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; }
.price-val   { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 800; color: var(--navy); }
.price-val small { font-size: 10px; color: var(--muted); font-weight: 400; }

/* ── Buy buttons ───────────────────────────────────────────── */
.btn-buy {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: var(--rfull);
  border: none; cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.btn-buy:hover { background: var(--gold); color: var(--navy); }

.btn-buy-outline {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--navy);
  font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: var(--rfull);
  border: 1px solid var(--border); cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: border-color .2s, color .2s;
  text-decoration: none;
}
.btn-buy-outline:hover { border-color: var(--gold); color: var(--gold); }

.pfoot-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.special-offer {
  background: #FFF8E7;
  border: 1px solid rgba(201,168,76,.22);
  border-radius: var(--rsm);
  padding: 6px 9px; margin-bottom: 10px;
  font-size: 11.5px; font-weight: 600; color: var(--navy);
}
.special-offer strong { color: var(--gold); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  #products    { padding: 40px 24px; }
  .prod-header { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
}
@media (max-width: 768px) {
  #products { padding: 36px 20px; }
}
/* Once two 340px columns no longer fit, switch to a single centered
   column that fills the row (capped so it isn't oversized). */
@media (max-width: 720px) {
  .pc, .pc.feat { flex-basis: 100%; max-width: 520px; }
}
@media (max-width: 480px) {
  #products      { padding: 28px 16px; }
  .pbody         { padding: 12px 12px 10px; }
  .pname         { font-size: 14px; }
  .price-val     { font-size: 16px; }
  .pfoot         { flex-direction: column; align-items: stretch; gap: 8px; }
  .pfoot .pprice { align-items: center; text-align: center; }
  .pfoot .btn-buy, .pfoot .btn-buy-outline { width: 100%; }
  .pfoot-actions { width: 100%; }
  .pfoot-actions .btn-buy, .pfoot-actions .btn-buy-outline { flex: 1; }
}

/* ── Click-through cards on the catalog page ───────────────── */
.products-page .pc[data-slug] { cursor: pointer; }
.products-page .pc[data-slug]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: rgba(201,168,76,.4);
}
.products-page .pc[data-slug]:hover .pname { color: var(--gold); }

/* ── RTL ────────────────────────────────────────────────────── */
[dir="rtl"] .pfoot { flex-direction: row-reverse; }
