/* Nebulora Home: the Unfret test shop (a made-up store). Deliberately unlike the Unfret site. */
:root {
  --ink: #1d1a2b;
  --muted: #6b6780;
  --line: #e7e3f0;
  --paper: #ffffff;
  --tint: #f6f3fb;
  --accent: #6c2bd9;
  --accent-ink: #ffffff;
  --sale: #d61f4f;
  --banner: #ffe14d;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* The test shop banner: on every view, above everything else. */
.ts-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0;
  padding: 8px 16px;
  background: repeating-linear-gradient(-45deg, var(--banner) 0 18px, #ffd21f 18px 36px);
  color: #111;
  font: 600 14px/1.35 system-ui, sans-serif;
  text-align: center;
  border-bottom: 2px solid #111;
}

.shop-header { border-bottom: 1px solid var(--line); }

.announcement {
  margin: 0;
  padding: 6px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
}

.logo { font: 700 22px/1 Georgia, "Times New Roman", serif; text-decoration: none; letter-spacing: .02em; }
.logo-mark { color: var(--accent); }
.shop-nav { display: flex; gap: 18px; flex: 1; }
.shop-nav a, .cart-link { text-decoration: none; font-size: 15px; }
.shop-nav a:hover, .cart-link:hover { text-decoration: underline; }

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

@media (min-width: 760px) {
  .product { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; padding-top: 32px; }
  .details, .reviews { grid-column: 1 / -1; }
}

.gallery-main { border-radius: 10px; width: 100%; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; width: 76px; }
.thumb img { border-radius: 6px; }
.thumb.is-active { border-color: var(--accent); }

.vendor { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.buybox h1 { margin: 6px 0 8px; font-size: 22px; line-height: 1.3; }
.stars { color: #f5a623; text-decoration: none; font-size: 15px; }

.closing {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--sale);
  background: #fff1f4;
  font-size: 15px;
}
.closing p { margin: 0; }
.closing-title { font-weight: 800; color: var(--sale); text-transform: uppercase; margin-bottom: 4px !important; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 12px 0; }
.price-now { font-size: 30px; font-weight: 800; color: var(--sale); }
.price-was { color: var(--muted); }
.price-plain { color: var(--ink); }
.stock-note { margin: 8px 0 12px; font-size: 14px; color: var(--muted); }
.policies p { font-size: 15px; line-height: 1.5; }
.price-save { background: var(--sale); color: #fff; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }

.countdown-timer {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.countdown-clock { font-variant-numeric: tabular-nums; color: #ffd84d; }
.hurry-stock { margin: 8px 0; color: var(--sale); font-weight: 600; }
.viewers { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

.buy { display: grid; gap: 12px; }
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.swatches legend { font-size: 14px; margin-bottom: 6px; padding: 0; }
.swatch { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; width: max-content; }
.qty button { border: 0; background: none; font-size: 20px; width: 40px; height: 40px; cursor: pointer; }
.qty input { width: 44px; border: 0; text-align: center; font-size: 16px; -moz-appearance: textfield; }
.addon { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 10px 12px; background: var(--tint); border-radius: 8px; }
.addon input { margin-top: 3px; }

.btn {
  display: block;
  text-align: center;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid var(--accent);
  cursor: pointer;
}
.btn-cart { background: var(--paper); color: var(--accent); }
.btn-buy { background: var(--accent); color: var(--accent-ink); width: 100%; font-family: inherit; }

.badges { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 16px 0 0; list-style: none; font-size: 13px; color: var(--muted); }
.badges li::before { content: "✓ "; color: #1a9b5b; font-weight: 700; }

.details { max-width: 760px; }
.details h2, .reviews h2 { font-size: 20px; }
.details img { border-radius: 10px; margin: 16px 0; max-width: 420px; width: 100%; }

.small-print { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 8px; }
.small-print summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.small-print p { font-size: 11px; line-height: 1.4; color: #9a96aa; margin: 6px 0; }

.reviews-summary { color: var(--muted); }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review p { margin: 4px 0; }
.review-head { font-size: 13px; color: var(--muted); }
.review-stars { color: #f5a623; letter-spacing: 1px; }

.shop-footer { background: var(--tint); padding: 24px 16px; font-size: 13px; color: var(--muted); text-align: center; }
.shop-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 8px; }

/* "Someone just bought this" pop-up, shown by shop.js. */
.sales-pop {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: min(340px, calc(100vw - 24px));
  padding: 8px 12px 8px 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgb(29 26 43 / 22%);
  font-size: 13px;
  transform: translateY(160%);
  transition: transform .4s ease;
}
.sales-pop.is-shown { transform: none; }
.sales-pop img { width: 48px; border-radius: 6px; }
.sales-pop p { margin: 0; }

.checkout { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; }
.checkout h1 { font-size: 24px; }
.order { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.line { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.line img { width: 52px; border-radius: 6px; }
.line-name { flex: 1; font-size: 15px; }
.line-price { font-weight: 600; }
.order .addon { background: none; padding: 8px 0; border-radius: 0; }
.sums { margin: 8px 0 0; border-top: 1px solid var(--line); padding-top: 8px; }
.sums div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 15px; }
.sums dt, .sums dd { margin: 0; }
.sum-total { font-weight: 800; font-size: 18px !important; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px !important; }
.pay-note { color: var(--muted); font-size: 14px; min-height: 1.5em; }
