/* =========================
   BAG.CSS — Bag page
   ========================= */

/* Local fonts (match shop/product) */
@font-face {
  font-family: 'Pixel Warden';
  src: url('fonts/pixelwarden/PixelWarden.ttf') format('truetype');
  font-display: block;
}
@font-face {
  font-family: 'FS TI-92 ENO C';
  src: url('fonts/fs-ti-92-eno-c/fs-ti-92-eno-c.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'RetroByte';
  src: url('fonts/retrobyte/RetroByte.ttf') format('truetype');
  font-display: block;
}

/* Tokens */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: #aaa;
  --maxw: 900px;
  --grid-pad: 24px;
}

/* Base */
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg) url('assets/shop/refcafeteria.png') center / cover no-repeat fixed;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
}

.menubar-slot {
  display: block;
  height: var(--barh, 32px);
}

.page {
  padding: 24px 0 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Layout */
.checkout-shell {
  width: 100%;
  max-width: var(--maxw);
  padding: 0 var(--grid-pad);
  display: flex;
  justify-content: center;
}

.checkout-panel {
  width: 100%;
  background: rgba(0,0,0,0.70);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Title */
.checkout-title {
  margin: 0 0 4px 0;
  font-family: 'RetroByte', monospace;
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Empty state */
.checkout-empty {
  font-size: 13px;
  color: var(--muted);
}

/* Items list */
.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.checkout-thumb-wrap {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.checkout-thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.checkout-meta {
  font-size: 12px;
}

.checkout-meta-title {
  font-weight: 600;
}

.checkout-meta-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.checkout-meta-sub span + span::before {
  content: " · ";
}


/* clickable title (don’t look like a default link) */
.checkout-meta-link {
  color: inherit;
  text-decoration: none;
}

.checkout-meta-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* make the thumbnail link not show weird underline/blue */
.checkout-thumb-wrap {
  text-decoration: none;
  color: inherit;
}


/* =========================
   Right column: qty controls LEFT of price
   ========================= */
.checkout-line-total {
  text-align: right;
  font-size: 12px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Qty controls */
.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-family: "ocr-a-std", "OCR A Std", "OCR A", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);

  margin-top: 0;
}

.qty-btn {
  width: 18px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255,255,255,0.6);
  background: transparent;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.qty-btn:hover {
  background: rgba(255,255,255,0.12);
}

.qty-num {
  min-width: 12px;
  text-align: center;
  color: rgba(255,255,255,0.9);
  font-size: 10px;
}

/* Summary */
.checkout-summary {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-family: "ocr-a-std", "OCR A Std", "OCR A", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.checkout-row-total {
  margin-top: 4px;
  font-weight: 700;
}

/* Continue button */
.checkout-pay-btn {
  margin-top: 10px;
  align-self: flex-end; /* right side */
  padding: 8px 16px;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  font-family: "ocr-a-std", "OCR A Std", "OCR A", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.checkout-pay-btn:hover {
  background: transparent;
  color: #fff;
}

.checkout-pay-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Menubar overrides (match shop/product) */
body.menu-transparent {
  --chrome: rgba(255,255,255,0.70);
}

body.menu-transparent .top-margin {
  background: transparent !important;
}

body.menu-transparent .site-header {
  background:
    linear-gradient(var(--chrome), var(--chrome)) top/100% var(--linew) no-repeat,
    linear-gradient(var(--chrome), var(--chrome)) bottom/100% var(--linew) no-repeat,
    linear-gradient(to right, var(--chrome), var(--chrome)) left/var(--linew) 100% no-repeat,
    linear-gradient(to left,  var(--chrome), var(--chrome)) right/var(--linew) 100% no-repeat,
    transparent !important;
}

body.menu-transparent .menu > li {
  border-left-color: var(--chrome);
}

body.menu-transparent .menu-link,
body.menu-transparent .brand-link {
  color: #fff;
  background: transparent !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

body.menu-transparent .menu-link:hover,
body.menu-transparent .menu-link.is-current:hover,
body.menu-transparent .brand-link:hover {
  background: rgba(255,255,255,0.18) !important;
  color: #fff !important;
}

/* Responsive */
@media (max-width: 720px) {
  .checkout-panel {
    padding: 14px 14px;
  }

  .checkout-item {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .checkout-line-total {
    grid-column: 2 / -1;
  }
}
