/* Von Norten Trade — portal styles
   Brand variables centralised here; adjust to match brand guidelines exactly. */
:root {
  --vn-bg: #faf2e2;          /* Von Norten creme white */
  --vn-surface: #fffcf4;     /* lighter creme for cards */
  --vn-ink: #26241f;         /* soft near-black text */
  --vn-muted: #91876f;
  --vn-line: #e9dfc8;
  --vn-blue: #a4b5cb;        /* Von Norten blue — buttons & accents */
  --vn-blue-hover: #90a4be;
  --vn-blue-deep: #5d7291;   /* darker blue for links/text accents (readability) */
  --vn-error: #9c3d2e;
  --vn-ok: #3d6b4f;
  /* legacy aliases so accent usage stays consistent */
  --vn-green: var(--vn-blue-deep);
  --vn-green-dark: #4c5f7b;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--vn-bg);
  color: var(--vn-ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vn-green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.5px; }
h1 { font-size: 34px; margin: 0 0 8px; }
h2 { font-size: 24px; }

/* Header: solid flat color. --vn-header-blue is set at runtime by sampling a
   corner pixel of the logo image itself (see layout script), so the bar is the
   EXACT blue of the logo file — flat, no gradient, no visible seam. */
.vn-header {
  background: var(--vn-header-blue, var(--vn-blue));
  padding: 30px 32px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.vn-header img.logo { height: 96px; display: block; }
.vn-nav { display: flex; gap: 32px; align-items: center; justify-content: center; flex-wrap: wrap; }
.vn-nav a {
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--vn-bg); /* creme white menu on the blue */
  /* permanent invisible underline so hover/active never change the layout */
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}
.vn-nav a:hover { text-decoration: none; border-bottom-color: var(--vn-bg); }
.vn-nav a.active { border-bottom-color: var(--vn-bg); }
.vn-nav .cart-count {
  background: var(--vn-bg); color: var(--vn-ink); border-radius: 50%;
  font-size: 11px; padding: 1px 7px; margin-left: 5px;
}

.vn-hero {
  text-align: center;
  padding: 64px 24px 40px;
  max-width: 720px;
  margin: 0 auto;
}
.vn-hero .eyebrow {
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--vn-muted);
}
.vn-main { max-width: 1080px; margin: 0 auto; padding: 32px 24px 96px; }
.vn-main.narrow { max-width: 560px; }

.vn-card {
  background: var(--vn-surface);
  border: 1px solid var(--vn-line);
  padding: 36px;
}

/* Forms */
label { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--vn-muted); margin: 18px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--vn-line);
  background: #fff;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--vn-ink);
  border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--vn-blue); }
.hint { font-size: 12.5px; color: var(--vn-muted); margin-top: 5px; }

.btn {
  display: inline-block;
  background: var(--vn-blue);
  color: var(--vn-ink); /* dark text on the light brand blue for readability */
  border: none;
  padding: 14px 36px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover { background: var(--vn-blue-hover); text-decoration: none; }
.btn.secondary { background: transparent; color: var(--vn-blue-deep); border: 1px solid var(--vn-blue); }
.btn.small { padding: 9px 20px; font-size: 11px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

.flash { padding: 14px 18px; margin-bottom: 22px; font-size: 14px; border: 1px solid; }
.flash.error { color: var(--vn-error); border-color: #e0c4bd; background: #f9efec; }
.flash.ok { color: var(--vn-ok); border-color: #c8d8cd; background: #eef4ef; }

/* Catalog */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px; }
.product-card { background: var(--vn-surface); border: 1px solid var(--vn-line); display: flex; flex-direction: column; }
.product-card .img { aspect-ratio: 1; background: #efe7d3 center/cover no-repeat; }
.product-card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card h3 { margin: 0; font-size: 18px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.price-trade { font-size: 16px; color: var(--vn-blue-deep); font-weight: 500; }
.price-rrp { font-size: 12.5px; color: var(--vn-muted); text-decoration: line-through; }
.badge { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--vn-muted); }

.qty-row { display: flex; gap: 8px; margin-top: 10px; }
.qty-row input { width: 72px; text-align: center; }
.qty-row select { flex: 1; }

/* Tables */
table.vn { width: 100%; border-collapse: collapse; background: var(--vn-surface); border: 1px solid var(--vn-line); }
table.vn th {
  text-align: left; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--vn-muted); font-weight: 400; padding: 14px 16px; border-bottom: 1px solid var(--vn-line);
}
table.vn td { padding: 14px 16px; border-bottom: 1px solid var(--vn-line); font-size: 14.5px; vertical-align: middle; }
table.vn tr:last-child td { border-bottom: none; }
.right { text-align: right; }

.status-pill { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 10px; border: 1px solid; }
.status-paid { color: var(--vn-ok); border-color: #c8d8cd; }
.status-awaiting_payment, .status-pending { color: #96700f; border-color: #e3d3a8; }
.status-cancelled { color: var(--vn-error); border-color: #e0c4bd; }

.totals { margin-top: 24px; margin-left: auto; max-width: 340px; font-size: 14.5px; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .row.total { border-top: 1px solid var(--vn-line); font-size: 17px; font-family: var(--serif); padding-top: 12px; margin-top: 6px; }

.vn-footer {
  border-top: 1px solid var(--vn-line);
  padding: 36px 24px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--vn-muted);
}

@media (max-width: 640px) {
  .vn-header { padding: 20px 16px 16px; gap: 16px; }
  .vn-header img.logo { height: 72px; }
  .vn-nav { gap: 20px; }
  .vn-nav a { font-size: 12.5px; }
  .vn-main { padding: 20px 14px 64px; }
  .vn-card { padding: 22px 18px; }
  h1 { font-size: 27px; }
}
