/* Supplyline Wargames — draft store styles
   Warm, practical, clean. Not Pattern / 33rd branding. */

:root {
  --bg: #f5f0e8;
  --bg-card: #fffcf7;
  --bg-muted: #ebe4d8;
  --text: #2c2a26;
  --text-muted: #5c574e;
  --accent: #2f5d4a;
  --accent-hover: #244a3b;
  --accent-soft: #e4efe9;
  --border: #d4cbb8;
  --shadow: 0 1px 3px rgba(44, 42, 38, 0.08);
  --radius: 8px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1248px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

/* Header / nav */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--accent);
}

.brand span {
  color: var(--accent);
  font-weight: 600;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

.ship-banner {
  background: var(--accent);
  color: #f7faf8;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--accent-hover);
}

/* Layout */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 0.5rem 0 1.75rem;
}

.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero .lede {
  margin: 0 0 1.25rem;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

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

.btn-secondary {
  background: transparent;
  color: var(--accent) !important;
  border: 1.5px solid var(--accent);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover) !important;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  margin-top: 2.5rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.section p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

/* How it works steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1.75rem;
  text-align: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
}

/* Category / product cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.card .card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.card .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
}

/* Note / callout */
.note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-size: 0.95rem;
  margin: 1.25rem 0 0;
}

.note p {
  margin: 0;
  color: var(--text);
}

.note ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--text);
}

.note li {
  margin-bottom: 0.25rem;
}

/* Contact tips */
.tips {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-top: 1.5rem;
}

.tips h2 {
  margin-top: 0;
}

.tips ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.tips li {
  margin-bottom: 0.35rem;
}

/* Fake form fields (display only — do not submit) */
.enquiry-hints {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font: inherit;
  color: var(--text-muted);
}

.field textarea {
  min-height: 5rem;
  resize: vertical;
}

.form-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Option lists inside product cards */
.card-grid--trays {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card .option-label {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  flex: 0;
}

.card .option-list {
  margin: 0.15rem 0 0.25rem;
  padding-left: 1.15rem;
  color: var(--text);
  font-size: 0.95rem;
  flex: 1;
}

.card .option-list li {
  margin-bottom: 0.2rem;
}

.card strong {
  color: var(--text);
  font-weight: 600;
}



/* Product code tables */
.card--wide {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.code-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.code-table th,
.code-table td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.code-table th {
  background: var(--bg-muted);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.code-table tr:last-child td {
  border-bottom: none;
}

.code-table code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  white-space: nowrap;
}

.pack-note {
  color: var(--text-muted);
  font-size: 0.9em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tips code,
.note code,
p code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Utility */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

@media (max-width: 520px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}


.card-price {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text, #e8e6e3);
}
.card-price .price-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted, #9a958c);
}


/* Per-code mailto links */
a.code-link {
  text-decoration: none;
}
a.code-link:hover code,
a.code-link:focus code {
  background: var(--accent);
  color: #fff;
}
a.enquire-link {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
a.enquire-link:hover {
  text-decoration: underline;
}
.code-table td:last-child {
  white-space: nowrap;
}

/* Product photo grid (40 mm trays) */
.photo-disclaimer {
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

.product-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.25rem;
}

.product-photo {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-muted);
}

.product-photo figcaption {
  padding: 0.55rem 0.75rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.product-photo figcaption code {
  font-size: 0.82rem;
}

.product-photo .photo-note {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

@media (max-width: 480px) {
  .product-photos {
    grid-template-columns: 1fr;
  }
}

.product-photo--card {
  margin-bottom: 0.9rem;
  box-shadow: none;
}

/* Keep meta/disclaimer lines from stretching when a card is taller (e.g. card with photo) */
.card .card-meta,
.card .photo-disclaimer {
  flex: 0 0 auto;
}

/* Coaster cards: denser photo strip inside a normal product card */
.product-photos--coaster {
  margin: 0.75rem 0 1rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.product-photos--coaster img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Click-to-enlarge product photos */
.product-photos img,
.product-photo img,
.product-photo--card img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 12, 14, 0.88);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  cursor: default;
  background: #111;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  opacity: 0.85;
}

.lightbox-close:hover,
.lightbox-close:focus {
  opacity: 1;
}

body.lightbox-open {
  overflow: hidden;
}

.card-photo-link { display: block; }
.card-photo-link img { cursor: pointer; }
