button { font: inherit; }
.page { max-width: 100%; margin: 0 auto; }
@media (min-width: 720px) { .page { padding: 8px; } }
.block { background: #fff; padding: 10px 6px 16px; min-width: 0; }
@media (min-width: 720px) { .block { border-radius: 14px; } }
.grid {
  display: grid; gap: 8px; justify-content: stretch;
  grid-template-columns: repeat(auto-fill, minmax(min(148px, 100%), 1fr));
}
.state {
  margin: 24px 12px; padding: 28px 20px; border-radius: 16px; background: #fff;
  text-align: center; border: 1px solid var(--line);
}
.state[hidden], #saved-grid[hidden], #saved-more[hidden] { display: none; }
.empty { margin: 28px 12px; color: var(--muted); text-align: center; }
.more {
  display: block; margin: 16px auto 4px; border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 999px; color: #F2F2F2; font-weight: 700; font-size: 13px; font-family: inherit;
  background: linear-gradient(135deg, #FFB74D, #FFA726);
}
.more:disabled { opacity: .7; cursor: default; }
.pcard {
  display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden; background: #FFFEFE;
  border: 1px solid rgba(197,216,212,.75);
  box-shadow: 0 8px 22px -5px rgba(11,110,110,.14), 0 3px 10px rgba(0,0,0,.07);
}
.pcard-frame {
  position: relative; display: block; margin: 8px 8px 0; aspect-ratio: 1;
  border-radius: 12px; border: 1px solid rgba(205,223,219,.9); overflow: hidden; background: #E6F0ED;
}
.pcard-ph {
  display: grid; place-items: center; width: 100%; height: 100%; color: rgba(11,110,110,.42);
  background: linear-gradient(135deg, rgba(11,110,110,.08), rgba(11,110,110,.16));
}
.pcard-oos { background: rgba(0,0,0,.42); }
.pcard-oos::after {
  content: "Hết hàng"; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.94);
  color: #D93025; font-size: 11px; font-weight: 800; box-shadow: 0 2px 8px rgba(217,48,37,.2);
}
.pcard-badge {
  position: absolute; top: 8px; padding: 3px 8px; border-radius: 999px; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1.2; box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.pcard-badge.sponsor { left: 8px; background: #E8453C; box-shadow: 0 2px 6px rgba(232,69,60,.35); }
.pcard-badge.affiliate { background: #2563EB; box-shadow: 0 2px 6px rgba(37,99,235,.35); }
.pcard-badge.used { background: #EA8C1E; box-shadow: 0 2px 6px rgba(234,140,30,.35); }
.pcard-info strong {
  display: block; font-size: 12px; font-weight: 800; line-height: 1.28; color: #1A2B3C;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard-price {
  flex: 1; min-width: 0; color: #E53935; font-weight: 800; font-size: 14px; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard-rate {
  flex: none; display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 6px; border-radius: 8px; background: #FFF6E0; border: 1px solid rgba(232,163,23,.22);
  color: #7A5A12; font-size: 11px; font-weight: 700; line-height: 1;
}
.pcard-rate svg { width: 12px; height: 12px; color: #E8A317; }
.pcard-sold {
  display: flex; align-items: center; gap: 4px; margin-top: 5px; min-width: 0;
  color: #4A6278; font-size: 11px; font-weight: 600; line-height: 1.2;
}
.pcard-sold.out { color: #D93025; }
.pcard-cart {
  flex: 1; gap: 6px; padding: 0 6px;
  background: linear-gradient(135deg, #FF9800, #E65100); font-size: 12px; font-weight: 700;
}
.pcard-save { width: 40px; background: #FFB74D; }
.pcard-save.saved { background: #F57C00; }
