/* ============================================================
   TIMETORIOT — Merch, Cart & Checkout
   riot-merch.css
   ============================================================ */

/* ── NAV CART BUTTON ───────────────────────────── */
.riot-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--riot-border);
  border-radius: 10px;
  color: var(--riot-text);
  text-decoration: none;
  transition: var(--riot-transition);
  flex: none;
}
.riot-cart-link:hover {
  border-color: var(--riot-green);
  color: var(--riot-green);
  background: rgba(95,245,170,0.06);
}
.riot-cart-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--riot-green);
  color: #06231a;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.riot-cart-count.riot-cart-count-on { transform: scale(1); }
.riot-cart-count.riot-cart-bump { animation: riotCartBump 0.45s ease; }
@keyframes riotCartBump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.riot-mobile-menu .riot-cart-mobile { color: var(--riot-green); }

/* ── MERCH HERO WITH BACKGROUND ────────────────── */
.riot-merch-hero {
  position: relative;
  padding: 190px 0 100px;
  overflow: hidden;
  border-bottom: 1px solid var(--riot-border);
}
.riot-merch-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/bg-merch.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  filter: grayscale(0.15);
}
.riot-merch-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.86) 0%, rgba(10,10,10,0.55) 40%, rgba(10,10,10,0.97) 100%),
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(95,245,170,0.10) 0%, transparent 65%);
}
.riot-merch-hero .riot-container { position: relative; z-index: 2; }
.riot-merch-hero h1 { max-width: 15ch; margin-bottom: 20px; }
.riot-merch-hero h1 em { color: var(--riot-green); font-style: normal; }
.riot-merch-hero p {
  max-width: 62ch;
  color: var(--riot-text-muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}
.riot-merch-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 34px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--riot-text-muted);
}
.riot-merch-hero-meta span i { color: var(--riot-green); margin-right: 8px; }

/* Page-wide subtle merch backdrop */
body.riot-merch-page {
  background-color: var(--riot-black);
  background-image:
    linear-gradient(rgba(10,10,10,0.965), rgba(10,10,10,0.985)),
    url('/images/bg-merch.jpg');
  background-size: auto, cover;
  background-position: center, center top;
  background-attachment: scroll, fixed;
  background-repeat: no-repeat, no-repeat;
}

/* ── PRODUCT GRID ──────────────────────────────── */
.riot-merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.riot-merch-card {
  display: flex;
  flex-direction: column;
  background: var(--riot-card-bg);
  border: 1px solid var(--riot-border);
  border-radius: var(--riot-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: var(--riot-transition);
}
.riot-merch-card:hover {
  border-color: var(--riot-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--riot-shadow), var(--riot-shadow-green);
}
.riot-merch-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f1113;
}
.riot-merch-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.riot-merch-card:hover .riot-merch-card-media img { transform: scale(1.05); }
.riot-merch-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10,10,10,0.78);
  border: 1px solid var(--riot-border);
  backdrop-filter: blur(6px);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--riot-green);
}
.riot-merch-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.riot-merch-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.riot-merch-card-desc {
  font-size: 0.87rem;
  color: var(--riot-text-muted);
  line-height: 1.6;
  flex: 1;
}
.riot-merch-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--riot-border);
}
.riot-merch-price {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.riot-merch-sku {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--riot-text-dim);
  font-weight: 600;
}
.riot-merch-card-cta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--riot-green);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.riot-merch-card:hover .riot-merch-card-cta i { transform: translateX(4px); }
.riot-merch-card-cta i { transition: transform 0.25s ease; font-size: 0.72rem; }

/* ── BREADCRUMB ────────────────────────────────── */
.riot-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--riot-text-dim);
  margin-bottom: 28px;
}
.riot-breadcrumb a { color: var(--riot-text-muted); text-decoration: none; }
.riot-breadcrumb a:hover { color: var(--riot-green); }
.riot-breadcrumb span.sep { opacity: 0.5; }

/* ── PRODUCT PAGE ──────────────────────────────── */
.riot-product-wrap { padding: 150px 0 40px; }
.riot-product-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.riot-product-gallery {
  position: sticky;
  top: 110px;
  border: 1px solid var(--riot-border);
  border-radius: var(--riot-radius-lg);
  overflow: hidden;
  background: #0f1113;
}
.riot-product-gallery img { width: 100%; display: block; height: auto; }
.riot-product-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--riot-green);
  margin-bottom: 14px;
}
.riot-product-title {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.riot-product-lead {
  color: var(--riot-text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 24px;
}
.riot-product-pricebar {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--riot-border);
  border-bottom: 1px solid var(--riot-border);
  margin-bottom: 26px;
}
.riot-product-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.riot-product-vat { font-size: 0.8rem; color: var(--riot-text-dim); }
.riot-product-stock {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--riot-green);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.riot-product-stock::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--riot-green);
  box-shadow: 0 0 10px var(--riot-green);
}

/* Options */
.riot-opt-block { margin-bottom: 24px; }
.riot-opt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--riot-text-dim);
  margin-bottom: 11px;
}
.riot-opt-label a { color: var(--riot-green); text-decoration: none; text-transform: none; letter-spacing: 0.02em; font-size: 0.78rem; }
.riot-opt-choices { display: flex; flex-wrap: wrap; gap: 9px; }
.riot-opt-choice {
  padding: 10px 16px;
  min-width: 52px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  border-radius: 9px;
  color: var(--riot-text);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--riot-transition);
}
.riot-opt-choice:hover { border-color: rgba(95,245,170,0.45); }
.riot-opt-choice.riot-opt-active {
  border-color: var(--riot-green);
  background: rgba(95,245,170,0.12);
  color: var(--riot-green);
}

/* Quantity */
.riot-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.riot-qty button {
  width: 42px;
  height: 46px;
  background: none;
  border: none;
  color: var(--riot-text);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.riot-qty button:hover { background: rgba(95,245,170,0.12); color: var(--riot-green); }
.riot-qty input {
  width: 52px;
  height: 46px;
  border: none;
  background: none;
  color: var(--riot-text);
  text-align: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
  -moz-appearance: textfield;
}
.riot-qty input::-webkit-outer-spin-button,
.riot-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.riot-buy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 26px 0 14px; }
.riot-buy-row .riot-btn { flex: 1; min-width: 190px; justify-content: center; }
.riot-add-note {
  font-size: 0.8rem;
  color: var(--riot-green);
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.riot-add-note.riot-show { display: flex; }
.riot-opt-error { color: #ff6b6b; font-size: 0.8rem; margin-bottom: 14px; display: none; }
.riot-opt-error.riot-show { display: block; }

.riot-product-perks {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--riot-border);
  font-size: 0.85rem;
  color: var(--riot-text-muted);
}
.riot-product-perks div { display: flex; gap: 11px; align-items: flex-start; }
.riot-product-perks i { color: var(--riot-green); margin-top: 4px; font-size: 0.8rem; }

/* Detail sections */
.riot-prod-section { margin-top: 46px; }
.riot-prod-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.riot-prod-section p { color: var(--riot-text-muted); line-height: 1.8; }
.riot-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.riot-spec-table th, .riot-spec-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--riot-border);
  text-align: left;
}
.riot-spec-table th {
  color: var(--riot-text-dim);
  font-weight: 600;
  letter-spacing: 0.04em;
  width: 40%;
}
.riot-spec-table td { color: var(--riot-text); }
.riot-spec-table thead th {
  color: var(--riot-green);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  width: auto;
}
.riot-spec-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.riot-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--riot-border);
  border-radius: var(--riot-radius);
  background: var(--riot-card-bg);
}
.riot-table-wrap .riot-spec-table tr:last-child th,
.riot-table-wrap .riot-spec-table tr:last-child td { border-bottom: none; }

/* ── CART ──────────────────────────────────────── */
.riot-shop-wrap { padding: 150px 0 40px; }
.riot-shop-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.riot-shop-sub { color: var(--riot-text-muted); margin-bottom: 38px; }

.riot-cart-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.riot-cart-items {
  border: 1px solid var(--riot-border);
  border-radius: var(--riot-radius-lg);
  background: var(--riot-card-bg);
  overflow: hidden;
}
.riot-cart-row {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--riot-border);
  align-items: center;
}
.riot-cart-row:last-child { border-bottom: none; }
.riot-cart-thumb {
  width: 104px;
  height: 104px;
  border-radius: var(--riot-radius);
  object-fit: cover;
  background: #0f1113;
  border: 1px solid var(--riot-border);
}
.riot-cart-info h3 { font-size: 0.98rem; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.riot-cart-info h3 a { color: inherit; text-decoration: none; }
.riot-cart-info h3 a:hover { color: var(--riot-green); }
.riot-cart-meta {
  font-size: 0.78rem;
  color: var(--riot-text-dim);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}
.riot-cart-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.riot-cart-remove {
  background: none;
  border: none;
  color: var(--riot-text-dim);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  transition: color 0.2s;
}
.riot-cart-remove:hover { color: #ff6b6b; }
.riot-cart-line-price {
  text-align: right;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.riot-cart-line-each { display: block; font-size: 0.74rem; font-weight: 500; color: var(--riot-text-dim); margin-top: 4px; }

.riot-summary {
  position: sticky;
  top: 110px;
  border: 1px solid var(--riot-border);
  border-radius: var(--riot-radius-lg);
  background: var(--riot-card-bg);
  padding: 26px;
}
.riot-summary h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--riot-text-dim);
  margin-bottom: 20px;
}
.riot-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--riot-text-muted);
  padding: 9px 0;
}
.riot-sum-row strong { color: var(--riot-text); font-weight: 600; }
.riot-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--riot-border);
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--riot-text-dim);
  font-weight: 700;
}
.riot-sum-total b {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  color: var(--riot-text);
  text-transform: none;
}
.riot-summary .riot-btn { width: 100%; justify-content: center; margin-top: 22px; }
.riot-summary-note {
  font-size: 0.74rem;
  color: var(--riot-text-dim);
  line-height: 1.6;
  margin-top: 16px;
  text-align: center;
}
.riot-ship-note {
  font-size: 0.78rem;
  color: var(--riot-green);
  background: rgba(95,245,170,0.07);
  border: 1px solid rgba(95,245,170,0.2);
  border-radius: 10px;
  padding: 11px 13px;
  margin-top: 16px;
  line-height: 1.5;
}

.riot-empty {
  text-align: center;
  padding: 70px 24px;
  border: 1px dashed var(--riot-border);
  border-radius: var(--riot-radius-lg);
  background: var(--riot-card-bg);
}
.riot-empty i { font-size: 2.2rem; color: var(--riot-text-dim); margin-bottom: 18px; display: block; }
.riot-empty h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.riot-empty p { color: var(--riot-text-muted); margin-bottom: 24px; }

/* ── CHECKOUT ──────────────────────────────────── */
.riot-checkout-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.riot-checkout-card {
  border: 1px solid var(--riot-border);
  border-radius: var(--riot-radius-lg);
  background: var(--riot-card-bg);
  padding: clamp(22px, 3vw, 34px);
  margin-bottom: 24px;
}
.riot-checkout-card > h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.riot-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(95,245,170,0.12);
  border: 1px solid rgba(95,245,170,0.35);
  color: var(--riot-green);
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.riot-ship-options { display: grid; gap: 12px; }
.riot-ship-option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--riot-transition);
}
.riot-ship-option:hover { border-color: rgba(95,245,170,0.4); }
.riot-ship-option.riot-selected { border-color: var(--riot-green); background: rgba(95,245,170,0.06); }
.riot-ship-option input { margin-top: 4px; accent-color: #5ff5aa; }
.riot-ship-option > span:not(.riot-ship-price) { flex: 1; min-width: 0; }
.riot-ship-option .riot-ship-name { display: block; font-weight: 700; font-size: 0.92rem; }
.riot-ship-option .riot-ship-desc { display: block; font-size: 0.8rem; color: var(--riot-text-muted); margin-top: 3px; }
.riot-ship-option .riot-ship-price { margin-left: auto; font-weight: 800; white-space: nowrap; padding-left: 10px; }

.riot-mini-list { display: grid; gap: 14px; margin-bottom: 6px; }
.riot-mini-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.riot-mini-item img {
  width: 52px; height: 52px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--riot-border);
}
.riot-mini-name { font-size: 0.84rem; font-weight: 600; line-height: 1.35; }
.riot-mini-meta { font-size: 0.72rem; color: var(--riot-text-dim); margin-top: 3px; }
.riot-mini-price { font-size: 0.88rem; font-weight: 700; white-space: nowrap; }
.riot-mini-divider { height: 1px; background: var(--riot-border); margin: 18px 0; }

.riot-checkout-alert {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 10px;
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.3);
  color: #ff8f8f;
  font-size: 0.84rem;
  margin-bottom: 20px;
}
.riot-checkout-alert.riot-show { display: flex; }

/* ── ORDER CONFIRMED ───────────────────────────── */
.riot-order-wrap { padding: 160px 0 40px; max-width: 760px; margin: 0 auto; }
.riot-order-icon {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: rgba(95,245,170,0.12);
  border: 1px solid rgba(95,245,170,0.4);
  color: var(--riot-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 26px;
  box-shadow: 0 0 40px rgba(95,245,170,0.18);
}
.riot-order-num {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--riot-green);
  border: 1px dashed rgba(95,245,170,0.4);
  border-radius: 8px;
  padding: 8px 16px;
  margin-top: 8px;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 992px) {
  .riot-product-layout,
  .riot-cart-layout,
  .riot-checkout-layout { grid-template-columns: 1fr; }
  .riot-product-gallery, .riot-summary { position: static; }
  .riot-merch-hero { padding: 150px 0 70px; }
  .riot-product-wrap, .riot-shop-wrap { padding-top: 120px; }
}
@media (max-width: 620px) {
  .riot-cart-row { grid-template-columns: 76px 1fr; }
  .riot-cart-thumb { width: 76px; height: 76px; }
  .riot-cart-line-price { grid-column: 2 / -1; text-align: left; }
  .riot-merch-grid { grid-template-columns: 1fr; }
  .riot-buy-row .riot-btn { min-width: 100%; }
}

/* ── NAV DENSITY WITH MERCH + CART ─────────────── */
@media (max-width: 1240px) {
  #riot-navbar .riot-nav-links { gap: 20px; }
  #riot-navbar .riot-nav-links a { font-size: 0.84rem; }
  #riot-navbar .riot-nav-cta { gap: 9px; }
}
@media (max-width: 1120px) {
  #riot-navbar .riot-nav-cta .riot-btn-ghost { display: none; }
}

@media (max-width: 768px) {
  body.riot-merch-page { background-attachment: scroll, scroll; background-size: auto, 200% auto; }
  .riot-merch-hero { padding: 130px 0 60px; }
}
