/* === CARDS GRID CONTAINER === */
#contentArea {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1280px) { #contentArea { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) { #contentArea { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { #contentArea { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 380px)  { #contentArea { gap: 8px; } }

/* === GENERIC CARD === */
.card {
  background: var(--card);
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(15,28,63,0.04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(15,28,63,0.04), 0 14px 28px -18px rgba(15,28,63,0.25);
  border-color: #d8deef;
}

/* === PRODUCT CARD === */
.product .pimg {
  aspect-ratio: 1 / 1;
  background: var(--brand-softer);
  overflow: hidden;
  position: relative;
}
.product .pimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.card:hover .pimg img { transform: scale(1.04); }

.product .ptype-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--r-pill);
}

.product .pbody {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product .ptitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.product .price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.product .pprice {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === ADD-TO-CART BUTTON === */
.add-cart {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
  position: relative;
}
.add-cart:hover { background: var(--brand); color: #fff; }
.add-cart:active { transform: scale(0.92); }
.add-cart svg { width: 16px; height: 16px; }
.add-cart.is-added { background: var(--check); color: #fff; }

.add-cart .burst {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.45);
}
.add-cart.is-added .burst { animation: burst .5s ease-out; }
@keyframes burst {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.45); }
  100% { box-shadow: 0 0 0 12px rgba(16,185,129,0); }
}

/* === STORE CARD === */
.store .sbanner {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: #d4dbeb;
}
.store .sbanner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.store .sbanner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,28,63,0) 50%, rgba(15,28,63,0.18) 100%);
  pointer-events: none;
}

/* Tier badges */
.store .tier {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.store .tier i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.18);
  font-style: normal;
}
.store .tier i.crown { background: var(--crown); }
.store .tier i.check { background: var(--check); }
.store .tier i.star  { background: var(--star); }
.store .tier i svg   { width: 12px; height: 12px; }

/* Store logo overlapping banner */
.store .slogo {
  position: relative;
  margin-top: -26px;
  margin-left: 12px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(15,28,63,0.14);
  display: grid;
  place-items: center;
  overflow: hidden;
  z-index: 2;
  flex-shrink: 0;
}
.store .slogo img { width: 100%; height: 100%; object-fit: cover; }
.store .slogo .store-logo-fallback {
  font-size: 20px;
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.store .sbody {
  padding: 28px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.store .stitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
}
.meta-row svg { width: 13px; height: 13px; color: var(--brand); flex-shrink: 0; }
.meta-row .meta-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === MOBILE CARD TIGHTENING === */
@media (max-width: 768px) {
  .card { border-radius: 12px; }
  .product .pbody { padding: 10px 11px 12px; gap: 2px; }
  .product .ptitle { font-size: 13px; }
  .product .pprice { font-size: 14px; }
  .product .ptype-tag { font-size: 9px; padding: 3px 7px; top: 8px; left: 8px; }
  .add-cart { width: 30px; height: 30px; border-radius: 8px; }
  .add-cart svg { width: 14px; height: 14px; }

  .store .sbanner { aspect-ratio: 16 / 10; }
  .store .slogo { width: 42px; height: 42px; border-radius: 10px; margin-top: -21px; margin-left: 10px; }
  .store .sbody { padding: 24px 11px 12px; gap: 6px; }
  .store .stitle { font-size: 13px; }
  .meta-row { font-size: 11px; }
  .store .tier i { width: 18px; height: 18px; }
  .store .tier i svg { width: 10px; height: 10px; }
}
@media (max-width: 380px) {
  .product .pbody, .store .sbody { padding-left: 9px; padding-right: 9px; }
}
