:root {
  --bg: #ffffff;
  --surface: #f6f6f4;
  --text: #141414;
  --muted: #707070;
  --border: #e6e6e3;
  --btn-bg: #141414;
  --btn-text: #ffffff;
  --warn: #fdf3dc;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1c1c1c;
    --text: #f1f1ef;
    --muted: #9a9a96;
    --border: #2c2c2b;
    --btn-bg: #f1f1ef;
    --btn-text: #121212;
    --warn: #3a3120;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header & footer */
.site-header { border-bottom: 1px solid var(--border); }
/* Full-width header: links left, logo centred, cart right. */
.site-header .container {
  max-width: none;
  padding: 0 clamp(16px, 3vw, 40px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.logo { font-weight: 700; font-size: 1.35rem; letter-spacing: 0.01em; text-decoration: none; }
.header-left { display: flex; align-items: center; gap: 28px; justify-self: start; }
.header-center { justify-self: center; }
.header-right { display: flex; align-items: center; gap: 28px; justify-self: end; }
.header-currency { font-size: 0.95rem; letter-spacing: 0.02em; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text) !important;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }
.header-right { gap: 18px; }
.cart-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}
.site-header { position: relative; }
.search-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06); }
.search-inner { max-width: 640px; margin: 0 auto; padding: 18px 16px 20px; }
.search-inner input { width: 100%; font: inherit; padding: 11px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); }
.search-results { list-style: none; margin: 10px 0 0; padding: 0; }
.search-results a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.search-results a:hover { background: var(--surface); }
.search-results img { width: 44px; height: 56px; object-fit: contain; }
.search-results strong { display: block; font-weight: 500; }
.search-results small { color: var(--muted); }
.search-empty { padding: 10px 8px; color: var(--muted); }
.header-left a, .header-right a { text-decoration: none; color: var(--muted); font-size: 0.95rem; white-space: nowrap; }
.header-left a:hover, .header-right a:hover, .header-left a[aria-current="page"], .header-right a[aria-current="page"] { color: var(--text); }
.page-select {
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 900px) {
  /* Logo on its own row, links and cart below it. */
  .site-header .container { grid-template-columns: 1fr auto; height: auto; padding-top: 14px; padding-bottom: 14px; row-gap: 12px; }
  .header-center { grid-column: 1 / -1; grid-row: 1; }
  .header-left { gap: 10px 18px; flex-wrap: wrap; }
  .header-right { align-self: start; padding-top: 6px; }
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 96px;
  padding: 28px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--text); }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link:hover { color: var(--text); }

/* Home */
.hero { padding: 80px 0 64px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.hero p { color: var(--muted); margin: 12px auto 28px; max-width: 460px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 1rem; font-weight: 600; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.card-link { text-decoration: none; display: block; }
.card-media {
  background: var(--surface);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-media img, .card-media canvas { height: 92%; width: auto; max-width: 100%; object-fit: contain; transition: transform 0.3s ease; }
.card-link:hover .card-media img, .card-link:hover .card-media canvas { transform: scale(1.03); }
.card-media.loading { opacity: 0.6; }
.card-body { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; font-size: 0.92rem; }
.card-title { font-weight: 500; }
.card-sub { color: var(--muted); font-size: 0.85rem; }

.empty { text-align: center; color: var(--muted); padding: 64px 0; }

/* Tag filter buttons on each shop page */
.tag-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 24px; }
.chip {
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.chip:hover { border-color: var(--muted); }
.sub-filter {
  font: inherit;
  font-size: 0.9rem;
  min-width: 220px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }

.cta-band { margin-top: 96px; padding: 56px 24px; background: var(--surface); border-radius: var(--radius); text-align: center; }
.cta-band h2 { margin: 0 0 8px; font-weight: 600; font-size: 1.4rem; }
.cta-band p { margin: 0 0 24px; color: var(--muted); }

/* Product page */
.back { display: inline-block; margin: 28px 0; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.stage {
  background: var(--surface);
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.stage canvas { display: block; max-width: 100%; max-height: 78vh; height: auto; }
.stage canvas[hidden] { display: none; }

/* Front / back cover slides */
.cover-slides { position: relative; padding-bottom: 44px; }
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.slide-arrow:hover { border-color: var(--text); }
.slide-arrow[hidden] { display: none; }
.slide-prev { left: 14px; }
.slide-next { right: 14px; }
.slide-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.slide-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--border); cursor: pointer; }
.slide-dots button[aria-current="true"] { background: var(--text); }
.product-info h1 { font-size: 1.8rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.price { font-size: 1.15rem; margin: 0 0 32px; }
.label { font-size: 0.85rem; color: var(--muted); margin: 0 0 10px; }
.label strong { color: var(--text); font-weight: 500; }
.details { margin: 32px 0 0; padding: 24px 0 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.details ul { margin: 0; padding-left: 18px; }
.note { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }

.buy-row { display: flex; gap: 12px; margin-top: 28px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.qty button { width: 38px; height: 44px; background: none; border: 0; font: inherit; font-size: 1.1rem; color: var(--text); cursor: pointer; }
.qty span { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.buy-row .btn { flex: 1; }

/* Swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  outline-offset: 3px;
}
.swatch { background: var(--c); }
.swatch[aria-checked="true"] { outline: 1.5px solid var(--text); }
/* Felt colours: the same hue with soft light/dark patches, like the material. */
.swatch-felt {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 45%),
    radial-gradient(circle at 70% 72%, rgba(0, 0, 0, 0.22), transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(0, 0, 0, 0.12), transparent 35%),
    var(--c);
}
/* Colour wheel swatch: rainbow ring, with the picked colour shown in the centre once chosen. */
.swatch-wheel {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background:
    radial-gradient(circle, var(--pick, transparent) 0 42%, transparent 44%),
    conic-gradient(#f44, #fd3, #4d4, #3dd, #45f, #d4d, #f44);
}
.swatch-wheel input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.swatch-wheel:focus-within { outline: 1.5px solid var(--muted); }
.swatch-wheel[aria-checked="true"] { outline: 1.5px solid var(--text); }
.swatches-sm { gap: 8px; margin-top: 10px; }
.swatches-sm .swatch { width: 18px; height: 18px; outline-offset: 2px; }

/* Binder type picker */
.type-options { display: flex; flex-direction: column; gap: 8px; }
.type-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
}
.type-option:hover { border-color: var(--muted); }
.type-option[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.type-option .ratio { color: var(--muted); font-size: 0.82rem; }
.type-row { display: flex; align-items: center; gap: 12px; }
.type-row .type-option { flex: 1; min-width: 0; }
.type-price { flex: none; min-width: 48px; text-align: right; font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.finish-field { margin: 14px 0 0; }
.panel .finish-field { margin: 0; }
.product-info .finish-field { margin: 0 0 16px; max-width: 260px; }
.fixed-value {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: default;
}

/* Cart */
.page-title { font-size: 1.8rem; font-weight: 600; letter-spacing: -0.01em; margin: 48px 0 32px; }
.cart { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.cart-lines { border-top: 1px solid var(--border); }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--border); }
.cart-thumb { background: var(--surface); border-radius: 8px; display: flex; justify-content: center; padding: 6px; }
.cart-thumb canvas { width: 100%; height: auto; }
.cart-line .name { font-weight: 500; text-decoration: none; }
.cart-line .meta { color: var(--muted); font-size: 0.85rem; }
.cart-line .line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.summary { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.summary-row.total { font-weight: 600; font-size: 1.1rem; margin: 16px 0 20px; }

/* Forms (Custom Designs & admin) */
.panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.panel .group + .group { margin-top: 28px; }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--text); background: var(--surface); }
.dz-main { font-weight: 500; }
.dz-hint { font-size: 0.85rem; color: var(--muted); }
.file-info { margin-top: 10px; font-size: 0.85rem; padding: 8px 12px; border-radius: 8px; background: var(--surface); }
.file-info.warn, .warn-text { background: var(--warn); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 0.9rem; }
.field input, .field select {
  font: inherit;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.check { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; cursor: pointer; }
.check input { accent-color: var(--text); }

.designer { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; }
.designer .panel { position: sticky; top: 24px; }
.designer .stage { min-height: 60vh; }
.custom-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin: 20px 4px 0; }
.custom-buy-summary { display: flex; align-items: baseline; gap: 14px; font-size: 0.92rem; }
.custom-buy-price { font-size: 1.15rem; }
.custom-buy-row { display: flex; gap: 10px; align-items: stretch; }
.custom-buy-row .btn { min-width: 180px; }
.custom-buy-note { margin: 0; text-align: right; }
.custom-buy-note a { color: var(--text); }
.preview-note { margin: 12px 4px 0; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }
.intro { margin: 48px 0 32px; }
.intro h1 { font-size: 1.8rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.intro p { margin: 0; color: var(--muted); }
.intro p + p { margin-top: 4px; }
.intro p a { color: var(--text); text-underline-offset: 3px; }
.intro p a:hover { opacity: 0.7; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.queue-item, .admin-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.queue-item canvas, .admin-item img { width: 100%; height: auto; background: var(--surface); border-radius: 8px; }
.queue-item .field { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.queue-item > .link { align-self: flex-start; }
.field-row input { width: 100%; }
.admin-item .row { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.admin-item canvas { width: 100%; height: auto; background: var(--surface); border-radius: 8px; }
.admin-item .field { margin: 0; }
.admin-item .field input, .admin-item .field select { width: 100%; }
.admin-item .btn { padding: 8px 20px; }
.admin-item .status { margin: 0; }
.status { font-size: 0.9rem; margin: 12px 0 0; }
.pages-panel, .discount-panel { margin-bottom: 24px; }
.pages-panel .note, .discount-panel .note { margin: 0 0 14px; }
.page-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.page-block { padding: 12px 0 14px; border-bottom: 1px solid var(--border); }
.page-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; }
.page-name { font-weight: 600; }
.sub-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-left: 16px; border-left: 2px solid var(--border); }
.sub-list .tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; padding: 3px 4px 3px 10px; }
.tag-remove { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }
.tag-remove:hover { color: var(--text); }
.add-sub { display: inline-flex; gap: 6px; }
.add-sub input { font: inherit; font-size: 0.82rem; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); width: 190px; }
.btn-sm { padding: 4px 14px; font-size: 0.82rem; }
.page-picker { display: flex; flex-direction: column; gap: 10px; }
.sub-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sub-checks .sub-check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 0.88rem; cursor: pointer; }
.sub-check input { accent-color: var(--text); }
.add-page { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.add-page input {
  flex: 1;
  min-width: 200px;
  font: inherit;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.tag-hint { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.tag-hint.warn-text { color: inherit; padding: 4px 8px; border-radius: 6px; }
.field label { display: flex; flex-direction: column; gap: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.admin-gate:not(.admin-ok) { visibility: hidden; }
.status.error { color: #c0392b; }

/* Admin header button (Messages) */
.header-right a.header-button {
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}
.header-right a.header-button:hover { border-color: var(--text); }
.header-right a.header-button[aria-current="page"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }

/* Admin: contact messages */
.message-list { display: flex; flex-direction: column; gap: 12px; }
.message { border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; }
.message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: 0.92rem; }
.message-head a { color: var(--text); }
.message-head time { margin-left: auto; font-size: 0.82rem; }
.message p { margin: 10px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message .link { font-size: 0.85rem; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .product, .cart, .designer { grid-template-columns: 1fr; gap: 32px; }
  .designer .panel { position: static; }
  .designer .preview-col { order: -1; }
  .designer .stage { min-height: 0; }
}

@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .header-left a, .header-right a { font-size: 0.88rem; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 44px; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line .line-right { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Sale prices: crossed-out original, sale price, "-20%" badge */
.price-was { color: var(--muted); font-weight: 400; }
.price-now { color: #c0392b; font-weight: 600; }
.sale-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.72em;
  font-weight: 600;
  vertical-align: 0.15em;
  white-space: nowrap;
}
.card-price { text-align: right; white-space: nowrap; }
.card-price.on-sale { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.search-price.on-sale .price-was { display: none; }
.discount-form { align-items: center; }
.discount-input { display: flex; align-items: center; gap: 8px; }
.discount-input input { width: 100px; }
.discount-form .banner-text-input { flex: 1; min-width: 220px; }
.banner-note { margin: 10px 0 0; }

/* Sale banner under the header (home page, while a storewide discount is on) */
.sale-banner {
  overflow: hidden;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.sale-banner-track {
  display: inline-flex;
  width: max-content;
  padding: 10px 0;
  animation: sale-banner-glide var(--banner-duration, 24s) linear infinite;
}
.sale-banner:hover .sale-banner-track { animation-play-state: paused; }
.sale-banner-track span { padding: 0 32px; }
.sale-banner-track span::after { content: "✦"; margin-left: 64px; opacity: 0.6; }
@keyframes sale-banner-glide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .sale-banner { text-align: center; }
  .sale-banner-track { animation: none; width: auto; display: block; }
  .sale-banner-track span:not(:first-child) { display: none; }
  .sale-banner-track span::after { content: none; }
}
input.own-discount:disabled { background: var(--surface); color: var(--muted); cursor: not-allowed; }

/* Contact page */
.contact { max-width: 820px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 64px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input,
.contact-form textarea,
.auth-form input {
  width: 100%;
  font: inherit;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.contact-form textarea { resize: vertical; min-height: 200px; }
.auth-form input::placeholder,
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }
.auth-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--text); }
.contact-form [aria-invalid="true"],
.auth-form [aria-invalid="true"] { border-color: #c0392b; }

/* Checkout delivery details (cart page) */
.cart-main { min-width: 0; }
.checkout-details { margin-top: 32px; }
.checkout-details h2 { font-size: 1rem; font-weight: 600; margin: 0 0 4px; }
.contact-pick { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.details-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-pick select {
  font: inherit;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
@media (max-width: 600px) {
  .details-row { grid-template-columns: 1fr; }
  .contact-pick { grid-template-columns: 110px 1fr; }
}

/* Log in / sign up */
.auth { max-width: 440px; }
.orders { margin-top: 40px; }
.orders h2 { font-size: 1rem; font-weight: 600; margin: 0 0 14px; }
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 0.92rem; }
.order-head { display: flex; align-items: baseline; gap: 12px; }
.order-status { margin-left: auto; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: var(--surface); }
.order ul { margin: 10px 0; padding-left: 18px; }
.order-total { color: var(--muted); font-size: 0.88rem; }
.order-placed { margin: 0 auto; max-width: 560px; }
.order-pay { margin-top: 10px; }

/* PayNow payment page */
.pay { max-width: 920px; }
.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-bottom: 64px; }
.pay-qr { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.pay-qr img { display: block; width: 100%; height: auto; }
.pay-amount { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 10px; background: var(--surface); }
.pay-amount strong { font-size: 1.6rem; }
.pay-steps ol { margin: 20px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.proof-form { display: flex; flex-direction: column; gap: 12px; }
.proof-drop { padding: 22px 16px; }
.proof-preview { display: block; max-width: 100%; max-height: 280px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.admin-order-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
@media (max-width: 700px) {
  .pay-layout { grid-template-columns: 1fr; gap: 24px; }
}
.order-placed p + p { margin-top: 8px; }
.auth .intro { margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .btn { margin-top: 8px; }
.auth-forgot { align-self: flex-end; font-size: 0.85rem; }
.auth-reason { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 0.92rem; }
.auth-switch { margin: 20px 0 0; font-size: 0.92rem; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--text); }
.auth-panel { padding: 20px; border: 1px solid var(--border); border-radius: 10px; }
.auth-panel p { margin: 0; }
.auth-panel a:not(.btn) { color: var(--text); }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.auth-notice { margin: 20px 0 0; padding: 14px 16px; border-radius: 10px; background: #fdf3dc; color: #6b4e00; font-size: 0.9rem; }
.auth-notice code { font-size: 0.85em; }
.auth .status { text-align: center; }
.auth ~ .site-footer, .auth + .site-footer { margin-top: 64px; }
.contact-form .btn { min-width: 140px; }
@media (max-width: 600px) {
  .contact-row { grid-template-columns: 1fr; }
}

/* Admin: orders */
.orders-head { align-items: center; }
.admin-orders { display: flex; flex-direction: column; gap: 14px; margin-bottom: 64px; }
.admin-order { border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; font-size: 0.92rem; }
.admin-order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.admin-order-head .order-status-select { margin-left: auto; font: inherit; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.admin-order-customer { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.admin-order-customer a { color: var(--text); }
.admin-order-items { list-style: none; margin: 12px 0; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.admin-order-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.admin-order-items li .btn { margin-left: auto; }
.admin-order-total { font-weight: 600; }

/* Small phones: keep all header icons on screen (the SGD label is display-only, so it's hidden). */
@media (max-width: 480px) {
  .header-right { gap: 2px; }
  .header-currency { display: none; }
}
