@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800;900&display=swap");

/* ──────────────────────────────────────────
   DESIGN TOKENS — thisgamestore.net Style
   ────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Slate palette */
  --bg: #020617;
  --bg-card: rgba(15, 23, 42, 0.40);
  --bg-card-hover: rgba(30, 41, 59, 0.60);
  --bg-elevated: rgba(30, 41, 59, 0.80);

  /* Text */
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --muted: #64748b;

  /* Borders */
  --border: rgba(30, 41, 59, 0.80);
  --border-hover: rgba(59, 130, 246, 0.40);
  --line: rgba(30, 41, 59, 0.80);

  /* Brand */
  --brand: #3b82f6;
  --brand-hover: #60a5fa;
  --steam: #3b82f6;
  --brand-strong: #2563eb;
  --accent: #6366f1;

  /* Semantic */
  --ps: #6366f1;
  --violet: #8b5cf6;
  --gold: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --success: #10b981;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.50);

  /* Radius */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Compat aliases */
  --surface: var(--bg-card);
  --surface-2: var(--bg-card-hover);
  --surface-3: var(--bg-elevated);
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.35);
  --glow-violet: 0 0 20px rgba(139, 92, 246, 0.35);
  --glow-brand: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* ──────────────────────────────────────────
   RESET & BASE
   ────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: "Kanit", "Segoe UI", Tahoma, sans-serif;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  letter-spacing: -0.01em;
  font-weight: 500;
}

strong,
b {
  font-weight: 500;
}

/* ──────────────────────────────────────────
   APP SHELL
   ────────────────────────────────────────── */
.app-shell {
  width: 100%;
  margin: 0 auto;
}

main {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ──────────────────────────────────────────
   TOPBAR
   ────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding: 12px max(20px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 300ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
  overflow-wrap: anywhere;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ── NAV ── */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
  padding-left: 20px;
}

.main-nav a {
  min-width: 66px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: all 200ms ease;
}

.main-nav a:hover {
  color: var(--brand-hover);
  background: rgba(59, 130, 246, 0.08);
}

/* ── ACTIONS ── */
.topbar-actions,
.hero-actions,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── TOPBAR SEARCH ── */
.topbar-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 38px;
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  overflow: visible;
  position: relative;
}

.topbar-search-form:focus-within {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Override .icon-button global styles inside search form */
.topbar-search-form .topbar-search-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 999px 0 0 999px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  min-height: unset;
}

.topbar-search-form .topbar-search-toggle:hover {
  background: transparent !important;
  border: none !important;
  color: var(--text);
}

.topbar-search-form .topbar-search-toggle svg {
  width: 15px;
  height: 15px;
}

.topbar-search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0 14px 0 2px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
}

.topbar-search-input::placeholder {
  color: var(--muted);
}

.topbar-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* ── SEARCH SUGGESTION POPUP ── */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  z-index: 300;

  /* ── Solid Dark Background ── */
  background: #0b1121;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);

  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  animation: suggestionFadeIn 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Custom Scrollbar for Dropdown */
.search-suggestions::-webkit-scrollbar {
  width: 6px;
}
.search-suggestions::-webkit-scrollbar-track {
  background: transparent;
}
.search-suggestions::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.search-suggestions::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

@keyframes suggestionFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion-header {
  padding: 10px 14px 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 150ms ease;
  border-radius: 8px;
  margin-bottom: 2px;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus {
  background: rgba(59, 130, 246, 0.1); /* Subtle brand tint */
  outline: none;
  transform: translateX(4px);
}

.search-suggestion-item:last-child {
  margin-bottom: 6px;
}

.suggestion-img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>') no-repeat center center;
}

.suggestion-info {
  flex: 1;
  min-width: 0;
}

.suggestion-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f1f5f9;
  line-height: 1.3;
  display: block;
}

.suggestion-name mark {
  background: transparent;
  color: #818cf8;
  font-weight: 700;
}

.suggestion-meta {
  font-size: 0.70rem;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.suggestion-price {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.search-suggestions-empty {
  padding: 14px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

.language-switcher {
  position: relative;
  display: inline-flex;
}

.language-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  width: 190px;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideDown 180ms ease both;
}

.language-popover[hidden] {
  display: none;
}

.language-popover button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  transition: background 150ms ease;
}

.language-popover button:hover,
.language-popover button.is-active {
  background: rgba(59, 130, 246, 0.10);
}

.language-popover span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── FILTER POPOVER ── */
.filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 280px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideDown 180ms ease both;
  overflow: hidden;
}

.filter-popover[hidden] {
  display: none;
}

.filter-popover-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.filter-popover-header h3 {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.filter-section:last-of-type {
  border-bottom: none;
}

.filter-section h4 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  padding: 4px 0;
  transition: opacity 0.2s;
}

.filter-radio-label:hover {
  opacity: 0.8;
}

.filter-radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  position: relative;
  transition: all 0.2s;
}

.filter-radio-label input[type="radio"]:checked + .radio-custom {
  border-color: var(--brand);
}

.filter-radio-label input[type="radio"]:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.filter-radio-label input[type="radio"]:checked ~ span:not(.radio-custom) {
  font-weight: 500;
  color: var(--brand-hover);
}

.filter-popover-actions {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* ──────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────── */
.icon-button,
.account-button,
.cart-button,
.primary-button,
.primary-link,
.secondary-button,
.mini-button,
.quantity-button,
.dialog-close,
.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 200ms ease;
}

.icon-button:hover,
.account-button:hover,
.cart-button:hover,
.secondary-button:hover,
.mini-button:hover,
.quantity-button:hover,
.dialog-close:hover,
.tab-button:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: var(--text);
}

.icon-button:active,
.cart-button:active,
.primary-button:active,
.primary-link:active,
.secondary-button:active,
.mini-button:active,
.quantity-button:active,
.tab-button:active {
  transform: scale(0.97);
}

.icon-button,
.dialog-close,
.quantity-button {
  width: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.cart-button {
  padding: 0 12px;
}

.account-button {
  padding: 0 14px;
}

.account-button.is-signed-in {
  border-color: var(--border-hover);
  color: var(--brand);
}

.cart-button strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  border-radius: 999px;
}

/* PRIMARY */
.primary-button,
.primary-link {
  position: relative;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
  transition: all 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.primary-button:hover,
.primary-link:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45), var(--glow-brand);
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.secondary-button,
.mini-button {
  padding: 0 14px;
}

.primary-button:disabled,
.mini-button:disabled {
  background: rgba(30, 41, 59, 0.50);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.tab-button {
  min-width: 92px;
  padding: 0 14px;
  color: var(--muted);
  border-radius: 999px;
}

.tab-button.is-active {
  border-color: var(--brand);
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand);
}

.stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  font-weight: 500;
  transition: color 200ms ease;
}

.stock-toggle:hover {
  color: var(--text);
}

.stock-toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background-color: var(--surface);
  cursor: pointer;
  position: relative;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  margin: 0;
}

.stock-toggle input:hover {
  border-color: var(--brand);
  background-color: rgba(0, 112, 209, 0.03);
}

.stock-toggle input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(0, 112, 209, 0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ──────────────────────────────────────────
   HERO
   ────────────────────────────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  min-height: 460px;
  overflow: hidden;
  margin: 0;
  padding: 60px 28px 28px;
  border-bottom: 1px solid var(--border);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.50) 50%, rgba(2, 6, 23, 0.15) 100%),
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.95));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  max-width: 720px;
  padding: 14px 0 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.checkout-band h2,
.cart-header h2 {
  margin: 0;
  line-height: 1.15;
}

.hero h1 {
  max-width: 740px;
  font-size: clamp(1.72rem, 3.55vw, 2.5rem);
  font-weight: 700;
}

.hero p:not(.eyebrow),
.checkout-band p,
.panel-block p,
.empty-state p,
.empty-cart p {
  color: var(--text-secondary);
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 14px 0 22px;
  font-size: 0.95rem;
}

.hero-deal {
  align-self: stretch;
  display: grid;
  align-content: end;
}

/* DEAL CARD */
.deal-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 300ms ease;
}

.deal-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.deal-card img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.deal-card-body {
  padding: 14px;
}

.deal-card h2 {
  min-height: 46px;
  margin: 7px 0 10px;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.22;
}

/* ── PILLS ── */
.label-pill,
.stock-pill,
.discount-pill,
.api-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.60);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
}

.label-pill {
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.stock-pill.in-stock {
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--success);
}

.stock-pill.low-stock {
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--gold);
}

.stock-pill.out-stock {
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.discount-pill {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price {
  color: var(--brand-hover);
  font-size: 1.24rem;
  font-weight: 700;
}

.compare-price {
  color: var(--muted);
  text-decoration: line-through;
}

/* ── STATS STRIP ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
}

.stats-strip article {
  min-height: 98px;
  padding: 20px 24px;
  border-right: none;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 300ms ease;
}

.stats-strip article:hover {
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stats-strip strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.22rem, 2.1vw, 1.52rem);
  font-weight: 700;
}

.stats-strip span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ──────────────────────────────────────────
   CATALOG
   ────────────────────────────────────────── */
.catalog-section {
  padding: 32px 24px 40px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2,
.checkout-band h2,
.cart-header h2 {
  font-size: clamp(1.22rem, 2.2vw, 1.48rem);
  font-weight: 700;
}

.search-box {
  display: flex;
  align-items: center;
  width: min(420px, 100%);
  min-height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 999px;
  transition: all 200ms ease;
}

.search-box:focus-within {
  border-color: var(--border-hover);
}

.search-box svg {
  flex: 0 0 auto;
  margin-left: 14px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--text);
}

.toolbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

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

.catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

@media (min-width: 981px) {
  .catalog-layout > .side-panel {
    position: sticky;
    top: 64px;
    align-self: start;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateZ(0);
    backface-visibility: hidden;
  }
}

.panel-block {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  transition: border-color 200ms ease;
}

.panel-block:hover {
  border-color: var(--border-hover);
}

.panel-block h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.panel-block p {
  margin: 10px 0 0;
  font-size: 0.88rem;
}

.stock-meter {
  height: 6px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.60);
  border-radius: 999px;
}

.stock-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 999px;
  transition: width 400ms ease;
}

.category-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.category-list li:last-child {
  border-bottom: 0;
}

.support-panel {
  border-color: rgba(59, 130, 246, 0.25);
}

.api-status {
  margin-top: 12px;
  border-color: rgba(6, 182, 212, 0.30);
  color: var(--info);
}

/* ── PRODUCT GRID ── */
.products-wrap {
  min-width: 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.feature-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  transition: all 300ms ease;
}

.feature-card:hover {
  border-color: var(--brand-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--glow-blue);
  background: var(--bg-card-hover);
}

.feature-card img {
  width: 100%;
  height: 100%;
  min-height: 188px;
  object-fit: cover;
}

.feature-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.90));
  pointer-events: none;
}

.feature-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 14px;
}

.feature-body h3 {
  margin: 8px 0 10px;
  font-size: 1.08rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--bg);
  background-image: linear-gradient(var(--bg-card), var(--bg-card));
  border-radius: var(--radius);
  transition: all 300ms ease;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.product-card:hover {
  border-color: var(--brand-hover);
  background-image: linear-gradient(var(--bg-card-hover), var(--bg-card-hover));
  transform: translateY(-6px) translateZ(0);
  box-shadow: var(--shadow-lg), var(--glow-blue);
}

.product-card,
.feature-card,
.review-card,
.pd-related-card,
.order-card,
.order-detail-card {
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.checkout-band,
.widget-zone,
.olaf-trust-widget,
.site-footer,
.pd-section,
.pd-related-section {
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

img[data-fast-img] {
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.88)),
    radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.22), transparent 34%);
  opacity: 0.01;
  transition: opacity 180ms ease, filter 180ms ease, transform 240ms ease;
}

img[data-fast-img].is-loaded,
img[data-fast-img][src^="data:image"] {
  opacity: 1;
}

img[data-fast-img]:not(.is-loaded):not([src^="data:image"]) {
  filter: blur(8px);
  transform: scale(1.01);
}

.lucide-fallback {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

[data-bg-lazy] {
  background-image: none;
}

.is-bg-loaded {
  transition: background-image 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  img[data-fast-img] {
    transition: none;
  }
}

.product-image {
  position: relative;
  aspect-ratio: 16 / 7.5;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}

.product-image .discount-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-card h3 {
  min-height: 46px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
}

.publisher {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.tag {
  padding: 2px 7px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.40);
  color: var(--muted);
  font-size: 0.68rem;
  border-radius: 999px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.card-actions.single-action {
  grid-template-columns: 1fr;
}

.empty-state,
.empty-cart {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state svg,
.empty-cart svg {
  width: 42px;
  height: 42px;
  color: var(--muted);
}

.empty-state h3,
.empty-cart h3 {
  margin: 0;
}

.empty-state p,
.empty-cart p {
  margin: 0;
}

/* ── CHECKOUT BAND ── */
.checkout-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 24px 40px;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
}

.checkout-band p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
}

/* ── WIDGETS ── */
.widget-zone {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 0 24px;
}

.steam-preview-zone {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
}

.store-widget {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px;
  transition: border-color 200ms ease;
}

.store-widget:hover {
  border-color: var(--border-hover);
}

.widget-title {
  margin-bottom: 8px;
  color: var(--brand);
  font-weight: 600;
}

.store-widget.is-built-in-widget {
  overflow: visible;
  padding: 0;
  background: transparent;
  border: none;
}

.store-widget.is-built-in-widget>.widget-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.olaf-widget-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.olaf-widget-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 700;
}

.olaf-widget-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.olaf-widget-tab {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.28)),
    rgba(15, 23, 42, 0.22);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 12px 24px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.olaf-widget-tab:hover,
.olaf-widget-tab.is-active {
  border-color: rgba(96, 165, 250, 0.72);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.30), rgba(14, 165, 233, 0.12)),
    rgba(15, 23, 42, 0.36);
  color: #eff6ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 28px rgba(37, 99, 235, 0.18);
}

.olaf-widget-tab:hover {
  transform: translateY(-1px);
}

/* STEAM WIDGET */
.olaf-steam-widget,
.olaf-trust-widget,
.olaf-social-widget,
.olaf-license-widget {
  padding: 18px;
}

.olaf-steam-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.82fr);
  gap: 18px;
  min-height: 586px;
}

.olaf-steam-list {
  display: grid;
  align-content: start;
  gap: 4px;
}

.olaf-steam-row {
  position: static;
}

.olaf-steam-item {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: all 200ms ease;
}

.olaf-steam-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.olaf-steam-thumb {
  width: 152px;
  height: 66px;
  object-fit: cover;
}

.olaf-steam-info {
  min-width: 0;
}

.olaf-steam-info strong,
.olaf-steam-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.olaf-steam-info strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.olaf-steam-info span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.olaf-steam-price {
  display: flex;
  align-items: center;
  gap: 0;
  padding-right: 12px;
  white-space: nowrap;
}

.olaf-sale-pct {
  display: grid;
  min-height: 26px;
  place-items: center;
  padding: 0 8px;
  background: var(--success);
  color: #fff;
  font-weight: 700;
  border-radius: 4px 0 0 4px;
}

.olaf-sale-price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 0 10px;
  background: rgba(30, 41, 59, 0.80);
  border-radius: 0 4px 4px 0;
}

.olaf-sale-price del {
  color: var(--muted);
  font-size: 0.76rem;
}

.olaf-sale-price b,
.olaf-steam-price>b {
  color: #fff;
  font-size: 0.9rem;
}

.olaf-steam-preview {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: calc(38% - 6px);
  height: 100%;
  opacity: 0;
  visibility: hidden;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(2, 6, 23, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 220ms ease;
  transform: translateY(8px);
}

.olaf-steam-row:hover .olaf-steam-preview,
.olaf-steam-list:not(:hover) .olaf-steam-row:first-child .olaf-steam-preview {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.olaf-steam-preview h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.olaf-steam-preview p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.olaf-steam-preview p span {
  color: var(--brand);
}

.olaf-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.olaf-preview-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.10);
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.olaf-preview-images {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
}

.olaf-preview-images img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  border-radius: 12px;
}

/* TRUST CARDS */
.olaf-trust-widget {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.olaf-trust-card,
.olaf-license-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03); /* Almost invisible border */
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.4); /* Softer translucent background */
  transition: all 300ms ease;
}

.olaf-trust-card {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 22px;
  border-color: rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.38)),
    rgba(15, 23, 42, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 44px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.olaf-trust-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
  pointer-events: none;
}

.olaf-trust-card:hover,
.olaf-license-card:hover {
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.olaf-trust-card:hover {
  border-color: rgba(125, 211, 252, 0.30);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.46)),
    rgba(15, 23, 42, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 18px 42px rgba(14, 165, 233, 0.12);
}

.olaf-trust-icon {
  --trust-rgb: 96, 165, 250;
  --trust-accent: #60a5fa;
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  color: #f8fafc;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(var(--trust-rgb), 0.45), rgba(var(--trust-rgb), 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -12px 24px rgba(2, 6, 23, 0.16),
    0 14px 32px rgba(var(--trust-rgb), 0.22);
  backdrop-filter: blur(16px) saturate(1.45);
  -webkit-backdrop-filter: blur(16px) saturate(1.45);
}

.olaf-trust-icon::before,
.olaf-trust-icon::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.olaf-trust-icon::before {
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.32), transparent 46%);
}

.olaf-trust-icon::after {
  top: -30%;
  left: -38%;
  width: 110%;
  height: 44%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  filter: blur(8px);
  transform: rotate(-18deg);
  opacity: 0.78;
}

.olaf-trust-icon svg {
  position: relative;
  z-index: 1;
  width: 23px;
  height: 23px;
  stroke-width: 2.15;
  filter: drop-shadow(0 6px 12px rgba(2, 6, 23, 0.30));
}

.olaf-trust-icon.tone-1 {
  --trust-rgb: 96, 165, 250;
  --trust-accent: #60a5fa;
}

.olaf-trust-icon.tone-2 {
  --trust-rgb: 45, 212, 191;
  --trust-accent: #2dd4bf;
}

.olaf-trust-icon.tone-3 {
  --trust-rgb: 167, 139, 250;
  --trust-accent: #a78bfa;
}

@media (max-width: 760px) {
  .olaf-trust-card {
    min-height: 156px;
    padding: 18px;
  }

  .olaf-trust-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }
}

.olaf-trust-card h3,
.olaf-license-card h3,
.olaf-social-card h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
}

.olaf-trust-card p,
.olaf-license-card p,
.olaf-social-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* SOCIAL WIDGET */
.olaf-social-widget {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.olaf-social-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  overflow: hidden;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 300ms ease;
}

.olaf-social-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.olaf-social-card.fb {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.90), rgba(24, 119, 242, 0.30)), url("https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/2322010/extras/INT9_PC_Valhalla_Montage.gif?t=1738256985") center / cover;
}

.olaf-social-card.dc {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.60), rgba(2, 6, 23, 0.85));
}

.olaf-social-card img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-sm);
}

.olaf-social-card small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--text-secondary);
}

.olaf-social-card small span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.olaf-social-card b,
.olaf-license-card a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.86rem;
}

/* LICENSE WIDGET */
.olaf-license-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.olaf-license-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.license-badges,
.license-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.license-badges span {
  padding: 4px 9px;
  border: 1px solid rgba(239, 68, 68, 0.30);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 600;
}

.license-badges b {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.10);
  color: var(--brand);
  font-size: 0.74rem;
}

.license-price strong {
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--brand-hover);
}

.license-price del {
  color: var(--muted);
}

.olaf-license-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.olaf-license-card li {
  display: flex;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.olaf-license-card li svg {
  color: var(--success);
}

/* ──────────────────────────────────────────
   DIALOGS
   ────────────────────────────────────────── */
dialog {
  max-width: min(960px, calc(100% - 26px));
  max-height: calc(100% - 26px);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-dialog {
  width: 940px;
  padding: 0;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

/* ── REVIEWS ── */
.reviews-section {
  padding: 34px 24px 54px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.review-card,
.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px;
  transition: all 300ms ease;
}

.review-card:hover,
.dashboard-panel:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.review-card {
  display: grid;
  gap: 12px;
  min-height: 218px;
}

.review-card-head,
.review-meta,
.dashboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.92rem;
  white-space: nowrap;
}

.review-rating-box,
.rating-frame {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.06);
}

.review-rating-box small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.review-card h3,
.dashboard-panel h3,
.checkout-form h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.review-card p,
.review-meta span,
.review-date,
.dashboard-row span {
  color: var(--text-secondary);
}

.review-date {
  font-size: 0.8rem;
  white-space: nowrap;
}

.review-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── AUTH ── */
.auth-dialog {
  width: min(920px, calc(100% - 26px));
  padding: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.auth-layout-simple {
  grid-template-columns: minmax(0, 1fr);
}

.auth-copy {
  min-height: 560px;
  padding: 34px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.20), rgba(99, 102, 241, 0.12)), url("https://cdn.cloudflare.steamstatic.com/steam/apps/1551360/library_hero.jpg") center / cover;
  display: grid;
  align-content: end;
}

.auth-copy h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  line-height: 1.12;
}

.auth-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.75);
}

.auth-forms {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 30px;
}

.auth-layout-simple .auth-forms {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 34px;
}

.auth-form {
  display: none;
}

.auth-form.is-visible {
  display: grid;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--gold);
}

/* ── MEMBER DASHBOARD ── */
.dashboard-dialog {
  width: min(1080px, calc(100% - 26px));
  padding: 0;
}

.member-dashboard {
  padding: 28px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.member-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.dashboard-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.dashboard-row {
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.review-prompt {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 16px;
}

.review-prompt label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.review-prompt input,
.review-prompt select,
.review-prompt textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  outline: 0;
  padding: 0 12px;
  background: rgba(15, 23, 42, 0.60);
  color: var(--text);
  transition: border-color 200ms ease;
}

.review-prompt input:focus,
.review-prompt select:focus,
.review-prompt textarea:focus {
  border-color: var(--brand);
}

.review-prompt textarea {
  padding: 10px 12px;
  resize: vertical;
}

/* ── PRODUCT DETAIL ── */
.detail-media {
  min-height: 420px;
  background: var(--bg);
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 30px;
}

.product-detail-page {
  position: relative;
  min-height: 100vh;
}

.product-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.product-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.3);
  transform: scale(1.1);
}

.product-hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.60) 0%, var(--bg) 65%);
}

.product-detail-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 24px 40px 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0 0 20px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.50);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  transition: all 200ms ease;
}

.back-link:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.product-detail-shell,
.recommended-section {
  width: 100%;
}

.product-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.product-showcase {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.product-showcase > * {
  animation: softRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.product-showcase > *:nth-child(1) { animation-delay: 0.1s; }
.product-showcase > *:nth-child(2) { animation-delay: 0.2s; }
.product-showcase > *:nth-child(3) { animation-delay: 0.3s; }
.product-showcase > *:nth-child(4) { animation-delay: 0.4s; }
.product-showcase > *:nth-child(5) { animation-delay: 0.5s; }
.product-showcase > *:nth-child(6) { animation-delay: 0.6s; }

.showcase-main {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.4);
}

.showcase-main img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 500ms ease;
}

.showcase-main:hover img {
  transform: scale(1.03);
}

.showcase-main::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 60%, rgba(2, 6, 23, 0.30));
  pointer-events: none;
}

/* Screenshot Section */
.screenshot-section {
  display: grid;
  gap: 12px;
}

.screenshot-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.screenshot-heading svg {
  color: var(--brand);
}

.screenshot-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.screenshot-thumb {
  flex: 0 0 auto;
  position: relative;
  height: 72px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  padding: 0;
  transition: all 200ms ease;
}

.screenshot-thumb:hover {
  border-color: var(--border-hover);
}

.screenshot-thumb.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.screenshot-thumb img {
  display: block;
  width: auto;
  height: 100%;
  object-fit: contain;
}

/* Detail Content Cards */
.detail-content-card,
.purchase-panel,
.orders-hero,
.orders-list,
.order-detail-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 200ms ease;
}

.detail-content-card:hover,
.purchase-panel:hover,
.orders-hero:hover,
.orders-list:hover,
.order-detail-panel:hover {
  border-color: var(--border-hover);
}

.detail-content-card {
  padding: 24px;
  min-width: 0;
}

.detail-content-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.detail-content-card h2 svg {
  color: var(--brand);
  width: 20px;
  height: 20px;
}

.detail-content-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.product-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.product-fact-grid div {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.30);
}

.product-fact-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

.product-fact-grid strong {
  align-self: end;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.detail-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.detail-feature-grid div {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.30);
  transition: all 200ms ease;
}

.detail-feature-grid div:hover {
  border-color: var(--border-hover);
}

.detail-feature-grid strong,
.detail-feature-grid span,
.system-list li {
  overflow-wrap: anywhere;
}

.detail-feature-grid svg,
.platform-link:hover {
  color: var(--brand);
}

.detail-feature-grid span,
.system-list,
.purchase-panel p {
  color: var(--text-secondary);
}

/* System Requirements Grid */
.system-req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.system-req-grid h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 12px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}

/* Purchase Panel */
.purchase-panel {
  position: sticky;
  top: 80px;
  display: grid;
  gap: 16px;
  padding: 20px;
  min-width: 0;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: softRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.25s;
}

.purchase-cover {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.purchase-cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 500ms ease;
}

.purchase-panel:hover .purchase-cover img {
  transform: scale(1.03);
}

.purchase-panel h1 {
  margin: 0;
  padding: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.purchase-panel>p {
  margin: 0;
  padding: 0;
}

.purchase-panel>.label-pill {
  margin: 0;
  width: fit-content;
}

.purchase-panel>.tags {
  padding: 0;
}

.purchase-panel>.price-row {
  padding: 0;
}

.purchase-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.purchase-stat:last-of-type {
  border-bottom: 1px solid var(--border);
}

.purchase-stat span,
.purchase-stat strong,
.tags,
.tag,
.label-pill,
.price-row {
  min-width: 0;
}

.purchase-stat strong,
.label-pill {
  overflow-wrap: anywhere;
}

.purchase-panel>.primary-button {
  margin: 8px 0 0 0;
  font-size: 1.1rem;
  padding: 16px 20px;
}

.purchase-panel>.platform-links {
  padding: 0;
}

.platform-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
}

.platform-link,
.order-list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-size: 0.86rem;
  text-align: center;
  transition: all 200ms ease;
}

.platform-link:hover {
  border-color: var(--border-hover);
  color: var(--brand);
}

.recommended-section {
  margin-top: 22px;
}

.compact-heading {
  margin-bottom: 12px;
}

.compact-heading h2 {
  font-size: 1.26rem;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.recommended-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: all 300ms ease;
}

.recommended-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.recommended-card:hover .primary-button {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.recommended-card img {
  width: 100%;
  aspect-ratio: 16 / 8.7;
  object-fit: cover;
}

.recommended-card>div {
  display: grid;
  gap: 6px;
  padding: 12px;
  min-width: 0;
}

.recommended-card span,
.recommended-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommended-card strong {
  overflow: hidden;
  overflow-wrap: anywhere;
  min-height: 2.5em;
  font-size: 0.98rem;
  line-height: 1.25;
}

.recommended-card>div>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.recommended-card b {
  color: var(--brand-hover);
  font-size: 0.96rem;
  white-space: nowrap;
}

.recommended-card em {
  margin-left: auto;
  color: var(--gold);
  font-size: 0.78rem;
  font-style: normal;
}

/* ── PREMIUM ORDER FORM ── */
.glass-panel {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 24px;
}

.manual-order-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
}

.premium-payment-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.premium-payment-panel h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.price-highlight {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-highlight span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.payment-tabs {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius);
}

.pay-tab {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pay-tab img {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.pay-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.pay-tab.is-active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pay-tab.is-active img {
  opacity: 1;
}

.qr-reveal-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 4px solid var(--border);
  transition: border-color 0.3s;
}

.qr-reveal-container.is-locked .qr-content {
  filter: blur(12px) grayscale(50%);
  opacity: 0.4;
  transform: scale(0.95);
  transition: all 0.4s ease;
}

.qr-reveal-container.is-unlocked {
  border-color: var(--brand);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.qr-reveal-container.is-unlocked .qr-content {
  filter: blur(0) grayscale(0);
  opacity: 1;
  transform: scale(1);
}

.qr-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
}

.qr-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.truemoney-qr-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f26522; /* TrueMoney Orange */
  padding: 12px;
}

.truemoney-qr-wrap img {
  background: white;
  border-radius: 8px;
  padding: 8px;
  width: 100%;
  height: 100%;
}

.qr-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--bg);
  background: rgba(255, 255, 255, 0.3);
  transition: opacity 0.3s;
  pointer-events: none;
}

.qr-lock-overlay i {
  width: 48px;
  height: 48px;
  color: var(--text);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.qr-lock-overlay span {
  font-weight: 600;
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.qr-reveal-container.is-unlocked .qr-lock-overlay {
  opacity: 0;
}

.hold-reveal-btn {
  position: relative;
  width: 100%;
  height: 52px;
  border: 1px solid var(--brand);
  background: transparent;
  border-radius: var(--radius);
  color: var(--brand);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.2s;
}

.hold-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: rgba(59, 130, 246, 0.2);
  pointer-events: none;
}

.hold-text {
  position: relative;
  z-index: 1;
}

.hold-reveal-btn.is-holding {
  transform: scale(0.97);
  box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.3);
}

.hold-reveal-btn.is-success {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  pointer-events: none;
}

.file-upload-premium {
  position: relative;
  width: 100%;
  height: 120px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
}

.file-upload-premium:hover {
  border-color: var(--brand);
  background: rgba(59, 130, 246, 0.05);
}

.file-upload-premium input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  pointer-events: none;
}

.upload-placeholder i {
  width: 32px;
  height: 32px;
  color: var(--text);
}

.glass-form label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.glass-form input[type="text"],
.glass-form textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.glass-form input[type="text"]:focus,
.glass-form textarea:focus {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--brand);
}

.premium-submit {
  height: 48px;
  font-size: 1.05rem;
  margin-top: 8px;
}

.detail-body h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  line-height: 1.12;
}

.detail-body p {
  margin: 0;
  color: var(--text-secondary);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.detail-list strong {
  color: var(--text);
  text-align: right;
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-value {
  display: grid;
  width: 54px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-xs);
  font-weight: 600;
}

/* ── CART ── */
.cart-dialog {
  width: min(1100px, calc(100% - 26px));
  padding: 24px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.cart-header .dialog-close {
  position: static;
}

.checkout-order-dialog {
  padding: 0;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(255,255,255,0.05);
}

.checkout-order-dialog .cart-header {
  padding: 24px 24px 16px;
  margin-bottom: 0;
  align-items: center;
}

.checkout-order-dialog .cart-header h2 {
  font-size: 1.5rem;
}

.checkout-order-dialog .cart-header .dialog-close {
  width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.checkout-order-dialog .cart-header .dialog-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 320px;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.cart-item img {
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-xs);
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.cart-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.cart-item-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.checkout-form {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
}

.checkout-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--border);
  outline: 0;
  padding: 0 12px;
  background: rgba(15, 23, 42, 0.60);
  color: var(--text);
  border-radius: var(--radius-xs);
  transition: border-color 200ms ease;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
  border-color: var(--brand);
}

.checkout-form textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.order-summary {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.order-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
}

.order-summary strong {
  color: var(--text);
}

.order-summary .total-line {
  color: var(--text);
  font-size: 1.1rem;
}

/* ── PAYMENT ── */
.payment-dialog {
  width: min(760px, calc(100% - 26px));
  padding: 0;
}

.payment-result {
  display: grid;
  gap: 18px;
  padding: 30px;
}

.payment-head {
  display: grid;
  gap: 8px;
}

.payment-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
}

.payment-head p {
  margin: 0;
  color: var(--text-secondary);
}

.payment-box {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
}

.qr-box {
  display: grid;
  min-height: 220px;
  place-items: center;
  background: #fff;
  border-radius: var(--radius-sm);
}

.qr-box img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.payment-lines {
  display: grid;
  align-content: center;
  gap: 12px;
}

.payment-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.payment-lines strong {
  color: var(--text);
  text-align: right;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-row code {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--brand);
  border-radius: var(--radius-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── ORDERS ── */
.orders-page {
  padding: 20px 12px 60px;
}

.orders-hero {
  padding: 28px;
  margin-bottom: 16px;
}

.orders-hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.05rem);
  font-weight: 700;
}

.orders-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
}

.orders-list,
.order-detail-panel {
  padding: 16px;
}

.orders-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.order-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: left;
}

.order-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.05);
}
.order-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--muted);
}

.order-list-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.order-list-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-list-item.is-active {
  border-color: var(--brand);
  background: rgba(59, 130, 246, 0.08);
}

.clean-order-panel {
  background: transparent;
  border: none;
  padding: 0;
}

.order-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.clean-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.clean-timeline div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--bg-card);
  text-align: center;
  font-size: 0.9rem;
}

.clean-timeline .is-done {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.06);
  color: var(--brand);
}

.order-items-list {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.item-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-package-line,
.order-package-subline {
  display: block;
  color: var(--brand-hover);
  font-size: 0.86rem;
  line-height: 1.35;
}

.order-package-subline {
  color: var(--muted);
  font-size: 0.78rem;
}

.clean-summary {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.clean-summary div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.clean-summary div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.clean-summary .total-row {
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.1rem;
}
.total-price {
  color: var(--gold);
  font-size: 1.25rem;
}

.delivery-note {
  padding: 20px;
  border-radius: var(--radius-sm);
}

.highlight-note {
  background: rgba(16, 185, 129, 0.05); /* Emerald tint */
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.highlight-note h3 {
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.waiting-note {
  background: rgba(245, 158, 11, 0.05); /* Amber tint */
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.waiting-note h3 {
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pre-wrap {
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 1rem;
  line-height: 1.5;
  background: rgba(0,0,0,0.2);
  padding: 12px;
  border-radius: 4px;
}

.order-review-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.30);
}

.review-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.review-panel-head h3,
.delivery-note h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.review-panel-head p:not(.eyebrow),
.delivery-note p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.order-review-form {
  display: grid;
  gap: 12px;
}

.order-review-form .form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 10px;
}

.order-review-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.order-review-form input,
.order-review-form select,
.order-review-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  outline: 0;
  padding: 0 11px;
  background: rgba(15, 23, 42, 0.60);
  color: var(--text);
  transition: border-color 200ms ease;
}

.order-review-form textarea {
  min-height: 104px;
  padding: 10px 11px;
  resize: vertical;
}

.order-review-form input:focus,
.order-review-form select:focus,
.order-review-form textarea:focus {
  border-color: var(--brand);
}

.order-review-list {
  display: grid;
  gap: 8px;
}

.order-review-list article {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.30);
}

.order-review-list article>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-review-list p,
.order-review-list small {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ── SHARED HOVER ── */
.topbar,
.hero,
.deal-card,
.product-card,
.feature-card,
.review-card,
.dashboard-panel,
.detail-header-card,
.showcase-main,
.detail-content-card,
.orders-hero,
.orders-list,
.order-detail-panel,
.store-widget {
  position: relative;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* ──────────────────────────────────────────
   ANIMATIONS
   ────────────────────────────────────────── */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glassDrift {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes sheenSlide {
  from {
    transform: translateX(-120%) skewX(-18deg);
  }

  to {
    transform: translateX(200%) skewX(-18deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeSlideRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeSlideLeft {
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes imgFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.hero-content,
.section-heading,
.stats-strip article,
.deal-card,
.feature-card,
.product-card,
.review-card,
.dashboard-panel,
.widget-zone,
.orders-hero,
.orders-list,
.order-detail-panel,
.detail-header-card,
.product-detail-shell {
  animation: softRise 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-deal {
  animation: softRise 600ms cubic-bezier(0.16, 1, 0.3, 1) both, glassDrift 7s ease-in-out 1s infinite;
}

.product-card:nth-child(2n),
.feature-card:nth-child(2n),
.review-card:nth-child(2n) {
  animation-delay: 60ms;
}

.product-card:nth-child(3n),
.feature-card:nth-child(3n),
.review-card:nth-child(3n) {
  animation-delay: 120ms;
}

.product-image img,
.feature-card img,
.deal-card img {
  transition: transform 500ms ease;
}

.product-card:hover .product-image img,
.feature-card:hover img,
.deal-card:hover img {
  transform: scale(1.05);
}

.primary-button,
.primary-link,
.secondary-button,
.icon-button,
.account-button,
.platform-link,
.order-list-item {
  position: relative;
  overflow: hidden;
}

.primary-button::after,
.primary-link::after {
  position: absolute;
  inset: -20% auto -20% 0;
  width: 40%;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-140%) skewX(-18deg);
}

.primary-button:hover::after,
.primary-link:hover::after {
  animation: sheenSlide 800ms ease;
}

dialog[open] {
  animation: popIn 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

dialog::backdrop {
  animation: fadeIn 200ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── USER POPOVER ── */
.user-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  animation: popIn 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  overflow: hidden;
  padding: 12px;
}

.user-popover[hidden] {
  display: none;
}

.user-profile-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.user-popover-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-popover-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.user-popover-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-popover-info strong {
  display: block;
  font-size: 0.95rem;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-popover-info span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-popover-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 0.75rem;
}

.user-badge-role {
  color: #60a5fa;
  font-weight: 600;
}

.user-badge-points {
  color: var(--muted);
}

.user-popover-menu-title {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0 8px;
}

.user-popover-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-popover-menu button,
.user-popover-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 150ms ease;
}

.user-popover-menu button:hover,
.user-popover-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.user-popover-menu button svg,
.user-popover-menu a svg {
  color: var(--muted);
  width: 18px;
  height: 18px;
}

.user-popover-menu button:hover svg,
.user-popover-menu a:hover svg {
  color: var(--brand);
}

.user-popover-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.user-popover-menu .danger-item {
  color: var(--danger);
}

.user-popover-menu .danger-item svg {
  color: var(--danger);
}

/* ── NOTIFICATION POPOVER ── */
.notification-button {
  position: relative;
}

.notification-button.has-notifications::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--danger);
  opacity: 0.42;
  animation: notificationDotBlink 1.25s ease-in-out infinite;
  pointer-events: none;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  min-width: 8px;
  padding: 0;
  background-color: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg);
  font-size: 0;
  line-height: 0;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.42);
  animation: notificationDotBlink 1.25s ease-in-out infinite;
}

.notification-badge[hidden] {
  display: none;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  animation: popIn 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  overflow: hidden;
}

.notification-popover[hidden] {
  display: none;
}

.notification-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.notification-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.notification-body {
  max-height: 400px;
  overflow-y: auto;
}

.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: var(--muted);
  gap: 12px;
}

.notification-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  color: inherit;
  text-decoration: none;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.notification-item.unread {
  background: rgba(59, 130, 246, 0.05);
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  flex-shrink: 0;
}

.notification-thumb {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.notification-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.notification-item.unread .notification-icon {
  background: var(--brand);
  color: white;
}

.notification-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-content strong {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}

.notification-content p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.notification-content span {
  font-size: 0.7rem;
  color: var(--muted);
}

.notification-delivered .notification-icon {
  background: rgba(16, 185, 129, 0.14);
  color: var(--success);
}

@keyframes notificationDotBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.28;
    transform: scale(0.78);
  }
}

/* Password change section inside popover */
.password-change-section {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.password-change-section label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.password-change-section input {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  outline: 0;
  padding: 0 10px;
  background: rgba(15, 23, 42, 0.60);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  transition: border-color 200ms ease;
}

.password-change-section input:focus {
  border-color: var(--brand);
}

.password-change-section .primary-button {
  min-height: 34px;
  font-size: 0.82rem;
}

/* ── CONTACT POPUP ── */
.contact-dialog {
  width: min(440px, calc(100% - 26px));
  padding: 0;
}

.contact-dialog-body {
  display: grid;
  gap: 12px;
  padding: 28px;
}

.contact-dialog-body h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.contact-dialog-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-links {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.contact-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: all 250ms ease;
}

.contact-link-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-link-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-link-icon.fb {
  background: linear-gradient(135deg, #1877f2, #0d5bbf);
  color: #fff;
}

.contact-link-icon.dc {
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: #fff;
}

.contact-link-card strong {
  display: block;
  font-size: 0.95rem;
}

.contact-link-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ── TOAST NOTIFICATION ── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 100;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: auto;
  animation: fadeSlideRight 300ms ease both;
}

.toast.is-leaving {
  animation: fadeSlideLeft 300ms ease both;
}

.toast svg {
  color: var(--success);
  flex-shrink: 0;
}

.toast.toast-error svg {
  color: var(--danger);
}

/* ── PURCHASE HISTORY IN POPOVER ── */
.purchase-history-list {
  display: grid;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.purchase-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.purchase-history-item:last-child {
  border-bottom: 0;
}

.purchase-history-item strong {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.purchase-history-item span {
  color: var(--muted);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ──────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────── */
@media (max-width: 1180px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 64px;
  }

  .hero-content {
    padding-bottom: 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-deal {
    max-width: 420px;
  }

  .catalog-layout,
  .cart-layout,
  .product-detail,
  .payment-box,
  .product-detail-shell,
  .orders-layout,
  .manual-order-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-grid,
  .review-grid,
  .dashboard-grid,
  .auth-layout,
  .recommended-grid,
  .olaf-trust-widget,
  .olaf-license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-panel {
    position: static;
  }

  .purchase-cover {
    aspect-ratio: 16 / 9;
  }

  .auth-layout-simple {
    grid-template-columns: 1fr;
  }

  .olaf-steam-body {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .olaf-steam-preview-space,
  .olaf-steam-preview {
    display: none;
  }

  .auth-copy {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .main-nav {
    grid-column: 1 / -1;
    width: 100%;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  .cart-button span {
    display: none;
  }

  .hero,
  .catalog-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 1.74rem;
  }

  .hero-actions,
  .toolbar,
  .section-heading,
  .checkout-band {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-strip article {
    min-height: 104px;
    padding: 18px 14px;
  }

  .side-panel,
  .featured-grid,
  .product-grid,
  .review-grid,
  .dashboard-grid,
  .auth-layout,
  .detail-feature-grid,
  .product-fact-grid,
  .recommended-grid,
  .olaf-trust-widget,
  .olaf-social-widget,
  .olaf-license-grid,
  .order-timeline,
  .order-review-form .form-row,
  .review-prompt,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .purchase-panel {
    position: static;
  }

  .product-detail-container {
    padding: 16px 14px 40px;
  }

  .screenshot-thumb {
    width: 110px;
  }

  .olaf-steam-widget,
  .olaf-trust-widget,
  .olaf-social-widget,
  .olaf-license-widget {
    padding: 16px;
  }

  .olaf-widget-head,
  .olaf-social-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .olaf-steam-item {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .olaf-steam-thumb {
    width: 140px;
    height: 100%;
    grid-row: 1 / 3;
    object-fit: cover;
  }

  .olaf-steam-price {
    grid-column: 2;
    justify-content: flex-start;
    padding: 0 12px 10px 0;
  }

  .checkout-band {
    margin-left: 14px;
    margin-right: 14px;
    padding: 20px;
  }

  .cart-dialog {
    padding: 18px;
  }

  .cart-item {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .cart-item img {
    width: 90px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: stretch;
  }

  .detail-media {
    min-height: 260px;
  }

  .auth-copy,
  .auth-forms,
  .member-dashboard {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .topbar-actions {
    gap: 6px;
  }

  .main-nav a {
    min-width: 62px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .hero-actions .primary-link,
  .hero-actions .secondary-button,
  .checkout-band .primary-button {
    width: 100%;
  }

  .stats-strip strong {
    font-size: 1.32rem;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .payment-result,
  .detail-body {
    padding: 22px;
  }
}

/* ── PAGINATION ── */
.pagination-controls {
  margin-top: 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: flex-end; /* Align right */
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  background: transparent;
  padding: 4px 10px;
  transition: all 300ms ease;
}

:root[data-theme="dark"] .pagination {
  background: transparent;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 500; /* Thinner font */
  font-size: 0.8rem; /* Smaller font */
  cursor: pointer;
  padding: 4px 8px; /* Smaller padding */
  border-radius: 99px;
  transition: background-color 200ms ease, color 200ms ease;
}

.pagination-btn:hover {
  background-color: rgba(0, 112, 209, 0.08);
}

:root[data-theme="dark"] .pagination-btn:hover {
  background-color: rgba(102, 174, 232, 0.1);
}

.pagination-btn svg {
  width: 14px;
  height: 14px;
}

.pagination-info {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin: 0 4px;
}

/* ──────────────────────────────────────────
   TOAST NOTIFICATIONS — Enhanced System
   ────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
  width: 100%;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.70);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  pointer-events: all;
  animation: toastSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--success);
  border-radius: 14px 0 0 14px;
}

.toast svg {
  flex-shrink: 0;
  color: var(--success);
  width: 20px;
  height: 20px;
}

.toast span {
  flex: 1;
  line-height: 1.4;
}

/* Toast type variants */
.toast.toast-success::before { background: var(--success); }
.toast.toast-success svg { color: #34d399; }
.toast.toast-success { border-color: rgba(16,185,129,0.3); }

.toast.toast-error::before { background: var(--danger); }
.toast.toast-error svg { color: #f87171; }
.toast.toast-error { border-color: rgba(239,68,68,0.3); }

.toast.toast-info::before { background: var(--info); }
.toast.toast-info svg { color: #22d3ee; }
.toast.toast-info { border-color: rgba(6,182,212,0.3); }

.toast.toast-warning::before { background: var(--gold); }
.toast.toast-warning svg { color: #fcd34d; }
.toast.toast-warning { border-color: rgba(245,158,11,0.3); }

.toast.toast-payment::before { background: #8b5cf6; }
.toast.toast-payment svg { color: #c4b5fd; }
.toast.toast-payment { border-color: rgba(139,92,246,0.3); }

.toast.toast-order::before { background: var(--brand); }
.toast.toast-order svg { color: #60a5fa; }
.toast.toast-order { border-color: rgba(59,130,246,0.3); }

.toast.toast-shipping::before { background: #06b6d4; }
.toast.toast-shipping svg { color: #22d3ee; }
.toast.toast-shipping { border-color: rgba(6,182,212,0.3); }

.toast.toast-cancel::before { background: var(--danger); }
.toast.toast-cancel svg { color: #f87171; }
.toast.toast-cancel { border-color: rgba(239,68,68,0.3); }

.toast.is-leaving {
  animation: toastSlideOut 0.35s ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(110%) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(110%) scale(0.88);
  }
}

/* ──────────────────────────────────────────
   PAYMENT RESULT — Enhanced QR Page
   ────────────────────────────────────────── */
.payment-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16,185,129,0.15);
  border: 3px solid rgba(16,185,129,0.4);
  color: #34d399;
  margin: 0 auto 16px;
  animation: popInBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 0 30px rgba(16,185,129,0.25);
}

.payment-success-icon svg {
  width: 36px;
  height: 36px;
}

@keyframes popInBounce {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.payment-head {
  text-align: center;
  margin-bottom: 20px;
}

.payment-total-highlight {
  color: #60a5fa;
  font-size: 1.1rem;
}

.status-waiting {
  color: #fcd34d;
  font-size: 0.85rem;
}

/* QR Code Amount Badge */
.qr-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  border: 2px solid var(--brand);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(59,130,246,0.25), inset 0 0 20px rgba(59,130,246,0.1);
  padding: 24px;
  margin-bottom: 24px;
  overflow: hidden;
  animation: floatQR 4s ease-in-out infinite;
}

.qr-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: rgba(59,130,246,0.8);
  box-shadow: 0 0 15px rgba(59,130,246,1);
  animation: scanline 2.5s infinite linear;
  z-index: 2;
}

@keyframes scanline {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(250px); opacity: 0; }
}

@keyframes floatQR {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.qr-box img {
  width: 210px;
  height: 210px;
  object-fit: contain;
  mix-blend-mode: multiply;
  z-index: 1;
}

.qr-amount-badge {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--brand), #8b5cf6);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 6px 20px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(59,130,246,0.5);
  letter-spacing: 0.5px;
  z-index: 3;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* Payment Account Block */
.payment-account-block {
  background: rgba(59,130,246,0.04);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
  animation: fadeIn 0.5s ease both 0.3s;
  position: relative;
  overflow: hidden;
}

.payment-account-block::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  pointer-events: none;
}

.payment-account-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-hover);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.payment-account-header svg {
  width: 16px;
  height: 16px;
}

.payment-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(30,41,59,0.5);
  font-size: 0.88rem;
}

.payment-account-row:last-of-type {
  border-bottom: 0;
}

.payment-account-row span {
  color: var(--muted);
  flex-shrink: 0;
}

.payment-account-row strong {
  letter-spacing: 0.05em;
}

.payment-account-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #fcd34d;
}

.payment-account-note svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Product info list */
.pd-info-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 24px;
}

.pd-info-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Payment Steps */
.payment-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  padding: 14px;
  background: rgba(15,23,42,0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.payment-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.payment-step .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────
   LOGIN / REGISTER DIALOG — Link Buttons
   ────────────────────────────────────────── */
.order-payment-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.48);
}

.order-payment-grid {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.order-payment-qr-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.35);
}

.order-payment-qr-card img {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.order-payment-qr-card strong {
  color: var(--brand-hover);
}

.order-payment-detail {
  display: grid;
  gap: 10px;
}

.order-payment-detail h3,
.order-slip-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.order-payment-detail > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.order-payment-account {
  margin: 4px 0;
}

.order-slip-block {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.25);
}

.order-slip-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payment-slip-preview {
  display: grid;
  gap: 8px;
}

.payment-slip-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.payment-slip-preview img {
  max-width: 220px;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.payment-slip-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.payment-slip-picker {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--text-secondary);
  cursor: pointer;
}

.payment-slip-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.payment-slip-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.order-action-buttons > div {
  display: none;
}

@media (max-width: 720px) {
  .order-payment-grid,
  .payment-slip-form {
    grid-template-columns: 1fr;
  }

  .order-payment-qr-card img {
    max-width: 190px;
  }
}

.auth-page-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 250ms ease;
  box-shadow: 0 4px 14px rgba(59,130,246,0.25);
}

.auth-page-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.35);
}

/* Auth dialog enhancement — page link option */
.auth-page-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.auth-page-links-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ──────────────────────────────────────────
   USER POPOVER — Profile Link
   ────────────────────────────────────────── */
.user-popover-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 200ms ease;
  border-radius: 8px;
}

.user-popover-menu a:hover {
  background: rgba(59,130,246,0.08);
  color: var(--text);
}

/* ──────────────────────────────────────────
   ORDERS PAGE — Toast enhancements
   ────────────────────────────────────────── */
.order-action-toast {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ──────────────────────────────────────────
   MINI POPOVER HOVER EFFECT
   ────────────────────────────────────────── */
.user-popover-header-link:hover .user-popover-header {
  background: rgba(255, 255, 255, 0.05);
}
.payment-account-row strong {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}

.payment-account-row strong.account-number {
  color: var(--brand);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(59,130,246,0.2);
}


.payment-result {
  animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.copy-row button {
  transition: all 0.2s ease;
}
.copy-row button:active {
  transform: scale(0.95);
  background: rgba(59, 130, 246, 0.2);
}


.primary-button {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.primary-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(59,130,246,0.4);
}
.primary-button:active {
  transform: scale(0.95);
}

.payment-dialog[open] {
  animation: modalPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPopIn {
  0% { transform: scale(0.8) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}


/* ══════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE  (thisgamestore-inspired layout)
   ══════════════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
#product-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
}

.pd-bg-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background-size: cover;
  background-position: center 20%;
  filter: blur(40px) saturate(180%);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.pd-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 20px 0 18px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 200ms ease;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.pd-breadcrumb:hover {
  color: var(--brand-hover);
}

.pd-breadcrumb svg {
  width: 16px;
  height: 16px;
}

/* ── Two-column layout ── */
.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

/* ── LEFT COLUMN ── */
.pd-left {
  min-width: 0;
}

/* Hero image */
.pd-hero-img {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.pd-hero-img img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(0.25, 1, 0.5, 1), opacity 200ms ease;
  transform-origin: center center;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.pd-hero-img:hover img {
  transform: scale(1.02);
}

/* Screenshot gallery */
.pd-gallery-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-hover);
}

.pd-screenshots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.pd-thumb {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 200ms ease;
  aspect-ratio: 16/9;
  background: var(--bg-card);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-thumb:hover,
.pd-thumb.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.4);
}

/* Content sections */
.pd-section {
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  transition: border-color 200ms ease;
}

.pd-section:last-child {
  border-bottom: none;
}

.pd-section:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.pd-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.pd-section-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-hover);
}

.pd-section-icon-box svg {
  width: 20px;
  height: 20px;
}

/* Description text */
.pd-description {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.93rem;
  white-space: pre-line;
}

/* Info rows (delivery / warranty / rating) */

.pd-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.pd-info-row:last-child {
  border-bottom: none;
}

.pd-info-row span {
  color: var(--text-secondary);
}

.pd-info-row strong {
  text-align: right;
}

/* ── RIGHT SIDEBAR ── */
.pd-sidebar {
  position: sticky;
  top: 80px;
}

.pd-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: border-color 300ms ease;
}

.pd-sidebar-card:hover {
  border-color: var(--border-hover);
}

/* Sidebar cover art */
.pd-sidebar-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}

.pd-sidebar-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sidebar body */
.pd-sidebar-body {
  padding: 20px;
}

/* Platform badges row */
.pd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.pd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pd-badge-steam {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.4);
  color: var(--brand-hover);
}

.pd-badge-psn {
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.4);
  color: #a5b4fc;
}

.pd-badge-xbox {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.35);
  color: var(--success);
}

.pd-badge-premium {
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.35);
  color: var(--gold);
}

.pd-badge-offline {
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.3);
  color: #c4b5fd;
}

/* Sidebar title */
.pd-sidebar-title {
  margin: 0 0 4px;
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.pd-sidebar-publisher {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Genre tags in sidebar */
.pd-genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 18px;
}

.pd-genre-tag {
  padding: 3px 9px;
  border: 1px solid rgba(59,130,246,0.25);
  background: rgba(59,130,246,0.06);
  color: var(--brand-hover);
  font-size: 0.7rem;
  border-radius: 5px;
  font-weight: 500;
}

/* Price section */
.pd-price-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.pd-price-main {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-hover);
  line-height: 1;
}

.pd-price-compare {
  font-size: 1rem;
  text-decoration: line-through;
  color: var(--muted);
}

.pd-price-discount {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 18px;
}

.pd-package-section {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.pd-package-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 0.9rem;
}

.pd-package-head span {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.pd-package-options {
  display: grid;
  gap: 8px;
}

.pd-package-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.pd-package-option:hover:not(.is-disabled),
.pd-package-option.is-selected {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.10);
}

.pd-package-option:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.7);
  outline-offset: 2px;
}

.pd-package-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.pd-package-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pd-package-radio {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: transparent;
  background: rgba(15, 23, 42, 0.65);
}

.pd-package-radio svg {
  width: 15px;
  height: 15px;
}

.pd-package-option.is-selected .pd-package-radio {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.pd-package-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.pd-package-copy strong,
.pd-package-copy small,
.pd-package-copy em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pd-package-copy strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.25;
}

.pd-package-copy small,
.pd-package-copy em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  line-height: 1.35;
}

.pd-package-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 72px;
}

.pd-package-meta b {
  color: var(--brand-hover);
  font-size: 0.92rem;
  white-space: nowrap;
}

.pd-package-meta small {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.pd-package-meta small.danger,
.pd-package-meta small.out-stock {
  color: var(--danger);
}

.pd-package-meta small.warn,
.pd-package-meta small.low-stock {
  color: var(--gold);
}

.pd-package-meta small.ok,
.pd-package-meta small.in-stock {
  color: var(--success);
}

.pd-package-badge {
  max-width: 110px;
  padding: 2px 6px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Stock pill in sidebar */
.pd-stock-row {
  margin-bottom: 16px;
}

/* Quantity row */
.pd-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pd-qty-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.pd-qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.pd-qty-control button {
  background: none;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 180ms ease;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.pd-qty-control button:hover:not(:disabled) {
  background: rgba(59,130,246,0.12);
  color: var(--brand-hover);
}

.pd-qty-control button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pd-qty-value {
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 44px;
  text-align: center;
  color: var(--text);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* Buy button */
.pd-buy-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59,130,246,0.35);
  transition: all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pd-buy-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(59,130,246,0.5);
}

.pd-buy-btn:active {
  transform: scale(0.97);
}

.pd-buy-btn:disabled {
  background: rgba(30,41,59,0.6);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* Feature icons row (offline / cloud) */
.pd-features-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.pd-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  width: 100%;
  box-sizing: border-box;
}

.pd-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand);
}

.pd-feature-icon.offline-icon {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
}

.pd-feature-icon.cloud-icon {
  background: rgba(245,158,11,0.12);
  color: var(--gold);
}

.pd-feature-icon.online-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.pd-feature-icon.cloud-save-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.pd-feature-icon svg {
  width: 16px;
  height: 16px;
}

.pd-feature-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pd-feature-text strong {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-feature-text span {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Platform Links */
.pd-platform-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.pd-platform-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 200ms ease;
  text-decoration: none;
}

.pd-platform-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.pd-platform-link svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* ── Out-of-stock ── */
.pd-out-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ── Separator ── */
.pd-separator {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }

  .pd-sidebar {
    position: relative;
    top: 0;
  }

  .pd-screenshots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  #product-page {
    padding: 0 14px 60px;
  }

  .pd-screenshots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pd-layout {
    gap: 20px;
  }

  .pd-features-row {
    grid-template-columns: 1fr;
  }
}


/* ── Related Products Grid ── */
.pd-related-section {
  padding: 20px 24px;
}

.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.pd-related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.5));
  transition: all 250ms ease;
  text-decoration: none;
  color: inherit;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.pd-related-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  background-image: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8));
}

.pd-related-img {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg);
}

.pd-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.pd-related-img::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}

.pd-related-card:hover .pd-related-img img {
  transform: scale(1.06);
}

.pd-related-discount {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 1;
  background: rgba(16,185,129,0.9);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  backdrop-filter: blur(4px);
}

.pd-related-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.pd-related-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 2.6em;
}

.pd-related-publisher {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-related-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
}

.pd-related-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-hover);
}

@media (max-width: 900px) {
  .pd-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .pd-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── System Requirements ── */
.pd-sysreq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pd-sysreq-panel {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 24px;
}

.pd-sysreq-panel-rec {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(15, 23, 42, 0.4);
}

.pd-sysreq-panel h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
}

.pd-sysreq-panel-rec h4 {
  color: var(--text);
}

.pd-sysreq-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pd-sysreq-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pd-sysreq-list li {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
}

.pd-sysreq-list li strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 2px;
}

@media (max-width: 700px) {
  .pd-sysreq-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Languages Section ── */
.pd-lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pd-lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 200ms;
}

.pd-lang-chip.has-audio {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
}

.pd-lang-chip.has-audio span:last-child {
  color: #c7d2fe;
}

.pd-lang-audio {
  font-size: 0.75rem;
  opacity: 0.85;
}

.pd-lang-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Description HTML render ── */
.pd-description {
  font-size: 0.92rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.75;
}

.pd-description br {
  display: block;
  margin-bottom: 4px;
}

/* ── Skeleton & Loading Animations ── */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton-box {
  display: block;
  background: linear-gradient(to right, var(--bg-card) 4%, var(--bg-card-hover) 25%, var(--bg-card) 36%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear forwards;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 1.2rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 16/8;
  border-radius: 16px;
  margin-bottom: 16px;
}

.skeleton-sidebar {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 16px;
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────
   ORDER CONFIRM / TERMS DIALOG
   ────────────────────────────────────────── */

.order-confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  max-height: min(700px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 18px;
  background: rgba(10, 16, 32, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255,255,255,0.04);
  color: var(--text);
  overflow: hidden;
  flex-direction: column;
}

.order-confirm-dialog::backdrop {
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@keyframes orderConfirmIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.order-confirm-dialog[open] {
  display: flex;
  animation: orderConfirmIn 250ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ──────────────────────────────────────────
   PREMIUM MODAL DESIGNS (CHECKOUT & QR)
   ────────────────────────────────────────── */

.premium-dialog {
  position: fixed;
  inset: 0;
  z-index: 300;
  margin: auto;
  width: min(560px, calc(100vw - 32px));
  max-height: min(85vh, calc(100vh - 32px));
  padding: 0;
  background: #020617; /* Navy dark */
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255,255,255,0.05);
  color: #f1f5f9;
  overflow: hidden;
  
  /* Closing animation setup */
  opacity: 0;
  transform: scale(0.96) translateY(10px);
  transition: opacity 250ms ease, transform 250ms ease, overlay 250ms allow-discrete, display 250ms allow-discrete;
}

.premium-dialog[open] {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: scale(1) translateY(0);
}

@starting-style {
  .premium-dialog[open] {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
}

.premium-dialog::backdrop {
  background: rgba(2, 6, 23, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 250ms ease, backdrop-filter 250ms ease, -webkit-backdrop-filter 250ms ease, overlay 250ms allow-discrete, display 250ms allow-discrete;
}

.premium-dialog[open]::backdrop {
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@starting-style {
  .premium-dialog[open]::backdrop {
    background: rgba(2, 6, 23, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
}

.premium-dialog-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  position: relative;
}

.premium-dialog-inner::-webkit-scrollbar { width: 6px; }
.premium-dialog-inner::-webkit-scrollbar-track { background: transparent; }
.premium-dialog-inner::-webkit-scrollbar-thumb { background: rgba(51, 65, 85, 0.6); border-radius: 10px; }

.premium-dialog .dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #94a3b8;
  z-index: 10;
  padding: 8px;
  border-radius: 8px;
  transition: all 200ms ease;
  cursor: pointer;
}
.premium-dialog .dialog-close:hover {
  background: rgba(255,255,255,0.08);
  color: #f1f5f9;
}

/* Header */
.premium-dialog-header {
  text-align: center;
  padding: 32px 24px 20px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.premium-icon-box {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}
.premium-icon-box svg { width: 28px; height: 28px; }

.premium-icon-box.qr-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.premium-dialog-header h2 {
  font-size: 1.35rem;
  margin: 0 0 6px;
  color: #f1f5f9;
  font-weight: 700;
}

.premium-dialog-header p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
}

.order-ref-number {
  margin-top: 12px;
  display: inline-block;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.6);
  font-size: 0.85rem;
  color: #94a3b8;
}
.order-ref-number span { color: #f1f5f9; font-family: monospace; letter-spacing: 0.05em; }

/* Form Content */
.premium-checkout-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Product Card */
.premium-product-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 12px;
  align-items: center;
}

.premium-product-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(51, 65, 85, 0.3);
}
.premium-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.premium-product-info {
  flex: 1;
  min-width: 0;
}
.premium-product-info h3 {
  font-size: 1rem;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f1f5f9;
}
.premium-product-label {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 2px;
}
.premium-product-qty {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
}

.premium-product-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: #3b82f6;
  text-align: right;
}

/* Summary Card */
.premium-summary-card {
  padding: 16px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.4);
  border-radius: 12px;
}

.premium-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #94a3b8;
}
.premium-summary-row:last-child { margin-bottom: 0; }

.premium-summary-row.total-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(51, 65, 85, 0.6);
  font-size: 1.1rem;
  color: #f1f5f9;
  align-items: center;
}
.premium-total-price {
  color: #8b5cf6;
  font-size: 1.25rem;
}

/* Payment Section */
.premium-payment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.premium-payment-header .payment-line {
  flex: 1;
  height: 1px;
  background: rgba(51, 65, 85, 0.6);
}

.premium-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .premium-payment-grid { grid-template-columns: 1fr; }
}

.premium-payment-card {
  position: relative;
  display: flex;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 12px;
  cursor: pointer;
  transition: all 200ms ease;
  overflow: hidden;
}

.premium-payment-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(99, 102, 241, 0.4);
}

.premium-payment-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.payment-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  gap: 8px;
}
.payment-card-content i {
  color: #94a3b8;
  width: 28px;
  height: 28px;
  transition: color 200ms ease;
}
.payment-card-content strong {
  font-size: 0.95rem;
  color: #f1f5f9;
  line-height: 1.2;
}
.payment-card-content span {
  font-size: 0.75rem;
  color: #64748b;
}

.payment-check {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #3b82f6;
  opacity: 0;
  transform: scale(0.8);
  transition: all 200ms ease;
}

.premium-payment-card:has(input:checked) {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}
.premium-payment-card:has(input:checked) .payment-card-content i {
  color: #3b82f6;
}
.premium-payment-card:has(input:checked) .payment-check {
  opacity: 1;
  transform: scale(1);
}

/* Wallet selected (Orange) */
.premium-payment-card:has(input[value="wallet"]:checked) {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.15);
}
.premium-payment-card:has(input[value="wallet"]:checked) .payment-card-content i {
  color: #f97316;
}
.premium-payment-card:has(input[value="wallet"]:checked) .payment-check {
  color: #f97316;
}

.premium-payment-card:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(100%);
}

/* Actions */
.premium-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.submit-order-btn {
  height: 52px;
  font-size: 1.05rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 200ms ease;
}
.submit-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}
.submit-order-btn:active {
  transform: translateY(0);
}
.submit-order-btn:disabled {
  background: rgba(51, 65, 85, 0.8);
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.text-button {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 8px;
  cursor: pointer;
  transition: color 200ms ease;
  font-weight: 500;
}
.text-button:hover { color: #f1f5f9; }
.text-danger { color: #ef4444; }
.text-danger:hover { color: #f87171; }

.cancel-order-btn {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: #94a3b8;
}
.cancel-order-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #f1f5f9;
}

/* QR Modal Specific */
.qr-payment-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 99px;
  color: #60a5fa;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.qr-image-frame {
  width: 220px;
  height: 220px;
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.qr-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-loading {
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}
.qr-unavailable {
  color: #ef4444;
  font-size: 0.85rem;
  text-align: center;
}

.qr-order-details {
  width: 100%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.qr-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #94a3b8;
}
.qr-detail-row:last-child { margin-bottom: 0; }
.qr-detail-row strong { color: #f1f5f9; }
.qr-total-highlight {
  font-size: 1.4rem;
  color: #3b82f6 !important;
}

.qr-accounts-container {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
}
.qr-account-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.qr-account-box .bank-name {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 4px;
}
.qr-account-box .acc-number {
  font-size: 1.05rem;
  color: #f1f5f9;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.qr-account-box .acc-name {
  font-size: 0.8rem;
  color: #64748b;
}

.qr-note-alert {
  color: #fbbf24;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(245, 158, 11, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  width: 100%;
}

.qr-manual-transfer {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 12px;
  overflow: hidden;
  transition: all 200ms ease;
}
.qr-manual-transfer summary {
  padding: 12px 16px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.qr-manual-transfer summary::-webkit-details-marker {
  display: none;
}
.qr-manual-transfer summary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}
.qr-manual-transfer summary::after {
  content: "";
  width: 16px;
  height: 16px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
}
.qr-manual-transfer[open] summary::after {
  transform: rotate(180deg);
}
.qr-manual-transfer-body {
  padding: 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.4);
}
details.qr-manual-transfer[open] .qr-manual-transfer-body {
  animation: detailsFadeIn 250ms ease-out forwards;
}
@keyframes detailsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.qr-manual-transfer-body .qr-accounts-container {
  margin-bottom: 0;
}

.qr-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 99px;
  color: #fbbf24;
  font-size: 0.85rem;
}

.order-confirm-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header */
.order-confirm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.order-confirm-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.order-confirm-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Scrollable Terms Area */
.order-confirm-terms-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin: 12px 20px 0;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
}

.order-confirm-terms-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(10,16,32,0.92));
  pointer-events: none;
  border-radius: 0 0 12px 12px;
}

.order-confirm-terms-scroll {
  height: 100%;
  max-height: 170px;
  overflow-y: auto;
  padding: 14px 14px 20px;
}

.order-confirm-terms-scroll::-webkit-scrollbar { width: 4px; }
.order-confirm-terms-scroll::-webkit-scrollbar-track { background: transparent; }
.order-confirm-terms-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }

.order-confirm-terms-block {
  font-size: 0.84rem;
  line-height: 1.6;
}

.terms-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  margin-bottom: 8px;
}

.terms-check-icon svg,
.terms-check-icon i { width: 16px; height: 16px; }

.terms-section-title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--text);
}

.order-confirm-terms-block ul {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--text-secondary);
}

.order-confirm-terms-block ul li {
  margin-bottom: 3px;
}

.terms-warning-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 0.8rem;
  line-height: 1.55;
}

.terms-warning-box strong {
  color: #f87171;
}

/* Coupon Section */
.order-confirm-coupon-block {
  margin: 10px 20px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.order-confirm-coupon-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 6px;
}

.order-confirm-coupon-header svg,
.order-confirm-coupon-header i { width: 15px; height: 15px; }

.order-confirm-coupon-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* Price Summary */
.order-confirm-price-block {
  margin: 10px 20px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.order-confirm-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 3px 0;
}

.order-confirm-price-row.total-row {
  border-top: 1px dashed rgba(255,255,255,0.08);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 0.95rem;
  color: var(--text);
}

.order-confirm-total {
  color: var(--brand) !important;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #3b82f6, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Accept Checkbox */
.order-confirm-accept-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 20px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  font-size: 0.83rem;
  color: var(--text-secondary);
  transition: border-color 200ms ease, background 200ms ease;
  flex-shrink: 0;
}

.order-confirm-accept-label:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
  color: var(--text);
}

.order-confirm-accept-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
}

.order-confirm-accept-label input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Action Buttons */
.order-confirm-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px 20px;
  flex-shrink: 0;
}

.order-confirm-actions .secondary-button {
  flex: 1;
  min-height: 44px;
  font-size: 0.9rem;
}

.order-confirm-actions .primary-button {
  flex: 2;
  min-height: 44px;
  font-size: 0.9rem;
  gap: 8px;
}

.order-confirm-actions .primary-button:disabled {
  background: rgba(30, 41, 59, 0.6);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: none;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE OVERHAUL — by Antigravity UX/UI Designer
   Breakpoints: 1024px · 768px · 560px · 420px
   ⚠ CSS-only changes. No HTML/JS/selectors modified.
   ══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   BREAKPOINT: 1024px — Tablet landscape
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .topbar {
    gap: 16px;
    padding: 10px 16px;
  }

  .main-nav {
    padding-left: 12px;
    gap: 8px;
  }

  .main-nav a {
    padding: 7px 10px;
    font-size: 0.84rem;
  }

  .hero {
    padding: 48px 20px 24px;
    min-height: 380px;
  }

  .catalog-section {
    padding: 28px 20px 36px;
  }

  .widget-zone {
    padding: 0 20px;
  }

  .olaf-steam-item {
    grid-template-columns: 130px minmax(0, 1fr) auto;
  }

  .olaf-steam-thumb {
    width: 130px;
    height: 58px;
  }

  .segmented {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .segmented::-webkit-scrollbar {
    display: none;
  }

  .segmented .tab-button {
    flex-shrink: 0;
  }
}

/* ─────────────────────────────────────────────
   BREAKPOINT: 768px — Tablet portrait / large phone
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  /* ── TOPBAR ── */
  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    min-height: auto;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .topbar-actions {
    order: 0;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .main-nav {
    order: 1;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: 0;
    padding-bottom: 2px;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex-shrink: 0;
    min-width: auto;
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  /* ── Register button: hide text on tablet ── */
  .register-button span {
    display: none;
  }

  .register-button {
    padding: 0 10px !important;
    min-width: 38px;
  }

  /* ── Account button: reduce ── */
  .account-button {
    padding: 0 10px;
  }

  .account-button span {
    display: none;
  }

  /* ── HERO ── */
  .hero {
    padding: 40px 14px 20px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 1.55rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 0.88rem;
    margin: 10px 0 18px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 8px;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }

  /* ── STATS ── */
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-strip article {
    min-height: 88px;
    padding: 14px 12px;
  }

  .stats-strip article:nth-child(2) {
    border-right: 0;
  }

  /* ── CATALOG ── */
  .catalog-section {
    padding: 20px 12px 32px;
  }

  .section-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-box {
    width: 100%;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .segmented {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .segmented::-webkit-scrollbar {
    display: none;
  }

  .stock-toggle {
    justify-content: flex-start;
  }

  /* ── GRIDS ── */
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .support-panel {
    grid-column: 1 / -1;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .review-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ── PRODUCT CARDS ── */
  .product-card h3 {
    min-height: 40px;
    font-size: 0.84rem;
  }

  .product-body {
    padding: 10px;
    gap: 8px;
  }

  .card-actions {
    gap: 6px;
  }

  .card-actions .primary-button,
  .card-actions .secondary-button {
    min-height: 36px;
    font-size: 0.8rem;
    padding: 0 8px;
  }

  /* ── CHECKOUT BAND ── */
  .checkout-band {
    flex-direction: column;
    margin: 0 12px 32px;
    padding: 18px;
    gap: 14px;
    align-items: stretch;
  }

  .checkout-band .primary-link {
    width: 100%;
    justify-content: center;
  }

  /* ── WIDGETS ── */
  .widget-zone {
    padding: 0 12px;
  }

  .steam-preview-zone {
    margin-bottom: 20px;
  }

  .olaf-widget-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .olaf-widget-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-left: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .olaf-widget-tab {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 13px;
    font-size: 0.80rem;
  }

  .olaf-widget-tabs::-webkit-scrollbar {
    display: none;
  }

  .olaf-trust-widget {
    grid-template-columns: 1fr;
  }

  .olaf-social-widget {
    grid-template-columns: 1fr;
  }

  .olaf-license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* ── PRODUCT DETAIL PAGE ── */
  .pd-layout {
    gap: 20px;
  }

  .pd-sidebar-body {
    padding: 16px;
  }

  .pd-price-main {
    font-size: 1.65rem;
  }

  .pd-buy-btn {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  /* ── RELATED PRODUCTS ── */
  .pd-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pd-related-section {
    padding: 16px 12px;
  }

  /* ── ORDERS ── */
  .orders-page {
    padding: 16px 10px 48px;
  }

  .orders-hero {
    padding: 20px;
  }

  .orders-hero h1 {
    font-size: 1.35rem;
  }

  .orders-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .clean-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .clean-timeline div {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .item-row {
    gap: 12px;
    padding: 12px;
  }

  .item-thumb {
    width: 48px;
    height: 48px;
  }

  /* ── DIALOGS ── */
  dialog {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .product-dialog {
    width: calc(100vw - 16px);
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .detail-media {
    min-height: 200px;
  }

  .payment-dialog {
    width: calc(100vw - 16px);
  }

  .payment-result {
    padding: 20px;
  }

  .payment-box {
    grid-template-columns: 1fr;
  }

  .qr-box {
    min-height: 200px;
    padding: 16px;
    margin-bottom: 16px;
  }

  .qr-box img {
    width: 180px;
    height: 180px;
  }

  .cart-dialog {
    width: calc(100vw - 16px);
    padding: 16px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cart-item {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px;
  }

  .cart-item img {
    width: 80px;
  }

  .dashboard-dialog {
    width: calc(100vw - 16px);
  }

  .member-dashboard {
    padding: 18px;
  }

  .dashboard-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .dashboard-hero .primary-button {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ── PREMIUM DIALOGS ── */
  .premium-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .premium-dialog-header {
    padding: 24px 20px 16px;
  }

  .premium-dialog-header h2 {
    font-size: 1.15rem;
  }

  .premium-checkout-form {
    padding: 18px;
    gap: 16px;
  }

  .premium-product-card {
    gap: 12px;
    padding: 12px;
  }

  .premium-product-thumb {
    width: 52px;
    height: 52px;
  }

  /* ── QR DIALOG ── */
  .qr-payment-content {
    padding: 18px;
  }

  .qr-image-frame {
    width: 190px;
    height: 190px;
    padding: 10px;
    margin-bottom: 18px;
  }

  .qr-order-details {
    padding: 14px;
    margin-bottom: 12px;
  }

  .qr-accounts-container {
    flex-direction: column;
    gap: 8px;
  }

  /* ── ORDER CONFIRM DIALOG ── */
  .order-confirm-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .order-confirm-header {
    padding: 16px 16px 12px;
  }

  .order-confirm-terms-wrap {
    margin: 10px 14px 0;
  }

  .order-confirm-coupon-block,
  .order-confirm-price-block {
    margin-left: 14px;
    margin-right: 14px;
  }

  .order-confirm-accept-label {
    margin-left: 14px;
    margin-right: 14px;
  }

  .order-confirm-actions {
    padding: 12px 14px 16px;
  }

  /* ── NOTIFICATION / USER POPOVER ── */
  .notification-popover {
    width: min(300px, calc(100vw - 24px));
    right: -40px;
  }

  .user-popover {
    width: min(300px, calc(100vw - 24px));
    right: -20px;
  }

  /* ── SEARCH IN TOPBAR ── */
  .topbar-search-form {
    width: 180px;
  }

  /* ── TOAST ── */
  #toast-container {
    right: 12px;
    bottom: 16px;
    max-width: calc(100vw - 24px);
    left: 12px;
  }

  /* ── AUTH LAYOUT (in-page dialogs) ── */
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-copy {
    min-height: 280px;
    padding: 20px;
  }

  .auth-forms {
    padding: 24px 18px;
  }

  /* ── REVIEW PROMPT ── */
  .review-prompt {
    grid-template-columns: 1fr;
  }

  /* ── MANUAL ORDER GRID ── */
  .manual-order-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ─────────────────────────────────────────────
   BREAKPOINT: 560px — Medium phone
   ───────────────────────────────────────────── */
@media (max-width: 560px) {
  /* ── TOPBAR ── */
  .topbar {
    padding: 8px 10px;
    gap: 6px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.85rem;
  }

  .brand {
    gap: 8px;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .topbar-actions {
    gap: 4px;
  }

  .icon-button,
  .dialog-close,
  .quantity-button {
    width: 36px;
    min-height: 36px;
  }

  .account-button {
    min-height: 36px;
    padding: 0 8px;
  }

  .register-button {
    min-height: 36px !important;
    padding: 0 8px !important;
  }

  .main-nav a {
    padding: 5px 8px;
    font-size: 0.78rem;
    min-width: auto;
  }

  /* ── HERO ── */
  .hero {
    padding: 32px 12px 16px;
  }

  .hero h1 {
    font-size: 1.35rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 0.84rem;
    margin: 8px 0 14px;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  .hero-deal {
    max-width: 100%;
  }

  .deal-card h2 {
    min-height: auto;
    font-size: 0.95rem;
  }

  /* ── STATS ── */
  .stats-strip article {
    min-height: 76px;
    padding: 12px 10px;
  }

  .stats-strip strong {
    font-size: 1.1rem;
  }

  .stats-strip span {
    font-size: 0.75rem;
  }

  /* ── CATALOG ── */
  .catalog-section {
    padding: 16px 10px 28px;
  }

  .section-heading h2 {
    font-size: 1.1rem;
  }

  .search-box {
    min-height: 38px;
  }

  /* ── SIDE PANEL ── */
  .side-panel {
    grid-template-columns: 1fr;
  }

  /* ── PRODUCT GRID ── */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-card {
    min-height: 160px;
  }

  .product-card h3 {
    min-height: 36px;
    font-size: 0.8rem;
    line-height: 1.25;
  }

  .product-body {
    padding: 8px;
    gap: 6px;
  }

  .product-meta .label-pill,
  .product-meta .stock-pill {
    font-size: 0.65rem;
    min-height: 20px;
    padding: 2px 6px;
  }

  .price {
    font-size: 1rem;
  }

  .compare-price {
    font-size: 0.75rem;
  }

  .tags {
    gap: 4px;
  }

  .tag {
    font-size: 0.62rem;
    padding: 1px 5px;
  }

  .card-actions {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card-actions .primary-button,
  .card-actions .secondary-button {
    min-height: 34px;
    font-size: 0.76rem;
  }

  .publisher {
    font-size: 0.72rem;
    min-height: 18px;
  }

  /* ── PAGINATION ── */
  .pagination-controls {
    margin-top: 20px;
    margin-bottom: 16px;
    justify-content: center;
  }

  /* ── PRODUCT DETAIL PAGE ── */
  #product-page {
    padding: 0 10px 48px;
  }

  .pd-layout {
    gap: 16px;
  }

  .pd-hero-img {
    border-radius: 12px;
  }

  .pd-screenshots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .pd-sidebar-card {
    border-radius: 12px;
  }

  .pd-sidebar-body {
    padding: 14px;
  }

  .pd-sidebar-title {
    font-size: 1.1rem;
  }

  .pd-price-main {
    font-size: 1.5rem;
  }

  .pd-package-option {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .pd-package-meta {
    grid-column: 2;
    justify-items: start;
    grid-auto-flow: column;
    align-items: center;
    justify-content: start;
    min-width: 0;
  }

  .pd-features-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pd-platform-links {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .pd-section {
    padding: 24px 0;
  }

  .pd-section-title {
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .pd-sysreq-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pd-sysreq-panel {
    padding: 16px;
  }

  .pd-info-card {
    padding: 16px;
  }

  /* ── RELATED ── */
  .pd-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pd-related-name {
    font-size: 0.75rem;
    min-height: 2.3em;
  }

  /* ── ORDERS ── */
  .orders-page {
    padding: 12px 8px 40px;
  }

  .orders-hero {
    padding: 16px;
  }

  .orders-hero h1 {
    font-size: 1.2rem;
  }

  .orders-hero p {
    font-size: 0.84rem;
  }

  .clean-timeline {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .clean-timeline div {
    padding: 10px;
    font-size: 0.82rem;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
  }

  .order-header-main {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  .item-row {
    gap: 10px;
    padding: 10px;
  }

  .item-thumb {
    width: 44px;
    height: 44px;
  }

  .order-payment-grid {
    grid-template-columns: 1fr;
  }

  .payment-slip-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .order-review-form .form-row {
    grid-template-columns: 1fr;
  }

  /* ── DIALOGS ── */
  dialog {
    max-width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 14px;
  }

  .dialog-close {
    top: 8px;
    right: 8px;
  }

  .product-dialog {
    width: calc(100vw - 12px);
  }

  .detail-body {
    padding: 18px;
  }

  .detail-body h2 {
    font-size: 1.2rem;
  }

  .payment-dialog {
    width: calc(100vw - 12px);
  }

  .payment-result {
    padding: 16px;
  }

  .payment-head h2 {
    font-size: 1.15rem;
  }

  .qr-box {
    min-height: 180px;
    padding: 12px;
    border-radius: 14px;
  }

  .qr-box img {
    width: 160px;
    height: 160px;
  }

  .qr-amount-badge {
    font-size: 1rem;
    padding: 4px 14px;
  }

  .cart-dialog {
    width: calc(100vw - 12px);
    padding: 14px;
  }

  .cart-header h2 {
    font-size: 1.1rem;
  }

  .cart-item {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .cart-item img {
    width: 70px;
  }

  .cart-item h3 {
    font-size: 0.88rem;
  }

  .cart-item p {
    font-size: 0.8rem;
  }

  .checkout-form {
    padding: 14px;
    gap: 12px;
  }

  /* ── PREMIUM DIALOG ── */
  .premium-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .premium-dialog-header {
    padding: 20px 16px 14px;
  }

  .premium-dialog-header h2 {
    font-size: 1.1rem;
  }

  .premium-dialog-header p {
    font-size: 0.82rem;
  }

  .premium-icon-box {
    width: 48px;
    height: 48px;
  }

  .premium-icon-box svg {
    width: 24px;
    height: 24px;
  }

  .premium-checkout-form {
    padding: 16px;
    gap: 14px;
  }

  .premium-product-card {
    padding: 10px;
    gap: 10px;
  }

  .premium-product-thumb {
    width: 48px;
    height: 48px;
  }

  .premium-product-info h3 {
    font-size: 0.9rem;
  }

  .premium-payment-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .premium-payment-card {
    padding: 12px;
  }

  .submit-order-btn {
    height: 46px;
    font-size: 0.95rem;
  }

  .premium-actions {
    padding: 0 16px 16px;
    gap: 10px;
  }

  /* ── QR PAYMENT DIALOG ── */
  .qr-payment-content {
    padding: 14px;
  }

  .qr-method-badge {
    font-size: 0.78rem;
    padding: 5px 12px;
    margin-bottom: 16px;
  }

  .qr-image-frame {
    width: 170px;
    height: 170px;
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 16px;
  }

  .qr-order-details {
    padding: 12px;
    border-radius: 10px;
  }

  .qr-detail-row {
    font-size: 0.82rem;
    margin-bottom: 10px;
  }

  .qr-total-highlight {
    font-size: 1.2rem;
  }

  .qr-accounts-container {
    flex-direction: column;
    gap: 6px;
  }

  .qr-account-box {
    padding: 10px;
  }

  .qr-note-alert {
    font-size: 0.78rem;
    padding: 6px 10px;
  }

  .qr-status-badge {
    font-size: 0.78rem;
    padding: 5px 12px;
  }

  /* ── ORDER CONFIRM ── */
  .order-confirm-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .order-confirm-title {
    font-size: 0.98rem;
  }

  .order-confirm-header {
    padding: 14px 14px 10px;
  }

  .order-confirm-terms-wrap {
    margin: 8px 12px 0;
  }

  .order-confirm-coupon-block,
  .order-confirm-price-block {
    margin-left: 12px;
    margin-right: 12px;
    padding: 10px 12px;
  }

  .order-confirm-accept-label {
    margin: 10px 12px 0;
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .order-confirm-actions {
    padding: 10px 12px 14px;
    gap: 8px;
  }

  .order-confirm-actions .secondary-button,
  .order-confirm-actions .primary-button {
    min-height: 42px;
    font-size: 0.84rem;
  }

  /* ── NOTIFICATION / USER POPOVER ── */
  .notification-popover {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
    animation: slideUpSheet 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .user-popover {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    animation: slideUpSheet 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow-y: auto;
  }

  /* ── SEARCH SUGGESTIONS ── */
  .search-suggestions {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
    animation: slideUpSheet 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  /* ── TOPBAR SEARCH ── */
  .topbar-search-form {
    width: 160px;
  }

  /* ── CONTACT DIALOG ── */
  .contact-dialog {
    width: calc(100vw - 16px);
  }

  .contact-dialog-body {
    padding: 22px 18px;
  }

  .contact-dialog-body h2 {
    font-size: 1.15rem;
  }

  /* ── LANGUAGE POPOVER ── */
  .language-popover {
    width: 160px;
  }

  /* ── MEMBER DASHBOARD ── */
  .member-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 1.3rem;
  }

  /* ── DETAIL FEATURE GRID ── */
  .detail-feature-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product-fact-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* ── RECOMMENDED ── */
  .recommended-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .recommended-card strong {
    font-size: 0.88rem;
    min-height: 2.2em;
  }

  /* ── SYSTEM REQ ── */
  .system-req-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────
   BREAKPOINT: 420px — Small phone
   ───────────────────────────────────────────── */
@media (max-width: 420px) {
  /* ── TOPBAR ── */
  .topbar {
    padding: 6px 8px;
    gap: 4px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .brand {
    gap: 6px;
  }

  .topbar-actions {
    gap: 3px;
  }

  .icon-button,
  .dialog-close,
  .quantity-button {
    width: 34px;
    min-height: 34px;
  }

  .account-button {
    min-height: 34px;
  }

  .register-button {
    min-height: 34px !important;
  }

  .main-nav a {
    padding: 5px 7px;
    font-size: 0.74rem;
  }

  /* ── HERO ── */
  .hero {
    padding: 28px 10px 14px;
  }

  .hero h1 {
    font-size: 1.2rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 0.8rem;
    margin: 6px 0 12px;
  }

  .eyebrow {
    font-size: 0.64rem;
    margin-bottom: 6px;
  }

  /* ── STATS ── */
  .stats-strip article {
    min-height: 68px;
    padding: 10px 8px;
  }

  .stats-strip strong {
    font-size: 0.98rem;
  }

  .stats-strip span {
    font-size: 0.7rem;
  }

  /* ── PRODUCT GRID — 1 column for readability ── */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-card {
    grid-template-rows: auto 1fr;
  }

  .product-image {
    aspect-ratio: 16 / 7;
  }

  .product-card h3 {
    min-height: auto;
    font-size: 0.88rem;
  }

  .product-body {
    padding: 10px;
    gap: 8px;
  }

  .card-actions {
    grid-template-columns: 1fr 1fr;
  }

  .card-actions .primary-button,
  .card-actions .secondary-button {
    min-height: 38px;
    font-size: 0.82rem;
  }

  .price {
    font-size: 1.1rem;
  }

  .publisher {
    font-size: 0.76rem;
  }

  /* ── CATALOG ── */
  .catalog-section {
    padding: 14px 8px 24px;
  }

  .section-heading h2 {
    font-size: 1rem;
  }

  /* ── FEATURED ── */
  .featured-grid {
    gap: 8px;
  }

  .feature-card {
    min-height: 140px;
  }

  .feature-body h3 {
    font-size: 0.92rem;
    margin: 6px 0 8px;
  }

  /* ── CHECKOUT BAND ── */
  .checkout-band {
    margin: 0 8px 24px;
    padding: 14px;
  }

  .checkout-band h2 {
    font-size: 1rem;
  }

  /* ── PRODUCT DETAIL ── */
  #product-page {
    padding: 0 8px 40px;
  }

  .pd-breadcrumb {
    margin: 14px 0 12px;
    font-size: 0.78rem;
  }

  .pd-hero-img {
    border-radius: 10px;
  }

  .pd-screenshots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .pd-gallery-label {
    font-size: 0.82rem;
    margin: 14px 0 10px;
  }

  .pd-sidebar-card {
    border-radius: 10px;
  }

  .pd-sidebar-body {
    padding: 12px;
  }

  .pd-sidebar-title {
    font-size: 1rem;
  }

  .pd-price-main {
    font-size: 1.35rem;
  }

  .pd-package-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pd-package-meta {
    grid-auto-flow: row;
  }

  .pd-package-option {
    min-height: 66px;
    padding: 9px;
  }

  .pd-buy-btn {
    padding: 11px 14px;
    font-size: 0.9rem;
    border-radius: 8px;
    margin-bottom: 12px;
  }

  .pd-feature-item {
    padding: 8px;
    gap: 6px;
  }

  .pd-feature-icon {
    width: 28px;
    height: 28px;
  }

  .pd-feature-text strong {
    font-size: 0.7rem;
  }

  .pd-feature-text span {
    font-size: 0.6rem;
  }

  .pd-platform-links {
    gap: 6px;
  }

  .pd-platform-link {
    padding: 8px;
    font-size: 0.74rem;
  }

  .pd-section {
    padding: 18px 0;
  }

  .pd-section-title {
    font-size: 0.92rem;
    margin-bottom: 12px;
  }

  .pd-description {
    font-size: 0.85rem;
  }

  .pd-info-row {
    font-size: 0.82rem;
    padding: 10px 0;
  }

  /* ── RELATED ── */
  .pd-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .pd-related-body {
    padding: 8px 10px;
  }

  .pd-related-name {
    font-size: 0.72rem;
  }

  .pd-related-price {
    font-size: 0.8rem;
  }

  /* ── ORDERS ── */
  .orders-page {
    padding: 10px 6px 36px;
  }

  .orders-hero {
    padding: 14px;
  }

  .orders-hero h1 {
    font-size: 1.08rem;
  }

  .order-list-item {
    padding: 10px;
    gap: 8px;
  }

  .order-thumb {
    width: 38px;
    height: 38px;
  }

  .clean-summary div {
    font-size: 0.84rem;
    padding: 6px 0;
  }

  .total-price {
    font-size: 1.1rem;
  }

  .delivery-note {
    padding: 14px;
  }

  .pre-wrap {
    font-size: 0.85rem;
    padding: 10px;
  }

  /* ── DIALOGS ── */
  dialog {
    max-width: calc(100vw - 8px);
    border-radius: 12px;
  }

  .payment-result {
    padding: 14px;
  }

  .payment-head h2 {
    font-size: 1.05rem;
  }

  .qr-box {
    min-height: 160px;
    padding: 10px;
    border-radius: 12px;
  }

  .qr-box img {
    width: 140px;
    height: 140px;
  }

  .qr-amount-badge {
    font-size: 0.88rem;
    padding: 3px 12px;
    bottom: 10px;
  }

  .payment-success-icon {
    width: 56px;
    height: 56px;
  }

  .payment-success-icon svg {
    width: 28px;
    height: 28px;
  }

  .copy-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .copy-row code {
    font-size: 0.8rem;
    padding: 8px;
  }

  .payment-steps {
    padding: 10px;
  }

  .payment-step {
    font-size: 0.8rem;
    gap: 8px;
  }

  /* ── CART ── */
  .cart-dialog {
    padding: 12px;
  }

  .cart-header {
    margin-bottom: 14px;
  }

  .cart-header h2 {
    font-size: 1rem;
  }

  .cart-item {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .cart-item img {
    width: 60px;
  }

  .cart-item h3 {
    font-size: 0.84rem;
  }

  .checkout-form {
    padding: 12px;
    gap: 10px;
  }

  .checkout-form label {
    font-size: 0.82rem;
  }

  .checkout-form input,
  .checkout-form select {
    min-height: 40px;
  }

  .order-summary .total-line {
    font-size: 1rem;
  }

  /* ── PREMIUM DIALOG ── */
  .premium-dialog {
    width: calc(100vw - 10px);
    border-radius: 14px;
  }

  .premium-dialog-header {
    padding: 18px 14px 12px;
  }

  .premium-dialog-header h2 {
    font-size: 1rem;
  }

  .premium-checkout-form {
    padding: 14px;
    gap: 12px;
  }

  .premium-summary-card {
    padding: 12px;
  }

  .premium-summary-row {
    font-size: 0.82rem;
  }

  .premium-total-price {
    font-size: 1.1rem;
  }

  .premium-actions {
    padding: 0 14px 14px;
  }

  .submit-order-btn {
    height: 44px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  /* ── QR DIALOG ── */
  .qr-image-frame {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    margin-bottom: 14px;
  }

  .qr-detail-row {
    font-size: 0.78rem;
  }

  .qr-total-highlight {
    font-size: 1.1rem;
  }

  .qr-account-box .acc-number {
    font-size: 0.92rem;
  }

  /* ── ORDER CONFIRM ── */
  .order-confirm-dialog {
    width: calc(100vw - 10px);
    border-radius: 12px;
  }

  .order-confirm-terms-scroll {
    max-height: 140px;
    padding: 10px 10px 16px;
  }

  .order-confirm-terms-block {
    font-size: 0.78rem;
  }

  /* ── CONTACT ── */
  .contact-dialog {
    width: calc(100vw - 10px);
  }

  .contact-dialog-body {
    padding: 18px 14px;
  }

  .contact-link-card {
    padding: 12px;
    gap: 10px;
  }

  .contact-link-icon {
    width: 38px;
    height: 38px;
  }

  .contact-link-card strong {
    font-size: 0.88rem;
  }

  /* ── MEMBER DASHBOARD ── */
  .member-dashboard {
    padding: 14px;
  }

  .member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.1rem;
  }

  .dashboard-hero {
    gap: 10px;
    padding: 14px;
  }

  .dashboard-panel {
    padding: 14px;
  }

  /* ── LICENSE GRID ── */
  .olaf-license-grid {
    grid-template-columns: 1fr;
  }

  /* ── TOAST ── */
  #toast-container {
    right: 8px;
    left: 8px;
    bottom: 12px;
  }

  .toast {
    padding: 10px 14px;
    font-size: 0.82rem;
    border-radius: 10px;
  }
}

/* ── Bottom sheet slide-up animation for mobile popovers ── */
@keyframes slideUpSheet {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Ensure tap targets are large enough on touch devices ── */
@media (pointer: coarse) {
  .icon-button,
  .account-button,
  .cart-button,
  .primary-button,
  .primary-link,
  .secondary-button,
  .mini-button,
  .quantity-button,
  .dialog-close,
  .tab-button,
  .platform-link,
  .order-list-item,
  .pd-buy-btn,
  .pd-platform-link,
  .pd-thumb,
  .screenshot-thumb,
  .contact-link-card,
  .pd-qty-control button,
  .pay-tab,
  .hold-reveal-btn,
  .submit-order-btn,
  .cancel-order-btn,
  .text-button {
    min-height: 44px;
  }

  .icon-button,
  .dialog-close,
  .quantity-button {
    min-width: 44px;
    width: auto;
  }

  .main-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .checkout-form input,
  .checkout-form select,
  .checkout-form textarea,
  .admin-form input,
  .admin-form select {
    min-height: 46px;
  }

  .pd-qty-control button {
    padding: 8px 14px;
  }

  .stock-toggle input {
    width: 22px;
    height: 22px;
  }
}

/* ── Site Footer ── */
.site-footer {
  background-color: #030816;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 40px 30px;
  color: #94a3b8;
  font-family: 'Kanit', sans-serif;
  margin-top: auto;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-brand .brand-mark {
  background: var(--brand);
  color: white;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
}

.footer-brand .brand-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 400px;
  opacity: 0.8;
}

.footer-links h4,
.footer-payments h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  margin-top: 0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.payment-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  opacity: 0.7;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom-links a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 30px 16px 16px !important;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px !important;
    padding-bottom: 16px !important;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
  }
  
  .footer-brand .brand {
    display: none !important;
  }
}

/* ── Fix potential horizontal overflow everywhere ── */
html, body {
  overflow-x: clip;
}

.app-shell {
  overflow-x: clip;
}

/* ── Mobile UI/UX Overrides (Max Width 768px) ── */
@media (max-width: 768px) {
  /* 1. Remove Top Navigation Menu */
  .main-nav {
    display: none !important;
  }

  /* 2. Full-screen/Bottom-sheet Dialogs (Login, Register, Payment, Search) */
  dialog.auth-dialog,
  dialog.premium-dialog,
  dialog.payment-dialog,
  dialog.search-dialog,
  dialog.dashboard-dialog,
  dialog.contact-dialog,
  dialog.cart-dialog,
  dialog.order-confirm-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: auto 0 0 0 !important;
    border-radius: 24px 24px 0 0 !important;
    border: none !important;
    border-top: 1px solid var(--border) !important;
    box-sizing: border-box !important;
    max-height: 90vh !important;
    animation: slideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .dialog-content,
  .premium-dialog-inner,
  .auth-form-container,
  .payment-box {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
  }

  /* Ensure backdrops look correct */
  dialog::backdrop {
    background: rgba(2, 6, 23, 0.85) !important;
    backdrop-filter: blur(4px);
  }

  /* 3. Product Details - Combine Hero & Gallery Images */
  /* User wants the top cover image and gallery to combine, so we hide the sidebar cover image 
     and rely on the pd-hero-img (gallery image) as the primary visual */
  .pd-sidebar-cover {
    display: none !important;
  }
  
  /* Make sure the main layout is flush */
  .pd-layout {
    margin-top: 0 !important;
  }

  /* Make gallery main image bigger on mobile */
  .pd-hero-img {
    border-radius: var(--radius) !important;
    margin-bottom: 16px !important;
  }

  /* 4. Hide Store Name in details icon header */
  /* The brand text in the topbar */
  .brand .brand-text,
  .brand span:not(.brand-mark) {
    display: none !important;
  }
  
  .brand {
    gap: 0 !important;
  }

  .brand .brand-mark {
    margin: 0 !important;
  }

  /* 5. Fix Popovers for Mobile */
  .user-popover-wrap .user-popover,
  .notifications-popover {
    position: fixed !important;
    top: 60px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    transform-origin: top center !important;
  }

  /* 6. Fix Payment & QR Dialog Layout */
  .payment-result {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding: 16px !important;
  }

  .payment-box {
    grid-template-columns: 1fr !important;
    overflow-y: visible !important;
    gap: 16px !important;
    padding: 12px !important;
  }

  .qr-box {
    min-height: auto !important;
    padding: 12px !important;
  }

  .qr-box img {
    width: 200px !important;
    height: 200px !important;
  }
}

/* MOBILE MODAL / PAYMENT POPUP FIXES
   Keep mobile popups inside the real viewport without changing desktop layout. */
@media (max-width: 768px) {
  :root {
    --mobile-modal-gap: 12px;
    --mobile-modal-max-block: calc(100dvh - 24px);
    --mobile-modal-bottom-safe: env(safe-area-inset-bottom, 0px);
  }

  @supports not (height: 100dvh) {
    :root {
      --mobile-modal-max-block: calc(100vh - 24px);
    }
  }

  dialog.auth-dialog,
  dialog.dashboard-dialog,
  dialog.product-dialog,
  dialog.cart-dialog,
  dialog.payment-dialog,
  dialog.contact-dialog,
  dialog.premium-dialog,
  dialog.checkout-order-dialog,
  dialog.qr-payment-dialog,
  dialog.order-confirm-dialog {
    position: fixed !important;
    inset: var(--mobile-modal-gap) !important;
    width: min(100%, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: var(--mobile-modal-max-block) !important;
    margin: auto !important;
    border-radius: 16px !important;
    overflow: hidden auto !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    animation: none !important;
    transform: none !important;
  }

  dialog.premium-dialog[open],
  dialog.order-confirm-dialog[open] {
    display: flex !important;
    flex-direction: column;
  }

  .premium-dialog-inner,
  .order-confirm-inner,
  .payment-result,
  .cart-dialog,
  .dashboard-dialog,
  .product-dialog,
  .contact-dialog {
    max-height: var(--mobile-modal-max-block) !important;
    min-height: 0;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .premium-dialog-inner,
  .order-confirm-inner {
    width: 100%;
    height: auto !important;
    flex: 1 1 auto;
  }

  .premium-dialog-header,
  .order-confirm-header,
  .cart-header {
    flex-shrink: 0;
  }

  .premium-checkout-form,
  .qr-payment-content,
  .payment-result,
  .cart-layout,
  .contact-dialog-body {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .order-confirm-terms-wrap {
    min-height: 112px;
    max-height: clamp(128px, 32dvh, 240px);
    overflow: hidden;
  }

  .order-confirm-terms-scroll {
    max-height: none !important;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .premium-actions,
  .order-confirm-actions,
  .dialog-actions,
  .filter-popover-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.98) 72%, rgba(2, 6, 23, 0));
    padding-bottom: calc(14px + var(--mobile-modal-bottom-safe)) !important;
  }

  .premium-actions button,
  .order-confirm-actions button,
  .dialog-actions button,
  .filter-popover-actions button,
  .payment-slip-form button,
  .payment-slip-picker {
    width: 100%;
    min-height: 44px;
  }

  .qr-image-frame {
    width: min(260px, 70vw) !important;
    height: min(260px, 70vw) !important;
    max-width: 100%;
    flex: 0 0 auto;
    margin-inline: auto;
  }

  .qr-image-frame img,
  .qr-box img,
  .order-payment-qr-card img {
    width: 100% !important;
    max-width: min(240px, 68vw) !important;
    height: auto !important;
    max-height: min(240px, 68vw) !important;
    object-fit: contain;
    margin-inline: auto;
  }

  .qr-order-details,
  .qr-store-note,
  .qr-manual-transfer,
  .payment-slip-preview,
  .payment-slip-preview img,
  .order-payment-block,
  .order-slip-block {
    max-width: 100%;
    box-sizing: border-box;
  }

  .payment-slip-preview img {
    max-height: 42dvh;
    object-fit: contain;
  }

  .notification-popover,
  .user-popover,
  .language-popover,
  .filter-popover,
  .search-suggestions {
    position: fixed !important;
    top: calc(58px + env(safe-area-inset-top, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 76px - env(safe-area-inset-top, 0px)) !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    z-index: 1200 !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    animation: none !important;
    transform: none !important;
  }

  .notification-body {
    max-height: calc(100dvh - 164px) !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cart-dialog .checkout-form {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cart-dialog #submit-order {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 6;
    width: 100%;
    box-shadow: 0 -10px 24px rgba(2, 6, 23, 0.32), 0 10px 28px rgba(59, 130, 246, 0.28);
  }

  .topbar-search-wrap,
  .filter-dropdown-wrap,
  .language-switcher,
  .notification-wrap,
  .user-popover-wrap {
    min-width: 0;
  }
}

/* TABLET / iPAD MODAL STABILITY
   Covers iPad/tablet viewports that sit between the mobile and desktop rules. */
@media (min-width: 768px) and (max-width: 1180px) and (min-height: 700px),
       (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) and (min-height: 700px) {
  :root {
    --tablet-modal-gap: 24px;
    --tablet-modal-max-block: calc(100dvh - 48px);
    --tablet-modal-bottom-safe: env(safe-area-inset-bottom, 0px);
    --tablet-modal-width: min(720px, calc(100vw - 48px));
  }

  @supports not (height: 100dvh) {
    :root {
      --tablet-modal-max-block: calc(100vh - 48px);
    }
  }

  dialog.auth-dialog,
  dialog.dashboard-dialog,
  dialog.product-dialog,
  dialog.cart-dialog,
  dialog.payment-dialog,
  dialog.contact-dialog,
  dialog.premium-dialog,
  dialog.checkout-order-dialog,
  dialog.qr-payment-dialog,
  dialog.order-confirm-dialog {
    position: fixed !important;
    inset: var(--tablet-modal-gap) !important;
    width: var(--tablet-modal-width) !important;
    max-width: calc(100vw - 48px) !important;
    max-height: var(--tablet-modal-max-block) !important;
    margin: auto !important;
    border-radius: 18px !important;
    box-sizing: border-box;
    overflow: hidden auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  dialog.premium-dialog[open],
  dialog.order-confirm-dialog[open] {
    display: flex !important;
    flex-direction: column;
  }

  .premium-dialog-inner,
  .order-confirm-inner,
  .payment-result,
  .cart-dialog,
  .dashboard-dialog,
  .product-dialog,
  .contact-dialog {
    max-height: var(--tablet-modal-max-block) !important;
    min-height: 0;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .premium-dialog-inner,
  .order-confirm-inner {
    width: 100%;
    height: auto !important;
    flex: 1 1 auto;
  }

  .premium-dialog-header,
  .order-confirm-header,
  .cart-header {
    flex-shrink: 0;
  }

  .premium-dialog-header {
    padding: 24px 24px 16px;
  }

  .premium-checkout-form,
  .qr-payment-content,
  .payment-result,
  .cart-layout,
  .contact-dialog-body {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .premium-checkout-form,
  .qr-payment-content {
    padding-inline: 24px;
  }

  .qr-payment-content {
    padding-top: 20px;
  }

  .payment-box {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    max-width: 100%;
    box-sizing: border-box;
  }

  .qr-image-frame {
    width: min(320px, 42vw) !important;
    height: min(320px, 42vw) !important;
    max-width: 100%;
    flex: 0 0 auto;
    margin-inline: auto;
    margin-bottom: 20px;
  }

  .qr-image-frame img,
  .qr-box img,
  .order-payment-qr-card img {
    width: 100% !important;
    max-width: min(300px, 40vw) !important;
    height: auto !important;
    max-height: min(300px, 40vw) !important;
    object-fit: contain;
    margin-inline: auto;
  }

  .qr-order-details,
  .qr-store-note,
  .qr-manual-transfer,
  .payment-slip-preview,
  .payment-slip-preview img,
  .order-payment-block,
  .order-slip-block {
    max-width: 100%;
    box-sizing: border-box;
  }

  .order-confirm-terms-wrap {
    min-height: 144px;
    max-height: clamp(170px, 30dvh, 270px);
  }

  .order-confirm-terms-scroll {
    max-height: none !important;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .premium-actions,
  .order-confirm-actions,
  .dialog-actions,
  .filter-popover-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.98) 72%, rgba(2, 6, 23, 0));
    padding-bottom: calc(14px + var(--tablet-modal-bottom-safe)) !important;
  }

  .premium-actions button,
  .order-confirm-actions button,
  .dialog-actions button,
  .filter-popover-actions button,
  .payment-slip-form button,
  .payment-slip-picker {
    min-height: 44px;
  }

  .order-confirm-actions {
    align-items: center;
    flex-direction: row;
    padding: 12px 20px calc(16px + var(--tablet-modal-bottom-safe));
  }

  .order-confirm-actions .secondary-button {
    flex: 0 0 140px;
  }

  .order-confirm-actions .primary-button {
    flex: 1 1 auto;
  }

  .order-confirm-actions .primary-button,
  .order-confirm-actions .secondary-button {
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .checkout-order-dialog .premium-actions,
  .qr-payment-dialog .premium-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .checkout-order-dialog .premium-actions button,
  .qr-payment-dialog .premium-actions button {
    flex: 0 0 auto;
    width: 100%;
  }

  .checkout-order-dialog .submit-order-btn,
  .qr-payment-dialog .submit-order-btn {
    height: 46px;
    min-height: 46px;
    padding: 0 16px;
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .checkout-order-dialog .cancel-order-btn,
  .qr-payment-dialog .cancel-order-btn,
  .qr-payment-dialog .text-button {
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .qr-payment-dialog .text-button {
    margin-top: 0 !important;
  }

  .qr-payment-dialog .premium-actions {
    padding-inline: 24px !important;
    padding-bottom: calc(18px + var(--tablet-modal-bottom-safe)) !important;
  }

  .notification-popover,
  .user-popover,
  .language-popover,
  .filter-popover {
    position: fixed !important;
    top: calc(64px + env(safe-area-inset-top, 0px)) !important;
    left: auto !important;
    right: 24px !important;
    bottom: auto !important;
    width: min(420px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px)) !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    z-index: 1200 !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .search-suggestions {
    position: fixed !important;
    top: calc(64px + env(safe-area-inset-top, 0px)) !important;
    left: 24px !important;
    right: 24px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px)) !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    z-index: 1200 !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .notification-body {
    max-height: calc(100dvh - 184px) !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .toast-container,
  #toast-container {
    left: 24px;
    right: 24px;
    width: auto;
    max-width: none;
  }
}

@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait) and (min-height: 700px) {
  .qr-image-frame {
    width: min(300px, 56vw) !important;
    height: min(300px, 56vw) !important;
  }

  .qr-image-frame img,
  .qr-box img,
  .order-payment-qr-card img {
    max-width: min(280px, 54vw) !important;
    max-height: min(280px, 54vw) !important;
  }
}

@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) and (min-height: 700px) {
  :root {
    --tablet-modal-width: min(700px, calc(100vw - 56px));
  }

  .qr-image-frame {
    width: min(280px, 34vw) !important;
    height: min(280px, 34vw) !important;
  }

  .qr-image-frame img,
  .qr-box img,
  .order-payment-qr-card img {
    max-width: min(260px, 32vw) !important;
    max-height: min(260px, 32vw) !important;
  }

  .premium-dialog-header {
    padding-top: 20px;
  }

  .qr-payment-content {
    padding-top: 18px;
  }
}

@media (max-width: 560px) {
  .order-confirm-actions .secondary-button,
  .order-confirm-actions .primary-button,
  .premium-actions .primary-button,
  .premium-actions .secondary-button,
  .premium-actions .text-button {
    min-height: 46px;
    white-space: normal;
  }

  .qr-detail-row,
  .premium-summary-row,
  .order-confirm-price-row {
    gap: 12px;
    align-items: flex-start;
  }

  .qr-detail-row strong,
  .premium-summary-row strong,
  .order-confirm-price-row strong,
  .order-confirm-price-row span {
    overflow-wrap: anywhere;
    text-align: right;
  }
}

@media (max-width: 420px) {
  dialog.auth-dialog,
  dialog.dashboard-dialog,
  dialog.product-dialog,
  dialog.cart-dialog,
  dialog.payment-dialog,
  dialog.contact-dialog,
  dialog.premium-dialog,
  dialog.checkout-order-dialog,
  dialog.qr-payment-dialog,
  dialog.order-confirm-dialog {
    inset: 8px !important;
    width: min(100%, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 14px !important;
  }

  .qr-image-frame {
    width: min(240px, 68vw) !important;
    height: min(240px, 68vw) !important;
  }

  .notification-popover,
  .user-popover,
  .language-popover,
  .filter-popover,
  .search-suggestions {
    left: 8px !important;
    right: 8px !important;
    top: calc(54px + env(safe-area-inset-top, 0px)) !important;
    max-height: calc(100dvh - 66px - env(safe-area-inset-top, 0px)) !important;
    border-radius: 14px !important;
  }
}

/* PAGE-SPECIFIC MOBILE BRAND / RELATED PRODUCT TUNING */
@media (max-width: 768px) {
  .site-footer .footer-brand .brand {
    display: inline-flex !important;
    gap: 12px !important;
  }

  .site-footer .footer-brand .brand-mark {
    display: grid !important;
    margin: 0 !important;
  }

  body.home-page .topbar .brand {
    gap: 10px !important;
  }

  body.home-page .topbar .brand > span:not(.brand-mark),
  body.home-page .site-footer .footer-brand .brand-text {
    display: block !important;
  }

  body.product-detail-page .topbar .brand {
    gap: 0 !important;
  }

  body.product-detail-page .topbar .brand > span:not(.brand-mark),
  body.product-detail-page .topbar .brand .brand-text {
    display: none !important;
  }

  body.product-detail-page .site-footer .footer-brand .brand {
    display: inline-flex !important;
    align-items: center;
    gap: 12px !important;
  }

  body.product-detail-page .site-footer .footer-brand .brand-text {
    display: block !important;
  }

  body.product-detail-page .pd-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  body.product-detail-page .pd-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* LIVE PURCHASES + VIDEO RECOMMENDATIONS */
.live-store-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  padding: 0 24px 28px;
}

.recent-purchases-card,
.video-showcase-card {
  min-width: 0;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.42)),
    rgba(15, 23, 42, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 46px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
}

.recent-purchases-card,
.video-showcase-card {
  padding: 18px;
}

.live-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.live-card-head h2 {
  margin: 0;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.live-status-pill {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: #7dd3fc;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.recent-purchase-list {
  display: grid;
  gap: 8px;
  max-height: 386px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) transparent;
}

.recent-purchase-list::-webkit-scrollbar {
  width: 6px;
}

.recent-purchase-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.recent-purchase-list::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 10px;
}

.recent-purchase-list::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

.recent-purchase-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.26);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recent-purchase-row:hover {
  background: rgba(30, 58, 138, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.4);
}

.recent-purchase-thumb,
.recent-purchase-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.recent-purchase-thumb {
  object-fit: cover;
}

.recent-purchase-icon {
  display: grid;
  place-items: center;
  color: #93c5fd;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(14, 165, 233, 0.10)),
    rgba(15, 23, 42, 0.62);
}

.recent-purchase-main {
  min-width: 0;
}

.recent-purchase-main strong,
.recent-purchase-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-purchase-main strong {
  color: var(--text);
  font-size: 0.88rem;
}

.recent-purchase-main small {
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.recent-purchase-row time {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 86px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.recent-purchase-row time b {
  color: #bfdbfe;
  font-size: 0.78rem;
}

.recent-purchase-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  color: var(--text-secondary);
}

.recent-purchase-row.is-loading .recent-purchase-icon,
.recent-purchase-row.is-loading b,
.recent-purchase-row.is-loading small,
.recent-purchase-row.is-loading time {
  color: transparent;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.58), rgba(51, 65, 85, 0.78), rgba(30, 41, 59, 0.58));
  background-size: 220% 100%;
  animation: livePulse 1.3s ease-in-out infinite;
}

.recent-purchase-row.is-loading b,
.recent-purchase-row.is-loading small,
.recent-purchase-row.is-loading time {
  display: block;
  height: 12px;
  border-radius: 999px;
}

.recent-purchase-row.is-loading b {
  width: min(210px, 58vw);
}

.recent-purchase-row.is-loading small {
  width: min(150px, 46vw);
  margin-top: 8px;
}

@keyframes livePulse {
  0% { background-position: 100% 0; }
  100% { background-position: -120% 0; }
}

.promo-video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, 0.55fr);
  gap: 14px;
  align-items: stretch;
}

.promo-video-player {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66)),
    radial-gradient(circle at 78% 22%, rgba(59, 130, 246, 0.20), transparent 36%);
}

.promo-video-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.promo-video-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.promo-video-overlay span,
.promo-video-overlay strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.promo-video-overlay span {
  gap: 7px;
  padding: 5px 10px;
  color: #dbeafe;
  font-size: 0.78rem;
}

.promo-video-overlay strong {
  padding: 5px 12px;
  color: #fff;
  font-size: 0.86rem;
}

.promo-video-status {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: #bfdbfe;
  font-size: 0.76rem;
  text-align: center;
  pointer-events: none;
}

.promo-video-playlist {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.promo-video-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.28);
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.promo-video-item:hover,
.promo-video-item.is-active {
  border-color: rgba(96, 165, 250, 0.56);
  background: rgba(37, 99, 235, 0.16);
  color: #eff6ff;
}

.promo-video-item:hover {
  transform: translateY(-1px);
}

.promo-video-item.is-missing {
  opacity: 0.54;
}

.promo-video-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  font-weight: 700;
}

.promo-video-item strong,
.promo-video-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-video-item strong {
  font-size: 0.82rem;
}

.promo-video-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.discord-floating-link {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 850;
  display: grid;
  grid-template-columns: 38px auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-width: 154px;
  max-width: min(230px, calc(100vw - 28px));
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.22), rgba(14, 165, 233, 0.12)),
    rgba(15, 23, 42, 0.72);
  color: #eef2ff;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34), 0 0 24px rgba(88, 101, 242, 0.16);
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.discord-floating-link:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.68);
  box-shadow: 0 20px 46px rgba(2, 6, 23, 0.40), 0 0 30px rgba(88, 101, 242, 0.26);
}

.discord-floating-link span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #5865f2;
  color: #fff;
}

.discord-floating-link strong {
  align-self: end;
  font-size: 0.86rem;
  line-height: 1.1;
}

.discord-floating-link small {
  color: #c7d2fe;
  font-size: 0.72rem;
  line-height: 1.1;
}

@media (max-width: 1180px) {
  .live-store-panel {
    grid-template-columns: 1fr;
  }

  .promo-video-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .promo-video-playlist {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .live-store-panel {
    padding: 0 14px 20px;
    gap: 14px;
  }

  .recent-purchases-card,
  .video-showcase-card {
    padding: 14px;
    border-radius: 12px;
  }

  .live-card-head {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .recent-purchase-list {
    max-height: 340px;
  }

  .recent-purchase-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .recent-purchase-thumb,
  .recent-purchase-icon {
    width: 76px;
    height: 100%;
    grid-row: 1 / 3;
    object-fit: cover;
  }

  .recent-purchase-row time {
    grid-column: 2;
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .promo-video-player {
    min-height: 190px;
  }

  .promo-video-overlay {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .promo-video-playlist {
    grid-template-columns: 1fr;
  }

  .discord-floating-link {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: 34px auto;
    min-width: 126px;
    padding: 8px 10px 8px 8px;
    border-radius: 12px;
  }

  .discord-floating-link span {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .discord-floating-link small {
    display: none;
  }
}

@media (max-width: 420px) {
  .live-store-panel {
    padding-inline: 10px;
  }

  .promo-video-player {
    min-height: 168px;
  }

  .promo-video-status {
    left: 8px;
    right: 8px;
    font-size: 0.7rem;
  }

  .discord-floating-link {
    min-width: 44px;
    width: 44px;
    height: 44px;
    grid-template-columns: 1fr;
    padding: 5px;
  }

  .discord-floating-link span {
    grid-row: auto;
  }

  .discord-floating-link strong,
  .discord-floating-link small {
    display: none;
  }
}
