/* ============================================
   ASWEWAIT — GLOBAL DESIGN SYSTEM
   brutalist / old-web / terminal aesthetic
   optimized for conversion and brand messaging
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --bg: #d4d0c8;
  --surface: #ffffff;
  --border: #000000;
  --text: #000000;
  --text-muted: #555555;
  --accent: #0000cc;
  --accent-visited: #551a8b;
  --header-bg: #c0c0c0;
  --inset-bg: #ececec;
  --error: #cc0000;
  --success: #006600;
  --font: "Courier Prime", "Courier New", monospace;
  --border-size: 1px;
  --shadow: 2px 2px 0px #000000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

a:visited {
  color: var(--accent-visited);
}

a:hover {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

/* ============================================
   LAYOUT SHELL
   ============================================ */

.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  border: var(--border-size) solid var(--border);
  border-top: none;
  background: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   NAVIGATION
   ============================================ */

.site-nav {
  background: var(--header-bg);
  border-bottom: var(--border-size) solid var(--border);
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .logo {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0;
}

.site-nav .logo:hover {
  background: none;
  color: var(--text);
  text-decoration: underline;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  font-size: 13px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.nav-links a:visited {
  color: var(--text);
}

.nav-links a:hover {
  background: none;
  text-decoration: underline;
  color: var(--accent);
}

.nav-links a.active {
  text-decoration: underline;
  color: var(--accent);
}

.nav-cart {
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.15s;
}

.nav-cart:hover {
  text-decoration: underline;
  background: none;
  color: var(--accent);
}

/* ============================================
   LIVE SALES TICKER
   Psychological: Social proof drives conversions
   ============================================ */

.ticker-bar {
  background: var(--text);
  color: #b0b0b0;
  border-bottom: var(--border-size) solid var(--border);
  height: 26px;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.ticker-label {
  flex-shrink: 0;
  background: #111;
  color: #555;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid #333;
  white-space: nowrap;
  z-index: 2;
}

.ticker-track-wrap {
  overflow: hidden;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding-right: 60px;
  flex-shrink: 0;
}

.ticker-status {
  color: #00cc66;
  font-weight: 700;
  margin-right: 8px;
}

.ticker-sep {
  color: #444;
  margin: 0 8px;
}

.ticker-loc {
  color: #cccccc;
}

.ticker-product {
  color: #888;
}

.ticker-time {
  color: #555;
}

/* ============================================
   WORLD CLOCK BAR
   Global community awareness
   ============================================ */

.world-clock {
  display: flex;
  border-bottom: var(--border-size) solid var(--border);
  background: var(--inset-bg);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.world-clock::-webkit-scrollbar {
  display: none;
}

.clock-city {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px 7px;
  border-right: var(--border-size) solid var(--border);
  text-align: center;
}

.clock-city:last-child {
  border-right: none;
}

.clock-city-name {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.clock-time {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
}

.clock-date {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.04em;
}

/* ============================================
   HERO SECTION
   homepage.jpg background + brand messaging
   ============================================ */

.hero {
  padding: 40px 24px 36px;
  border-bottom: var(--border-size) solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/homepage.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  z-index: 1;
}

/* hero-content holds all foreground hero elements above bg/overlay */
.hero > *:not(.hero-bg):not(.hero-overlay) {
  position: relative;
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 10px;
}

/* DECISION: Tagline "to create, from home." replaces the multi-line
   preachy subtitle. Single line, brand-defining, subtextual.
   No strong tag, no explanation — the brand is felt. */
.hero-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

/* DECISION: CTA row in hero removes scroll-to-action distance.
   "shop now →" is the primary action, directly from the hero.
   Online count provides social proof at the same visual level. */
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-cta {
  font-weight: 700;
  font-size: 13px;
}

.hero-status {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Legacy subtitle — not used on homepage anymore, kept for any
   pages that might reference it. */
.hero-subtitle {
  font-size: 13px;
  color: var(--text);
  max-width: 600px;
  line-height: 1.6;
}

.hero-subtitle strong {
  color: var(--accent);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

/* ============================================
   STATUS BAR
   homepage-2.png background + scarcity messaging
   ============================================ */

.status-bar {
  border-bottom: var(--border-size) solid var(--border);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.status-bar-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/homepage-2.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0.4;
}

.status-bar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(212, 208, 200, 0.85);
  z-index: 1;
}

.status-bar-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px;
  flex-wrap: wrap;
}

.status-bar-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  margin-right: 2px;
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes count-flash {
  0%   { opacity: 0.3; }
  100% { opacity: 1; }
}

#online-count {
  font-weight: 700;
  font-size: 12px;
  display: inline-block;
}

#online-count.updating {
  animation: count-flash 0.35s ease-out forwards;
}

/* ============================================
   TWO-COLUMN LAYOUT
   ============================================ */

.two-col {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-top: var(--border-size) solid var(--border);
  flex: 1;
}

.sidebar {
  border-right: var(--border-size) solid var(--border);
  padding: 20px 16px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

/* SIDEBAR BACKGROUND IMAGE (homepage-2.png) */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/homepage-2.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 8px;
}

.sidebar-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  display: block;
  padding: 4px 0;
  transition: color 0.15s;
}

.sidebar-links a:visited {
  color: var(--text);
}

.sidebar-links a:hover {
  color: var(--accent);
  background: none;
  text-decoration: underline;
}

.status-item {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
}

.status-item span {
  display: inline;
}

.scarcity-message {
  color: var(--text);
  font-weight: 600;
}

.scarcity-message span {
  color: var(--accent);
  font-weight: 700;
}

.brand-mission {
  background: rgba(0, 0, 204, 0.05);
  border: 1px solid var(--accent);
  padding: 12px;
  margin: 0 -4px 24px -4px;
}

.sidebar-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

/* ============================================
   MAIN CONTENT / FORUM PANEL
   ============================================ */

.main-content {
  padding: 20px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

/* FORUM PANEL BACKGROUND IMAGE (homepage-3.png) */
.forum-panel {
  background: var(--surface);
}

.forum-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/homepage-3.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.forum-panel-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.main-content > *:not(.forum-panel-bg) {
  position: relative;
  z-index: 1;
}

/* ============================================
   POST CARDS
   ============================================ */

.post-card {
  border: var(--border-size) solid var(--border);
  margin-bottom: 16px;
  background: var(--surface);
  overflow: hidden;
}

.post-card.featured-post {
  border: 2px solid var(--accent);
  background: rgba(0, 0, 204, 0.02);
}

.post-card.featured-post .post-header {
  background: rgba(0, 0, 204, 0.08);
}

.post-header {
  background: var(--inset-bg);
  border-bottom: var(--border-size) solid var(--border);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.post-body {
  padding: 12px;
}

.post-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.post-body p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
}

.post-note {
  color: var(--success);
  font-weight: 600;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 16px;
  border: var(--border-size) solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.btn:hover {
  background: var(--text);
  color: var(--surface);
}

.btn:visited {
  color: var(--text);
}

.btn-primary {
  background: var(--text);
  color: var(--surface);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-small {
  font-size: 11px;
  padding: 3px 10px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 8px;
  border: var(--border-size) solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============================================
   TABLE
   ============================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--inset-bg);
  border: var(--border-size) solid var(--border);
  padding: 6px 10px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  border: var(--border-size) solid var(--border);
  padding: 6px 10px;
  vertical-align: top;
}

.data-table tr:nth-child(even) td {
  background: var(--inset-bg);
}

/* ============================================
   CART
   ============================================ */

.cart-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background: var(--surface);
  border-left: var(--border-size) solid var(--border);
  z-index: 1000;
  flex-direction: column;
}

.cart-overlay.open {
  display: flex;
}

.cart-header {
  padding: 12px 16px;
  border-bottom: var(--border-size) solid var(--border);
  background: var(--inset-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.cart-item {
  border-bottom: var(--border-size) solid var(--border);
  padding: 10px 0;
  font-size: 12px;
}

.cart-item-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.cart-item-meta {
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.cart-footer {
  padding: 12px 16px;
  border-top: var(--border-size) solid var(--border);
}

.cart-total {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 40px 0;
}

/* ============================================
   TOAST
   ============================================ */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--surface);
  font-family: var(--font);
  font-size: 12px;
  padding: 8px 20px;
  border: var(--border-size) solid var(--border);
  z-index: 9999;
  display: none;
}

.toast.show {
  display: block;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: var(--border-size) solid var(--border);
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--inset-bg);
}

/* ============================================
   PAGE HEADER (inner pages)
   ============================================ */

.page-header {
  padding: 20px 24px 16px;
  border-bottom: var(--border-size) solid var(--border);
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--text-muted);
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.product-item {
  border: var(--border-size) solid var(--border);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.product-img {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--inset-bg);
  border-bottom: var(--border-size) solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
}

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

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

.product-info {
  padding: 10px 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  font-size: 13px;
  font-weight: 700;
}

.product-price {
  font-size: 12px;
  color: var(--text-muted);
}

.product-tag {
  font-size: 10px;
  border: 1px solid var(--border);
  display: inline-block;
  padding: 1px 5px;
  margin-top: 4px;
  width: fit-content;
}

/* ============================================
   UTILITY
   ============================================ */

.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 12px; }
.text-xs     { font-size: 11px; }
.font-bold   { font-weight: 700; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mb-8        { margin-bottom: 8px; }
.mb-16       { margin-bottom: 16px; }
.divider     { border-top: var(--border-size) solid var(--border); margin: 16px 0; }

.badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  vertical-align: middle;
}

.badge-active  { background: #ccffcc; }
.badge-pending { background: #ffffcc; }
.badge-shipped { background: #cce5ff; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 700px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: var(--border-size) solid var(--border);
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 12px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-overlay {
    width: 100%;
  }

  .nav-links {
    gap: 12px;
  }

  .clock-city {
    min-width: 90px;
  }

  .clock-time {
    font-size: 13px;
  }

  .ticker-label {
    display: none;
  }

  .status-bar-inner {
    gap: 12px;
    padding: 8px 12px;
  }

  .status-bar-item {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 24px 16px 20px;
    min-height: 140px;
  }

  .hero h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 11px;
    line-height: 1.5;
  }

  .sidebar {
    padding: 16px 12px;
  }

  .main-content {
    padding: 16px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 8px;
    font-size: 12px;
  }

  .post-card {
    margin-bottom: 12px;
  }

  .post-title {
    font-size: 13px;
  }

  .post-body p {
    font-size: 12px;
  }
}

/* ============================================
   MODAL
   ============================================ */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.modal-backdrop.open {
  display: block;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: var(--border-size) solid var(--border);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.modal.open {
  display: flex;
}

.modal-header {
  background: var(--inset-bg);
  border-bottom: var(--border-size) solid var(--border);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.modal-body {
  padding: 20px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* Product card class used on shop page */
.product-card {
  border: none;
  border-right: var(--border-size) solid var(--border);
  border-bottom: var(--border-size) solid var(--border);
  padding: 0;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  background: var(--inset-bg);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

/* ============================================
   MODAL (product modal + region modal shared)
   ============================================ */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1200;
}
.modal-backdrop.open { display: block; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: var(--border-size) solid var(--border);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  z-index: 1201;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.modal.open { display: flex; }
.modal-header {
  background: var(--inset-bg);
  border-bottom: var(--border-size) solid var(--border);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.modal-body {
  padding: 20px 16px;
  overflow-y: auto;
  flex: 1;
}

/* product card on shop page */
.product-card {
  border: none;
  border-right: var(--border-size) solid var(--border);
  border-bottom: var(--border-size) solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background 0.1s;
}
.product-card:hover { background: var(--inset-bg); }

@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ============================================
   REGION SELECTOR OVERLAY
   Full-screen gate shown on first visit.
   Matches the terminal/popup aesthetic.
   ============================================ */

#region-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}
#region-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.region-box {
  background: var(--surface);
  border: 2px solid var(--border);
  width: 90%;
  max-width: 400px;
  animation: slideUp 0.3s ease-out;
}

.region-titlebar {
  background: var(--inset-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.region-dots { display: flex; gap: 4px; }
.region-dot  { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; }

.region-body {
  padding: 20px 16px 24px;
}
.region-prompt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.region-headline {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}
.region-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.region-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.region-btn {
  font-family: var(--font);
  font-size: 13px;
  padding: 10px 14px;
  border: var(--border-size) solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.12s, color 0.12s;
  letter-spacing: 0.02em;
}
.region-btn:hover {
  background: var(--text);
  color: var(--surface);
}
.region-btn:hover .region-currency {
  color: #aaa;
}
.region-currency {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* Nav region chip */
.region-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.12s;
}
.region-chip:hover {
  background: var(--text);
  color: var(--surface);
}

/* ============================================
   EMPTY STATE CARDS
   ============================================ */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: var(--border-size) solid var(--border);
  background: var(--inset-bg);
}
.empty-state-code {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.empty-state-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   HOMEPAGE — PRODUCT SECTION
   PART 1 addition: Products are now the primary
   homepage section, immediately below the hero.
   ============================================ */

/* Section header shared between products + community */
.hp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 20px 12px;
  border-bottom: var(--border-size) solid var(--border);
}

.hp-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.hp-section-link {
  font-size: 11px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.hp-section-link:visited { color: var(--text); }
.hp-section-link:hover {
  background: none;
  color: var(--accent);
  text-decoration: underline;
}

/* Product section wrapper */
.hp-products-section {
  border-bottom: var(--border-size) solid var(--border);
}

/* DECISION: 3-col grid matches the shop page grid exactly.
   This creates visual consistency across the funnel —
   homepage preview → shop page full catalog.
   Gap-free grid with borders creates the editorial panel feel
   consistent with the overall brutalist/terminal aesthetic. */
.hp-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: none;
}

/* DECISION: Product cards are anchor tags for full clickability.
   No JS required for navigation — just href to shop.html.
   Hover darkens entire card for clear affordance signal. */
.hp-product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  border-right: var(--border-size) solid var(--border);
  border-bottom: var(--border-size) solid var(--border);
  background: var(--surface);
  transition: background 0.1s ease;
  position: relative;
  overflow: hidden;
}
.hp-product-card:last-child { border-right: none; }
.hp-product-card:visited { color: var(--text); }
.hp-product-card:hover {
  background: var(--inset-bg);
  text-decoration: none;
  color: var(--text);
}
.hp-product-card.is-sold-out { opacity: 0.6; }

/* Product image: 3/4 aspect ratio is standard for apparel.
   Inset-bg fallback ensures the grid looks intentional with no images. */
.hp-product-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--inset-bg);
  border-bottom: var(--border-size) solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.hp-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}
.hp-product-card:hover .hp-product-img img {
  transform: scale(1.03);
}

/* Letter placeholder for products with no image */
.hp-product-img-placeholder {
  font-size: 32px;
  font-weight: 700;
  color: var(--border);
  opacity: 0.3;
  text-transform: uppercase;
}

/* Scarcity badges — positioned over image, top-right */
.hp-product-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid currentColor;
}
.hp-badge-sold {
  color: var(--text-muted);
  background: var(--surface);
}
/* DECISION: "low stock" uses red to trigger loss aversion —
   a core behavioral economics principle for scarcity signaling */
.hp-badge-low {
  color: var(--error);
  background: var(--surface);
}

/* Product info below image */
.hp-product-info {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.hp-product-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.hp-product-price {
  font-size: 11px;
  color: var(--text-muted);
}
.hp-product-cat {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Loading skeleton cards — shown while Supabase fetches.
   DECISION: Skeleton > spinner. Skeletons set dimension expectations,
   reducing perceived load time via progressive disclosure. */
.hp-product-skeleton {
  border-right: var(--border-size) solid var(--border);
  border-bottom: var(--border-size) solid var(--border);
  background: var(--surface);
}
.hp-product-skeleton::before {
  content: '';
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(
    90deg,
    var(--inset-bg) 25%,
    var(--bg) 50%,
    var(--inset-bg) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.hp-product-skeleton::after {
  content: '';
  display: block;
  height: 56px;
  margin: 12px;
  background: var(--inset-bg);
  opacity: 0.5;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* "View all products" footer link */
.hp-products-footer {
  padding: 14px 20px;
  border-top: var(--border-size) solid var(--border);
  text-align: center;
}

/* ============================================
   HOMEPAGE — BRAND SIGNAL
   3-column trust bar between products + community.
   Replaces verbose sidebar mission copy with
   scannable, purchase-rationale anchors.
   ============================================ */
.hp-brand-signal {
  display: flex;
  align-items: stretch;
  border-bottom: var(--border-size) solid var(--border);
  background: var(--inset-bg);
}

.hp-signal-item {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hp-signal-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.hp-signal-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
}

.hp-signal-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   HOMEPAGE — COMMUNITY SECTION
   Moved below products + brand signal.
   Max 2 forum posts shown — social proof texture,
   not a primary content destination.
   ============================================ */
.hp-community {
  border-bottom: var(--border-size) solid var(--border);
}

/* 2-col grid for forum posts on homepage */
.hp-forum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Forum cards are anchor tags — fully clickable */
.hp-forum-card {
  display: block;
  padding: 16px 20px;
  border-right: var(--border-size) solid var(--border);
  border-bottom: var(--border-size) solid var(--border);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  transition: background 0.1s ease;
}
.hp-forum-card:last-child { border-right: none; }
.hp-forum-card:visited { color: var(--text); }
.hp-forum-card:hover {
  background: var(--inset-bg);
  text-decoration: none;
  color: var(--text);
}

.hp-forum-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.hp-forum-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.hp-forum-excerpt {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hp-forum-empty {
  padding: 24px 20px;
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-muted);
}
.hp-forum-empty a { color: var(--text); }

.hp-community-footer {
  padding: 14px 20px;
  text-align: center;
}

/* About section */
.hp-about {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
}
.hp-about-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 700px;
}
.hp-about-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  flex: 1;
}

/* ============================================
   FOOTER — Updated for new 3-column layout
   ============================================ */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 11px;
  text-decoration: none;
}
.footer-links a:visited { color: var(--text-muted); }
.footer-links a:hover {
  color: var(--text);
  background: none;
  text-decoration: underline;
}

.footer-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   RESPONSIVE — Homepage new sections
   ============================================ */

@media (max-width: 700px) {
  /* Hero adjustments */
  .hero {
    min-height: 180px;
    padding: 28px 16px 24px;
  }
  .hero h1 { font-size: 32px; }
  .hero-tagline { font-size: 12px; }
  .hero-cta-row { gap: 14px; }

  /* Products: 2 cols on tablet */
  .hp-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hp-product-skeleton:nth-child(3) { display: none; }

  /* Brand signal: stack vertically */
  .hp-brand-signal {
    flex-direction: column;
  }
  .hp-signal-divider {
    width: 100%;
    height: 1px;
  }

  /* Community: single col */
  .hp-forum-grid {
    grid-template-columns: 1fr;
  }
  .hp-forum-card {
    border-right: none;
  }

  /* Footer stacks */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-links {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero { padding: 20px 14px 20px; min-height: 150px; }
  .hero h1 { font-size: 26px; margin-bottom: 8px; }
  .hero-tagline { font-size: 11px; margin-bottom: 18px; }

  /* Products: single col on mobile */
  .hp-product-grid {
    grid-template-columns: 1fr;
  }
  .hp-product-card { border-right: none; }
  .hp-product-skeleton:nth-child(2),
  .hp-product-skeleton:nth-child(3) { display: none; }

  .hp-section-header { padding: 12px 14px 10px; }
  .hp-signal-item { padding: 14px; }
  .hp-products-footer,
  .hp-community-footer { padding: 12px 14px; }
}

/* ============================================
   PART 2 — ADDITIONS
   product gallery · quick-view · admin upload
   image carousel · product detail · archive v2
   ============================================ */

/* ============================================
   HERO OVERLAY — darkened for better atmosphere
   ============================================ */

.hero-overlay {
  background: rgba(0, 0, 0, 0.52) !important;
}

/* Ensure hero text is readable on dark overlay */
.hero-content h1,
.hero-content .hero-tagline {
  color: #ffffff;
}
.hero-content .hero-status {
  color: rgba(255,255,255,0.75);
}
.hero-content .hero-cta {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
.hero-content .hero-cta:hover {
  background: #000000;
  color: #ffffff;
}

/* ============================================
   QUICK-VIEW MODAL
   Triggered from homepage + shop product cards
   ============================================ */

.qv-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.qv-backdrop.open { display: flex; }

.qv-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 90%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.22s ease-out;
  overflow: hidden;
}

.qv-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.qv-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  flex: 1;
}

.qv-gallery {
  border-right: 1px solid var(--border);
  background: var(--inset-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.qv-gallery-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--inset-bg);
  min-height: 280px;
  position: relative;
}

.qv-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.qv-gallery-main .qv-img-placeholder {
  font-size: 48px;
  color: var(--text-muted);
  font-weight: 700;
}

.qv-gallery-thumbs {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.qv-gallery-thumbs::-webkit-scrollbar { display: none; }

.qv-thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.15s;
  background: var(--inset-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qv-thumb:last-child { border-right: none; }
.qv-thumb.active { opacity: 1; outline: 2px solid var(--text) inset; }
.qv-thumb:hover { opacity: 0.85; }
.qv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qv-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.qv-product-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.qv-product-price {
  font-size: 16px;
  font-weight: 700;
}

.qv-product-cat {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.qv-product-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.qv-size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qv-size-btn {
  border: 1px solid var(--border);
  background: none;
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s, color 0.12s;
}
.qv-size-btn:hover { background: var(--inset-bg); }
.qv-size-btn.selected {
  background: var(--text);
  color: var(--surface);
}

.qv-add-btn {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qv-stock-note {
  font-size: 11px;
  color: var(--text-muted);
}
.qv-stock-note.low { color: var(--error); }

.qv-view-full {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
}
.qv-view-full:hover { color: var(--text); }

@media (max-width: 600px) {
  .qv-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .qv-gallery {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .qv-gallery-main { min-height: 220px; }
}

/* ============================================
   HOMEPAGE PRODUCT CARD — quick-view hover
   ============================================ */

.hp-product-card {
  position: relative;
}

.hp-product-qv-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  font-family: var(--font);
  font-size: 10px;
  padding: 5px 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.hp-product-card:hover .hp-product-qv-btn {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   SHOP PAGE — improved product cards
   ============================================ */

.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.shop-product-card {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}
.shop-product-card:visited { color: var(--text); }
.shop-product-card:hover { background: var(--inset-bg); }
.shop-product-card.is-sold-out { opacity: 0.65; }

.shop-product-img {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--inset-bg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.shop-product-card:hover .shop-product-img img {
  transform: scale(1.03);
}

.shop-product-img-placeholder {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-muted);
}

.shop-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid;
}
.shop-badge-sold { background: #000; color: #fff; border-color: #000; }
.shop-badge-low  { background: var(--error); color: #fff; border-color: var(--error); }

.shop-product-info {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shop-product-name {
  font-size: 13px;
  font-weight: 700;
}
.shop-product-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.shop-product-cat {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 2px;
}

.shop-product-qv {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-family: var(--font);
  font-size: 11px;
  padding: 10px 14px;
  text-align: center;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.shop-product-card:hover .shop-product-qv {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 700px) {
  .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 420px) {
  .shop-product-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PRODUCT DETAIL PAGE
   Full-page product view with gallery
   ============================================ */

.pd-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  min-height: 500px;
}

.pd-gallery {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.pd-main-img {
  flex: 1;
  background: var(--inset-bg);
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.2s;
}
.pd-main-img.loading img { opacity: 0; }
.pd-main-img .pd-placeholder {
  font-size: 64px;
  font-weight: 700;
  color: var(--text-muted);
}

.pd-thumbs {
  display: flex;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.pd-thumbs::-webkit-scrollbar { display: none; }

.pd-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.15s;
  background: var(--inset-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-thumb:last-child { border-right: none; }
.pd-thumb.active { opacity: 1; }
.pd-thumb:hover { opacity: 0.8; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pd-info {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-breadcrumb {
  font-size: 11px;
  color: var(--text-muted);
}
.pd-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.pd-breadcrumb a:hover { text-decoration: underline; background: none; color: var(--text); }

.pd-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

.pd-price {
  font-size: 20px;
  font-weight: 700;
}

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

.pd-tag {
  border: 1px solid var(--border);
  font-size: 10px;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.pd-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.pd-size-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pd-size-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pd-size-btn {
  border: 1px solid var(--border);
  background: none;
  font-family: var(--font);
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s, color 0.12s;
  font-weight: 700;
}
.pd-size-btn:hover { background: var(--inset-bg); }
.pd-size-btn.selected { background: var(--text); color: var(--surface); }
.pd-size-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.pd-add-section {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-stock-note {
  font-size: 11px;
  color: var(--text-muted);
}
.pd-stock-note.low { color: var(--error); font-weight: 700; }

.pd-trust-row {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pd-trust-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.pd-trust-item::before {
  content: '—';
  flex-shrink: 0;
}

/* Gallery inner layout — vertical thumbs left, main image right */
.pd-gallery-inner {
  display: grid;
  grid-template-columns: 80px 1fr;
  flex: 1;
  overflow: hidden;
}

/* Vertical thumbnail strip */
.pd-thumbs-vertical {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  scrollbar-width: none;
}
.pd-thumbs-vertical::-webkit-scrollbar { display: none; }

.pd-thumb-v {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.15s;
  background: var(--inset-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-thumb-v:last-child { border-bottom: none; }
.pd-thumb-v.active { opacity: 1; outline: 2px solid var(--text) inset; }
.pd-thumb-v:hover { opacity: 0.8; }
.pd-thumb-v img { width: 100%; height: 100%; object-fit: cover; }

/* Image counter overlay */
.pd-img-counter {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.45);
  padding: 2px 7px;
  letter-spacing: 0.05em;
  pointer-events: none;
}

@media (max-width: 700px) {
  .pd-wrapper {
    grid-template-columns: 1fr;
  }
  .pd-gallery { border-right: none; border-bottom: 1px solid var(--border); }
  .pd-gallery-inner {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .pd-thumbs-vertical {
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: visible;
  }
  .pd-thumb-v {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .pd-thumb-v:last-child { border-right: none; }
  .pd-info { padding: 20px 16px 24px; }
  .pd-name { font-size: 20px; }
}

/* ============================================
   ARCHIVE PAGE v2 — new visual language
   ============================================ */

.archive-hero {
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--inset-bg);
}

.archive-hero h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.archive-hero p {
  font-size: 12px;
  color: var(--text-muted);
}

.archive-drop-section {
  border-bottom: 1px solid var(--border);
}

.archive-drop-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--inset-bg);
}

.archive-drop-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.archive-drop-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--border);
}

.archive-card {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: default;
}

.archive-card-img {
  aspect-ratio: 3/4;
  background: var(--inset-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.archive-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
}
.archive-card-placeholder {
  font-size: 32px;
  color: var(--text-muted);
  font-weight: 700;
}

.archive-card-info {
  padding: 10px 12px 12px;
}
.archive-card-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}
.archive-card-price {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.archive-card-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 6px;
  border: 1px solid #555;
  color: #555;
  display: inline-block;
}

@media (max-width: 700px) {
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .archive-grid { grid-template-columns: 1fr; }
}

/* ============================================
   ADMIN v2 — Image upload system
   ============================================ */

.admin-img-upload-zone {
  border: 2px dashed var(--border);
  background: var(--inset-bg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.admin-img-upload-zone:hover,
.admin-img-upload-zone.drag-over {
  background: #e8e8e8;
  border-color: var(--accent);
}
.admin-img-upload-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.admin-img-upload-label {
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.admin-img-upload-label strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.admin-img-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.admin-img-preview-item {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--inset-bg);
  cursor: grab;
}
.admin-img-preview-item.dragging { opacity: 0.45; border-style: dashed; }
.admin-img-preview-item.drag-target { border-color: var(--accent); border-width: 2px; }

.admin-img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.admin-img-preview-del {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  width: 20px;
  height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  line-height: 1;
}

.admin-img-preview-primary {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-img-upload-progress {
  height: 2px;
  background: var(--inset-bg);
  margin-top: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-img-upload-progress-bar {
  height: 100%;
  background: var(--text);
  width: 0%;
  transition: width 0.3s;
}

/* ============================================
   ADMIN v2 — Product form improvements
   ============================================ */

.admin-product-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-modal-wide {
  max-width: 700px !important;
}

.admin-img-count-note {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   ENTRANCE ANIMATIONS — restrained
   ============================================ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hp-product-card {
  animation: fadeInUp 0.28s ease-out both;
}
.hp-product-card:nth-child(1) { animation-delay: 0.04s; }
.hp-product-card:nth-child(2) { animation-delay: 0.10s; }
.hp-product-card:nth-child(3) { animation-delay: 0.16s; }
.hp-product-card:nth-child(4) { animation-delay: 0.22s; }
.hp-product-card:nth-child(5) { animation-delay: 0.28s; }
.hp-product-card:nth-child(6) { animation-delay: 0.34s; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hp-product-card,
  .shop-product-img img,
  .qv-modal,
  .pd-main-img img {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   LOADING SKELETON SHIMMER
   ============================================ */

.hp-product-skeleton {
  animation: shimmer 1.4s ease-in-out infinite;
  background: linear-gradient(90deg,
    var(--inset-bg) 25%,
    #e0ddd5 50%,
    var(--inset-bg) 75%
  );
  background-size: 200% 100%;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ============================================
   RESPONSIVE — overall mobile fixes
   ============================================ */

@media (max-width: 700px) {
  .admin-product-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-img-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .archive-hero { padding: 20px 16px 16px; }
  .archive-drop-header { padding: 12px 16px; }
}

/* ============================================================
   RESPONSIVE OVERHAUL — aswewait.exe
   Full-spectrum fluid design: 320px → ultrawide
   Preserves brutalist/terminal aesthetic intact.
   ============================================================ */

/* ── FLUID BASE SCALE ──────────────────────────────────────── */

:root {
  /* Fluid type scale using clamp() */
  --fs-hero:    clamp(22px, 6vw, 56px);
  --fs-h2:      clamp(18px, 3.5vw, 28px);
  --fs-body:    clamp(12px, 1.4vw, 14px);
  --fs-sm:      clamp(10px, 1.2vw, 13px);
  --fs-xs:      clamp(9px,  1vw,  11px);

  /* Fluid spacing */
  --sp-hero:    clamp(16px, 4vw, 40px);
  --sp-section: clamp(14px, 3vw, 24px);
  --sp-card:    clamp(10px, 2vw, 16px);

  /* Max site width */
  --site-max: min(1100px, 100vw);

  /* Nav height for scroll offset */
  --nav-h: 40px;
}

/* ── PREVENT GLOBAL OVERFLOW ────────────────────────────────── */

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ── SITE WRAPPER FLUID ─────────────────────────────────────── */

.site-wrapper {
  max-width: var(--site-max);
  width: 100%;
  overflow-x: hidden;
}

/* ── NAVIGATION — RESPONSIVE ───────────────────────────────── */

.site-nav {
  padding: 6px clamp(10px, 2vw, 16px);
  flex-wrap: nowrap;
  min-height: var(--nav-h);
  gap: 8px;
}

.site-nav .logo {
  font-size: clamp(11px, 1.5vw, 13px);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  gap: clamp(8px, 2vw, 24px);
  font-size: clamp(11px, 1.3vw, 13px);
  flex-wrap: nowrap;
}

.nav-links li {
  white-space: nowrap;
}

.nav-cart {
  white-space: nowrap;
  font-size: clamp(11px, 1.3vw, 13px);
}

.region-chip {
  white-space: nowrap;
}

/* Mobile hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Mobile drawer nav */
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 0;
  flex-direction: column;
}

.nav-mobile-drawer.open {
  display: flex;
}

.nav-mobile-drawer a,
.nav-mobile-drawer button {
  display: block;
  padding: 12px clamp(14px, 4vw, 20px);
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.nav-mobile-drawer a:last-child,
.nav-mobile-drawer button:last-child {
  border-bottom: none;
}

.nav-mobile-drawer a:hover,
.nav-mobile-drawer button:hover {
  color: var(--accent);
  background: none;
  text-decoration: underline;
}

.nav-mobile-cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px clamp(14px, 4vw, 20px);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

/* ── TICKER BAR ─────────────────────────────────────────────── */

.ticker-bar {
  height: clamp(22px, 3vw, 26px);
}

.ticker-item {
  font-size: clamp(9px, 1.1vw, 10px);
  padding-right: clamp(30px, 5vw, 60px);
}

/* ── WORLD CLOCK ────────────────────────────────────────────── */

.world-clock {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.clock-city {
  min-width: clamp(72px, 12vw, 110px);
  padding: clamp(5px, 1vw, 8px) clamp(4px, 1vw, 6px);
}

.clock-city-name {
  font-size: clamp(8px, 0.9vw, 9px);
}

.clock-time {
  font-size: clamp(12px, 1.8vw, 16px);
}

.clock-date {
  font-size: clamp(8px, 0.8vw, 9px);
}

/* ── HERO ───────────────────────────────────────────────────── */

.hero {
  padding: var(--sp-hero) clamp(14px, 3vw, 24px);
  min-height: clamp(130px, 22vw, 240px);
}

.hero h1 {
  font-size: var(--fs-hero);
  margin-bottom: clamp(6px, 1.2vw, 10px);
  letter-spacing: clamp(-2px, -0.3vw, -1px);
}

.hero-tagline {
  font-size: clamp(11px, 1.3vw, 14px);
  margin-bottom: clamp(14px, 2.5vw, 24px);
}

.hero-cta-row {
  gap: clamp(10px, 2vw, 20px);
  flex-wrap: wrap;
}

.hero-cta {
  font-size: clamp(12px, 1.3vw, 13px);
  padding: clamp(5px, 0.8vw, 8px) clamp(12px, 2vw, 18px);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.hero-status {
  font-size: clamp(10px, 1.1vw, 11px);
}

/* ── STATUS BAR ─────────────────────────────────────────────── */

.status-bar-inner {
  padding: clamp(7px, 1.2vw, 10px) clamp(10px, 2vw, 16px);
  gap: clamp(10px, 2vw, 20px);
  flex-wrap: wrap;
}

.status-bar-item {
  font-size: clamp(9px, 1.1vw, 11px);
}

/* ── TWO-COLUMN LAYOUT ──────────────────────────────────────── */

.two-col {
  grid-template-columns: clamp(180px, 22vw, 240px) 1fr;
}

.sidebar {
  padding: clamp(12px, 2vw, 20px) clamp(10px, 1.5vw, 16px);
}

.sidebar-label {
  font-size: clamp(9px, 1vw, 10px);
}

.sidebar-links a {
  font-size: clamp(11px, 1.2vw, 12px);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.main-content {
  padding: clamp(14px, 2.5vw, 20px);
}

/* ── PRODUCT GRIDS ──────────────────────────────────────────── */

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(8px, 1.5vw, 12px);
  margin: clamp(12px, 2vw, 20px) 0;
}

.hp-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 28vw, 240px), 1fr));
}

.shop-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 28vw, 240px), 1fr));
}

/* ── HP SECTION HEADERS ─────────────────────────────────────── */

.hp-section-header {
  padding: clamp(10px, 1.8vw, 16px) clamp(14px, 2.5vw, 20px) clamp(8px, 1.5vw, 12px);
}

.hp-section-label {
  font-size: clamp(9px, 1vw, 10px);
}

.hp-section-link {
  font-size: clamp(10px, 1.1vw, 11px);
}

/* ── HP BRAND SIGNAL ────────────────────────────────────────── */

.hp-signal-item {
  padding: clamp(12px, 2vw, 18px) clamp(14px, 2.5vw, 20px);
}

.hp-signal-label {
  font-size: clamp(9px, 1vw, 10px);
}

.hp-signal-text {
  font-size: clamp(10px, 1.1vw, 11px);
}

/* ── FORUM CARDS ────────────────────────────────────────────── */

.hp-forum-card {
  padding: clamp(12px, 2vw, 16px) clamp(14px, 2.5vw, 20px);
}

.hp-forum-title {
  font-size: clamp(12px, 1.4vw, 13px);
}

.hp-forum-excerpt {
  font-size: clamp(10px, 1.1vw, 11px);
}

/* ── PAGE HEADER ────────────────────────────────────────────── */

.page-header {
  padding: clamp(14px, 2.5vw, 20px) clamp(14px, 2.5vw, 24px) clamp(10px, 2vw, 16px);
}

.page-header h2 {
  font-size: var(--fs-h2);
}

/* ── POST CARDS ─────────────────────────────────────────────── */

.post-title {
  font-size: clamp(13px, 1.4vw, 14px);
}

.post-body p {
  font-size: clamp(12px, 1.3vw, 13px);
}

/* ── CART OVERLAY ───────────────────────────────────────────── */

.cart-overlay {
  width: clamp(280px, 85vw, 340px);
}

/* ── PRODUCT DETAIL PAGE ────────────────────────────────────── */

.pd-wrapper {
  grid-template-columns: 1fr 1fr;
}

.pd-info {
  padding: clamp(16px, 3vw, 28px);
  gap: clamp(10px, 1.8vw, 16px);
}

.pd-name {
  font-size: clamp(18px, 3vw, 26px);
}

.pd-price {
  font-size: clamp(16px, 2.5vw, 20px);
}

.pd-gallery-inner {
  grid-template-columns: clamp(60px, 8vw, 80px) 1fr;
}

.pd-thumb-v {
  width: clamp(60px, 8vw, 80px);
  height: clamp(60px, 8vw, 80px);
}

.pd-size-btn {
  padding: clamp(6px, 1vw, 8px) clamp(12px, 2vw, 16px);
  font-size: clamp(11px, 1.2vw, 12px);
  min-height: 36px;
}

/* ── QUICK VIEW MODAL ───────────────────────────────────────── */

.qv-modal {
  width: min(90%, 720px);
  max-height: 90vh;
}

.qv-product-name {
  font-size: clamp(15px, 2vw, 18px);
}

.qv-product-price {
  font-size: clamp(14px, 1.8vw, 16px);
}

.qv-size-btn {
  min-height: 36px;
  padding: clamp(5px, 0.8vw, 6px) clamp(10px, 1.5vw, 12px);
}

/* ── ARCHIVE PAGE ───────────────────────────────────────────── */

.archive-grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(120px, 22vw, 200px), 1fr));
  border-left: 1px solid var(--border);
}

/* ── FOOTER ─────────────────────────────────────────────────── */

.site-footer {
  padding: clamp(8px, 1.5vw, 10px) clamp(10px, 2vw, 16px);
}

.footer-inner {
  font-size: clamp(10px, 1.2vw, 12px);
}

.footer-links {
  gap: clamp(10px, 2vw, 16px);
}

.footer-links a {
  font-size: clamp(10px, 1.2vw, 11px);
}

/* ── BUTTONS — TOUCH TARGETS ────────────────────────────────── */

.btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 1.3vw, 13px);
}

.btn-small {
  min-height: 28px;
  font-size: clamp(10px, 1.1vw, 11px);
}

/* ── FORM ELEMENTS ──────────────────────────────────────────── */

.form-input,
.form-select,
.form-textarea {
  font-size: max(13px, 1.3vw); /* prevent iOS zoom (must be ≥16px on mobile actually — handled below) */
}

/* ── ULTRAWIDE SUPPORT ──────────────────────────────────────── */

@media (min-width: 1440px) {
  :root {
    --site-max: min(1200px, 96vw);
  }

  .world-clock {
    justify-content: stretch;
  }

  .clock-city {
    min-width: 130px;
  }

  .hp-product-grid,
  .shop-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .archive-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1920px) {
  :root {
    --site-max: min(1400px, 96vw);
  }

  .two-col {
    grid-template-columns: 260px 1fr;
  }

  .hp-product-grid,
  .shop-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ── TABLET — 768px–1023px ──────────────────────────────────── */

@media (max-width: 1023px) {
  .nav-links {
    gap: clamp(6px, 1.5vw, 14px);
  }

  .two-col {
    grid-template-columns: clamp(160px, 25vw, 200px) 1fr;
  }

  .hp-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .shop-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pd-wrapper {
    grid-template-columns: 1fr 1fr;
  }

  .archive-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .qv-body {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── MOBILE BREAKPOINT — ≤768px ─────────────────────────────── */

@media (max-width: 768px) {
  /* Nav: hide links, show hamburger */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .site-nav > div {
    gap: 8px;
  }

  /* World clock: compact, scroll */
  .world-clock {
    display: flex;
  }

  .clock-city {
    min-width: 80px;
    padding: 6px 4px;
  }

  .clock-time {
    font-size: 13px;
  }

  .clock-city-name {
    font-size: 8px;
  }

  /* Hero */
  .hero {
    padding: clamp(18px, 4vw, 28px) clamp(14px, 3vw, 20px);
    min-height: clamp(140px, 28vw, 200px);
  }

  .hero h1 {
    font-size: clamp(26px, 8vw, 36px);
  }

  /* Two-col becomes single col */
  .two-col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: clamp(12px, 3vw, 16px);
  }

  /* Products: 2-col on tablet */
  .hp-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Product detail: stack */
  .pd-wrapper {
    grid-template-columns: 1fr;
  }

  .pd-gallery {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .pd-gallery-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .pd-thumbs-vertical {
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    order: 2;
  }

  .pd-thumb-v {
    border-bottom: none;
    border-right: 1px solid var(--border);
    width: 64px;
    height: 64px;
    flex-shrink: 0;
  }

  .pd-main-img {
    order: 1;
  }

  .pd-info {
    padding: clamp(16px, 3vw, 20px);
  }

  /* Quick-view: stack gallery + info */
  .qv-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .qv-gallery {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 50vw;
  }

  .qv-gallery-main {
    min-height: clamp(180px, 45vw, 260px);
  }

  /* Archive: 2-col */
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Cart: full width on mobile */
  .cart-overlay {
    width: 100%;
    left: 0;
    right: 0;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  /* Brand signal: stack */
  .hp-brand-signal {
    flex-direction: column;
  }

  .hp-signal-divider {
    width: 100%;
    height: 1px;
  }

  /* Community: stack */
  .hp-forum-grid {
    grid-template-columns: 1fr;
  }

  .hp-forum-card {
    border-right: none;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  /* Status bar */
  .status-bar-inner {
    gap: 8px;
  }

  .ticker-label {
    display: none;
  }

  /* Checkout two-col graceful */
  .two-col > .main-content {
    max-width: 100% !important;
  }
}

/* ── SMALL PHONES — ≤480px ──────────────────────────────────── */

@media (max-width: 480px) {
  .hero {
    min-height: clamp(120px, 30vw, 165px);
    padding: 16px 14px;
  }

  .hero h1 {
    font-size: clamp(24px, 9vw, 32px);
    margin-bottom: 6px;
  }

  .hero-tagline {
    font-size: 11px;
    margin-bottom: 14px;
  }

  .hero-cta {
    padding: 7px 14px;
    font-size: 12px;
  }

  /* Products: 1-col on small phones */
  .hp-product-grid {
    grid-template-columns: 1fr;
  }

  .hp-product-card {
    border-right: none;
  }

  .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Prevent skeletons overflowing */
  .hp-product-skeleton:nth-child(n+3) {
    display: none;
  }

  .main-content {
    padding: 12px;
  }

  .post-card {
    margin-bottom: 10px;
  }

  /* Archive: 1-col on tiny */
  .archive-grid {
    grid-template-columns: 1fr;
  }

  /* Sidebar more compact */
  .sidebar {
    padding: 12px;
  }

  .sidebar-section {
    margin-bottom: 16px;
  }

  /* Form: prevent iOS zoom */
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* prevents iOS auto-zoom on focus */
  }

  /* Quick-view full screen feel */
  .qv-modal {
    width: 96%;
    max-height: 88vh;
  }

  /* Product detail */
  .pd-name {
    font-size: clamp(17px, 5.5vw, 22px);
  }

  .pd-price {
    font-size: clamp(15px, 4.5vw, 18px);
  }

  /* Popup boxes */
  .popup-box,
  .region-box {
    width: 94%;
  }

  /* Clock: fewer visible, still scrollable */
  .clock-city {
    min-width: 72px;
  }

  .hp-section-header {
    padding: 10px 12px 8px;
  }

  .hp-products-footer,
  .hp-community-footer {
    padding: 10px 12px;
  }

  /* Admin form grid */
  .admin-product-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-img-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── EXTRA SMALL — ≤375px ───────────────────────────────────── */

@media (max-width: 375px) {
  .hero h1 {
    font-size: clamp(21px, 10vw, 26px);
  }

  .nav-links {
    display: none; /* already hidden by hamburger */
  }

  .clock-city {
    min-width: 66px;
  }

  .clock-time {
    font-size: 12px;
  }

  .shop-product-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .hp-forum-card {
    padding: 12px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}

/* ── 320px edge case ────────────────────────────────────────── */

@media (max-width: 320px) {
  :root {
    --fs-hero: 20px;
  }

  .site-nav {
    padding: 5px 10px;
  }

  .hero {
    padding: 14px 10px;
  }

  .hero h1 {
    font-size: 20px;
  }

  .region-chip {
    display: none; /* too crowded at 320px */
  }

  .world-clock {
    display: none; /* too cramped, omit for 320 */
  }
}

/* ── CHECKOUT PAGE — RESPONSIVE ─────────────────────────────── */

.checkout-city-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .checkout-city-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ── FORUM PAGE — RESPONSIVE ────────────────────────────────── */

.forum-two-col {
  display: grid;
  grid-template-columns: clamp(160px, 22vw, 220px) 1fr;
}

@media (max-width: 768px) {
  .forum-two-col {
    grid-template-columns: 1fr;
  }
}

/* Ensure inline style city/state grids are responsive */
[style*="grid-template-columns:1fr 1fr"],
[style*="grid-template-columns: 1fr 1fr"] {
  /* override inline styles on small screen */
}

@media (max-width: 400px) {
  /* Target checkout city/zip inline grid */
  .post-body > div[style*="grid-template-columns"] {
    display: flex;
    flex-direction: column;
  }
}

/* ── ADMIN PAGE — RESPONSIVE ────────────────────────────────── */

@media (max-width: 900px) {
  .admin-product-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-modal-wide {
    max-width: 95vw !important;
    width: 95vw !important;
  }
}

/* ── SAFE AREA SUPPORT (iPhone notch, etc.) ─────────────────── */

@supports (padding: env(safe-area-inset-bottom)) {
  .cart-overlay {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .site-nav {
    padding-left: max(clamp(10px, 2vw, 16px), env(safe-area-inset-left));
    padding-right: max(clamp(10px, 2vw, 16px), env(safe-area-inset-right));
  }

  .nav-mobile-drawer {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-footer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

/* ── PREFERS-REDUCED-MOTION ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-track {
    animation: none !important;
  }

  .status-dot {
    animation: none !important;
  }

  .skeleton-shimmer,
  .hp-product-skeleton {
    animation: none !important;
    background: var(--inset-bg) !important;
  }
}

/* ── PRINT MEDIA ────────────────────────────────────────────── */

@media print {
  .site-nav,
  .ticker-bar,
  .world-clock,
  .cart-overlay,
  .nav-mobile-drawer,
  .region-overlay,
  #region-overlay {
    display: none !important;
  }

  .site-wrapper {
    max-width: 100%;
    border: none;
  }
}

/* ── FIXES: overflow, z-index, spacing ──────────────────────── */

/* Ensure region overlay and modals don't cause scroll */
#region-overlay,
.qv-backdrop,
.modal-backdrop,
.popup-backdrop {
  overflow: hidden;
}

/* Fix toast position on mobile */
@media (max-width: 480px) {
  .toast {
    width: 90%;
    bottom: 16px;
    text-align: center;
  }
}

/* Fix admin image preview on narrow screens */
@media (max-width: 600px) {
  .admin-img-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ensure images never exceed container */
img {
  max-width: 100%;
  height: auto;
}

/* Fix product info on very small cards */
.hp-product-info,
.shop-product-info {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Fix text overflow on post cards */
.post-title,
.hp-forum-title {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Table horizontal scroll on mobile */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 480px;
}

/* Checkout two-col override */
@media (max-width: 768px) {
  .two-col > main.main-content {
    max-width: 100% !important;
  }
}


/* ── MOBILE DRAWER BODY SHIFT ───────────────────────────────── */

/* When mobile drawer is open, push content down */
body:has(.nav-mobile-drawer.open) .site-wrapper {
  /* Modern browsers: shift wrapper down */
}

/* Ensure site-wrapper doesn't clip mobile drawer */
.site-wrapper {
  position: relative;
}

/* ── STICKY NAV HEIGHT VARIABLE ─────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Mobile drawer sits below sticky nav */
.nav-mobile-drawer {
  top: 0;
  padding-top: var(--nav-h, 40px);
  position: fixed;
  z-index: 98;
}

/* ── FILTER BAR RESPONSIVE (shop page) ─────────────────────── */

@media (max-width: 480px) {
  /* The inline-styled filter bar on shop page */
  [style*="padding:10px 16px"][style*="border-bottom"] {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* ── FORUM TWO-COL — responsive ─────────────────────────────── */

/* Forum page uses .two-col for its layout; already handled above */
/* Extra specificity for forum's sidebar content */
@media (max-width: 768px) {
  .forum-panel {
    border-top: 1px solid var(--border);
  }
}

/* ── WORLD CLOCK: DESKTOP STRETCH ───────────────────────────── */

@media (min-width: 769px) {
  .world-clock {
    /* On larger screens distribute evenly */
    justify-content: stretch;
  }

  .clock-city {
    flex: 1;
    min-width: 0;
  }
}

/* ── QV MODAL: GALLERY MIN-HEIGHT FLUID ─────────────────────── */

.qv-gallery-main {
  min-height: clamp(200px, 35vw, 340px);
}

/* ── PRODUCT DETAIL: GALLERY HEIGHT ─────────────────────────── */

.pd-main-img {
  min-height: clamp(280px, 40vw, 560px);
}

/* ── ADMIN NAV ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Admin has its own nav; make it scroll horizontally if needed */
  .admin-nav, [class*="admin"] nav, .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}


/* ============================================================
   FINAL RESPONSIVE PASS — Complete coverage
   All remaining breakpoints, admin, forum media, edge cases
   ============================================================ */

/* ── ADMIN PANEL — full responsive system ─────────────────── */

/* Admin mobile topbar toggle button */
.admin-mobile-toggle {
  display: none;
  background: #333;
  color: #ccc;
  border: none;
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.admin-mobile-toggle:hover { background: #444; color: #fff; }

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr !important;
  }

  .admin-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: min(260px, 80vw);
    height: 100vh;
    overflow-y: auto;
    z-index: 500;
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
  }

  .admin-sidebar.mobile-open {
    display: block;
  }

  .admin-mobile-toggle {
    display: inline-block;
  }

  .admin-topbar {
    padding: 8px 14px;
    gap: 10px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Dashboard two-col cards → single col */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .admin-content {
    padding: 14px;
  }

  .admin-img-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }

  .stat-value {
    font-size: 22px !important;
  }

  .admin-content {
    padding: 10px;
  }

  .admin-img-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-modal-wide {
    max-width: 98vw !important;
    width: 98vw !important;
  }

  .modal {
    width: 96% !important;
  }
}

/* Admin sidebar overlay when open on mobile */
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 499;
}
.admin-sidebar-overlay.visible { display: block; }

/* ── FORUM PAGE — media & post card responsive ────────────── */

@media (max-width: 600px) {
  /* Image grids in posts: max 2 cols */
  .post-media-image-grid.count-3 {
    grid-template-columns: 1fr 1fr !important;
  }

  .post-media-image-grid img {
    height: clamp(120px, 40vw, 200px);
  }

  /* Audio player: tighter */
  .post-media-audio-player {
    padding: 10px;
    gap: 8px;
  }

  /* Forum sidebar → moved above main on mobile */
  .two-col {
    display: flex;
    flex-direction: column;
  }

  .two-col > aside.sidebar {
    order: -1;
  }
}

/* ── HERO — dark overlay text always readable ─────────────── */

/* Ensure hero content text has enough contrast at all sizes */
.hero-content {
  max-width: min(600px, 90vw);
}

/* ── CHECKOUT — order summary sidebar responsive ──────────── */

@media (max-width: 768px) {
  /* Checkout: swap sidebar (order summary) above form */
  .two-col aside.sidebar[style*="border-left"] {
    order: -1;
    border-left: none !important;
    border-bottom: 1px solid var(--border);
  }
}

/* ── NAVIGATION — close drawer on backdrop click ──────────── */

/* Invisible backdrop behind mobile drawer */
.nav-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 97;
  background: transparent;
}
.nav-drawer-backdrop.visible { display: block; }

/* ── PRODUCT CARDS — consistent height for grids ─────────── */

/* Ensure product cards in flex/grid rows have equal height */
.hp-product-grid,
.shop-product-grid {
  align-items: stretch;
}

/* ── SCARCITY BADGE — always readable on mobile ───────────── */

.hp-product-badge,
.shop-product-badge {
  font-size: clamp(8px, 1vw, 9px);
  padding: clamp(2px, 0.3vw, 3px) clamp(5px, 0.8vw, 7px);
}

/* ── QUICK VIEW — full mobile experience ──────────────────── */

@media (max-width: 480px) {
  .qv-modal {
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
    border-left: none;
    border-right: none;
    border-bottom: none;
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    transform: none;
    border-radius: 0;
  }

  /* Re-center the backdrop for the bottom-sheet modal */
  .qv-backdrop.open {
    align-items: flex-end;
  }

  .qv-gallery-main {
    min-height: clamp(160px, 50vw, 220px);
  }

  .qv-info {
    padding: 14px;
    gap: 10px;
  }

  .qv-product-name {
    font-size: 16px;
  }
}

/* ── WORLD CLOCK — hide on tiny phones ───────────────────── */

@media (max-width: 360px) {
  .world-clock {
    display: none;
  }
}

/* ── TICKER — reduce speed signal on mobile ──────────────── */
/* (handled via JS, CSS ensures no reflow) */
.ticker-bar {
  contain: strict;
}

/* ── REGION OVERLAY — always readable ───────────────────── */

.region-box {
  width: min(400px, 94vw);
}

.region-headline {
  font-size: clamp(15px, 4vw, 18px);
}

/* ── PAGE HEADER — consistent padding ───────────────────── */

@media (max-width: 480px) {
  .page-header {
    padding: 12px 14px 10px;
  }

  .page-header h2 {
    font-size: clamp(16px, 5.5vw, 20px);
  }

  .breadcrumb {
    font-size: 10px;
  }
}

/* ── FILTER BAR (shop) — scrollable on small screens ─────── */

.filter-bar-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.filter-bar-wrap::-webkit-scrollbar { display: none; }

/* Fallback: original inline style filter bar  */
@media (max-width: 480px) {
  /* Target the shop filter bar by its siblings */
  #shop-grid-wrap + * {
    overflow-x: auto;
  }
}

/* ── BUTTON TOUCH TARGETS ─────────────────────────────────── */

@media (max-width: 768px) {
  .btn {
    min-height: 38px;
    padding: clamp(7px, 1.5vw, 8px) clamp(14px, 3vw, 18px);
  }

  .btn-small {
    min-height: 32px;
    padding: 6px 10px;
  }

  /* Size buttons in QV / PD */
  .qv-size-btn,
  .pd-size-btn {
    min-height: 40px;
    padding: 8px 14px;
  }

  /* Region buttons */
  .region-btn {
    min-height: 44px;
    padding: 12px 14px;
  }
}

/* ── CART ITEM — readable on all sizes ───────────────────── */

@media (max-width: 380px) {
  .cart-item-meta {
    flex-direction: column;
    gap: 2px;
  }
}

/* ── EMPTY STATE — centered always ──────────────────────── */

.empty-state {
  padding: clamp(24px, 5vw, 48px) clamp(14px, 3vw, 24px);
}

.empty-state-title {
  font-size: clamp(15px, 3.5vw, 18px);
}

/* ── FOOTER — consistent across breakpoints ──────────────── */

@media (max-width: 380px) {
  .footer-links {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }

  .footer-tag {
    display: none; /* too cramped at 320px */
  }
}

/* ── PRODUCT DETAIL — min-height fix ────────────────────── */

@media (max-width: 768px) {
  .pd-main-img {
    min-height: clamp(240px, 70vw, 400px);
    aspect-ratio: 3/4;
  }
}

/* ── FORM — consistent field sizing ─────────────────────── */

.form-group {
  margin-bottom: clamp(10px, 2vw, 14px);
}

.form-label {
  font-size: clamp(10px, 1.2vw, 12px);
}

/* ── POPUP BOXES — usable on tiny screens ─────────────── */

@media (max-width: 480px) {
  .popup-box {
    width: 96%;
  }

  .popup-body p {
    font-size: 13px;
  }

  .popup-body p[style*="font-size:16px"] {
    font-size: 15px !important;
  }
}

/* ── SIDEBAR SECTIONS — spacing ─────────────────────────── */

@media (max-width: 768px) {
  .sidebar-section {
    margin-bottom: clamp(12px, 2.5vw, 20px);
  }
}

/* ── BRAND MISSION BOX — sidebar ────────────────────────── */

.brand-mission {
  margin: 0 0 clamp(12px, 2vw, 24px) 0;
}

@media (max-width: 768px) {
  .brand-mission {
    padding: 10px;
    font-size: 12px;
  }
}

/* ── ARCHIVE HERO ────────────────────────────────────────── */

@media (max-width: 480px) {
  .archive-hero {
    padding: 14px;
  }

  .archive-hero h2 {
    font-size: clamp(16px, 5vw, 20px);
  }

  .archive-drop-header {
    padding: 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .archive-card-info {
    padding: 8px 10px 10px;
  }

  .archive-card-name {
    font-size: 11px;
  }
}

/* ── DATA TABLE — horizontal scroll wrapper ──────────────── */

/* Applied via JS or manually in admin */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
}

.table-scroll .data-table {
  min-width: 520px;
  border: none;
}

/* ── SITE WRAPPER — no horizontal bleed ─────────────────── */

.site-wrapper {
  overflow-x: clip; /* stronger than hidden — doesn't affect position:fixed */
}

/* ── TICKER — contain layout ────────────────────────────── */

.ticker-track-wrap {
  overflow: hidden;
  max-width: 100%;
}

/* ── MEDIA QUERIES — surface size targets ────────────────── */

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1023px) {
  .hp-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .shop-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .two-col {
    grid-template-columns: 190px 1fr;
  }

  .hero h1 {
    font-size: clamp(32px, 5vw, 44px);
  }
}

/* Large desktop */
@media (min-width: 1280px) {
  .hp-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .archive-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Ultrawide / 4K */
@media (min-width: 2560px) {
  :root {
    --site-max: min(1600px, 90vw);
    font-size: 16px;
  }

  .clock-time {
    font-size: 20px;
  }

  .hero h1 {
    font-size: clamp(48px, 4vw, 72px);
  }
}

