:root {
  --ocean: #006A92;
  --dark-ocean: #005579;
  --deep: #002138;
  --overcast: #A6BBC8;
  --orange: #DC582A;
  --paper: #f7f4ef;
  --white: #fffcf8;
  --ink: #141312;
  --muted: #5c656c;
  --line: rgba(0, 33, 56, 0.12);
  --shadow: 0 18px 40px rgba(0, 33, 56, 0.08);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", system-ui, sans-serif;
  --r: 18px;
  --r-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--ocean); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.wrap { width: min(1120px, calc(100% - 2.4rem)); margin: 0 auto; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0 1rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.85rem; color: inherit; }
.brand img { height: 42px; width: auto; }
.brand-mark { display: flex; flex-direction: column; gap: 0.05rem; }
.brand-kicker {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.brand-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1; color: var(--deep); }
.nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--deep); font-size: 0.92rem; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--ocean); }
.pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.75rem;
  font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums;
}

.hero { padding: 3.2rem 0 1.4rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: end; }
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4.1rem);
  line-height: 0.95; margin: 0 0 1rem; text-wrap: balance; color: var(--deep);
}
.hero p { margin: 0; color: var(--muted); max-width: 38ch; font-size: 1.05rem; text-wrap: pretty; }
.deadline-note { margin-top: 1.2rem; color: var(--ocean); font-weight: 600; font-variant-numeric: tabular-nums; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; padding: 0 0 3.5rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: calc(var(--r) + 8px);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform 160ms cubic-bezier(0.2, 0, 0, 1), box-shadow 160ms cubic-bezier(0.2, 0, 0, 1);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 22px 48px rgba(0, 33, 56, 0.12); }
.card-img { background: #ece7df; aspect-ratio: 4/5; overflow: hidden; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; }
.placeholder-flag {
  position: absolute; left: 0.8rem; top: 0.8rem; background: var(--white);
  color: var(--muted); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.5rem; border-radius: 999px; border: 1px solid var(--line);
}
.card-body { padding: 1.15rem 1.25rem 1.3rem; }
.card-body h2 { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 0.35rem; text-wrap: balance; }
.card-body p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; text-wrap: pretty; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.7rem 1.15rem; border-radius: 999px; border: 0;
  background: var(--deep); color: #fff; font-weight: 600; cursor: pointer;
  transition: transform 120ms cubic-bezier(0.2, 0, 0, 1), background 120ms cubic-bezier(0.2, 0, 0, 1);
}
.btn:hover { background: var(--ocean); }
.btn:active { transform: scale(0.96); }
.btn.ghost { background: transparent; color: var(--deep); border: 1px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.orange { background: var(--orange); }
.btn.orange:hover { background: #c44b22; }
.btn.wide { width: 100%; }
.btn-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.flash { width: min(1120px, calc(100% - 2.4rem)); margin: 1rem auto 0; }
.flash .ok, .flash .error {
  padding: 0.75rem 1rem; border-radius: var(--r-sm); margin: 0 0 0.5rem;
}
.flash .ok { background: #e7f4ea; color: #1c4a2a; }
.flash .error { background: #fdecea; color: #7a2318; }

.product { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2rem; padding: 2rem 0 3.5rem; }
.viewer { background: var(--white); border: 1px solid var(--line); border-radius: calc(var(--r) + 8px); overflow: hidden; }
.viewer-main { background: #ece7df; min-height: 520px; display: grid; place-items: center; position: relative; }
.viewer-main img { max-height: 620px; width: auto; }
.thumbs { display: flex; gap: 0.5rem; padding: 0.8rem; }
.thumbs button {
  width: 72px; height: 88px; border: 1px solid var(--line); background: #ece7df;
  border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer;
}
.thumbs button.active { outline: 2px solid var(--ocean); outline-offset: 1px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.meta h1 { font-family: var(--serif); font-size: 2.4rem; margin: 0 0 0.4rem; text-wrap: balance; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ocean); font-weight: 600; }
.meta p { color: var(--muted); text-wrap: pretty; }
.spec { display: grid; gap: 0.65rem; margin: 1.2rem 0; }
.spec div { border-top: 1px solid var(--line); padding-top: 0.65rem; }
.spec dt { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0.15rem 0 0; }

.size-guide { margin-top: 1.4rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }

.form { padding: 2rem 0 3.5rem; display: grid; gap: 1.2rem; }
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px);
  padding: 1.3rem 1.35rem;
}
.panel h2 { font-family: var(--serif); margin: 0 0 1rem; font-size: 1.7rem; text-wrap: balance; }
label { display: block; font-size: 0.82rem; font-weight: 600; margin: 0 0 0.35rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.55rem 0.75rem; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.fields.three { grid-template-columns: 1fr 1fr 1fr; }
.choice {
  display: grid; grid-template-columns: 140px 1fr; gap: 1rem; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem; margin-bottom: 0.8rem;
}
.choice img { width: 140px; height: 160px; object-fit: cover; border-radius: 10px; background: #ece7df; }
.toggle { display: flex; gap: 0.5rem; }
.toggle label {
  min-height: 44px; padding: 0.5rem 0.9rem; border-radius: 999px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; cursor: pointer; margin: 0; font-weight: 500;
}
.toggle input { display: none; }
.toggle input:checked + span { } /* label style via :has */
.toggle label:has(input:checked) { background: var(--deep); color: #fff; border-color: var(--deep); }
.size-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.7rem; }

.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.review-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.review-card img { aspect-ratio: 4/5; object-fit: cover; background: #ece7df; }
.review-card .pad { padding: 0.9rem 1rem 1.1rem; }
.thanks { padding: 4rem 0 5rem; max-width: 560px; }
.thanks h1 { font-family: var(--serif); font-size: 3rem; margin: 0 0 0.6rem; text-wrap: balance; }

.site-footer { border-top: 1px solid var(--line); padding: 1.4rem 0 2rem; color: var(--muted); font-size: 0.85rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Admin */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--deep); color: #d7e4ec; padding: 1.3rem 1rem; }
.side a { color: #d7e4ec; display: flex; align-items: center; min-height: 40px; padding: 0.2rem 0.55rem; border-radius: 8px; }
.side a:hover, .side a.active { background: rgba(255,255,255,0.08); color: #fff; }
.side .logo { color: #fff; font-family: var(--serif); font-size: 1.25rem; margin: 0 0 1.2rem; display: block; }
.main { padding: 1.4rem 1.6rem 2.5rem; overflow-x: auto; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 1rem 0 1.4rem; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem; }
.stat b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; color: var(--deep); }
.stat span { color: var(--muted); font-size: 0.8rem; }
.toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0 0 1rem; }
.search { min-width: 220px; }

.locked-banner {
  background: #fff4e8; border: 1px solid #f0c9a0; color: #7a4314;
  padding: 0.8rem 1rem; border-radius: 10px; margin: 1rem 0;
}

@media (max-width: 860px) {
  .hero, .product, .grid-2, .admin-shell, .fields, .fields.three, .choice, .stats, .size-row {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 1.8rem; }
  .choice img { width: 100%; height: 220px; }
  .nav { gap: 0.6rem; }
  .brand img { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
}
