:root {
  --navy: #1f3a5f; --navy-2: #2b4c78; --green: #2e8b57; --green-2: #26754a;
  --orange: #e67e22; --red: #c8463c; --bg: #f4f6f9; --card: #fff; --line: #d8dde4;
  --text: #23282f; --muted: #6b7380; --soft: #e8ecf2; --ok-bg: #e3f3ea; --err-bg: #fbe9e7; --warn-bg: #fff4e0;
  --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.center { text-align: center; }

/* Header / footer */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #cfdcec; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.nav a.on, .nav a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
main.wrap { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }
.foot { background: #18283d; color: #c3cfdd; padding: 24px 0; font-size: .9rem; }
.foot a { color: #fff; }
.foot p { margin: .3em 0; }

/* Buttons */
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 11px 18px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn.green { background: var(--green); color: #fff; } .btn.green:hover { background: var(--green-2); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.red { background: #fff; color: var(--red); border: 2px solid var(--red); }
.btn.ghost { background: #fff; color: var(--navy); border: 2px solid var(--line); }
.btn.big { padding: 15px 22px; font-size: 1.08rem; }
.btn.full { width: 100%; }
.form > .btn, .form > .actions { margin-top: 16px; }
.btn.sm { padding: 7px 12px; font-size: .88rem; }
.linkbtn { background: none; border: 0; color: #fff; text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }

/* Home */
.hero { text-align: center; padding: 28px 8px 20px; }
.hero h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); }
.hero p { font-size: 1.1rem; max-width: 560px; margin: 0 auto 18px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.hero-btns .btn { min-width: 200px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 28px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.step h3 { margin: 6px 0; }
.step p { margin: 0; color: var(--muted); }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; }
.sellband { background: var(--navy); color: #fff; border-radius: var(--r); padding: 24px; margin-top: 28px; text-align: center; }
.sellband h2 { color: #fff; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 8px 0 10px; }
.small-h { font-size: 1.05rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.card:hover { border-color: var(--navy-2); }
.card-img { aspect-ratio: 1 / 1; background: var(--soft); display: grid; place-items: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { color: var(--muted); font-size: .85rem; }
.card-body { padding: 8px 10px 10px; }
.card-title { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.card-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; gap: 6px; }
.price { font-weight: 800; color: var(--navy); font-size: 1.15rem; }
.price.big { font-size: 1.8rem; margin: .2em 0; }
.badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.badge.c-3 { background: #d9f0e3; color: var(--green-2); }
.badge.c-2 { background: #e3ecf8; color: var(--navy-2); }
.badge.c-1 { background: #f6ead9; color: #9a5a12; }

/* Shop filters */
.filters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 14px; }
@media (min-width: 900px) { .filters { grid-template-columns: repeat(6, 1fr); } }
.filters label span { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; }
.pager a.on { background: var(--navy); color: #fff; }

/* Forms */
.page-title { font-size: 1.6rem; }
.lead { color: var(--muted); margin-top: -4px; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; max-width: 640px; }
.lbl { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 14px 0 4px; }
.lbl .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy-2); outline-offset: 0; border-color: var(--navy-2); }
.school-filter { margin-bottom: 6px; background: var(--bg); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .lbl { margin-top: 14px; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chip span { display: block; text-align: center; padding: 10px 6px; border: 2px solid var(--line); border-radius: 99px; font-weight: 700; cursor: pointer; background: #fff; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.green input:checked + span { background: var(--green); border-color: var(--green); }
.chip input:focus-visible + span { outline: 2px solid var(--navy-2); outline-offset: 2px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph { position: relative; display: block; border: 2px dashed var(--line); border-radius: 8px; min-height: 96px; background: var(--soft); cursor: pointer; overflow: hidden; }
.ph.req { border-color: #b9c4d3; }
.ph.wide { min-height: 64px; margin-top: 8px; }
.ph input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ph-in { display: grid; place-items: center; text-align: center; height: 100%; min-height: inherit; padding: 8px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.ph.has { border-style: solid; border-color: var(--green); }
.ph .prev { position: absolute; inset: 0; display: flex; pointer-events: none; }
.ph .prev img { flex: 1; min-width: 0; object-fit: cover; }
.ph .prev + .ph-in { position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 3px #000; background: rgba(0, 0, 0, .25); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.check input { width: auto; }

/* Panels & messages */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 12px 0; }
.panel.tight { padding: 12px; }
.panel.narrow { max-width: 420px; margin: 30px auto; }
.tick { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; font-size: 30px; display: grid; place-items: center; margin: 0 auto 10px; }
.flash { padding: 12px 14px; border-radius: 8px; margin: 10px 0; background: var(--ok-bg); border: 1px solid #b8e0c8; }
.flash.err { background: var(--err-bg); border-color: #f1c0b9; }
.flash.warn { background: var(--warn-bg); border-color: #f2d6a6; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.crumbs { margin: 0 0 10px; }

/* Item page */
.item { display: grid; gap: 18px; }
@media (min-width: 760px) { .item { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.main-img { width: 100%; border-radius: var(--r); background: var(--soft); aspect-ratio: 1 / 1; object-fit: contain; border: 1px solid var(--line); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb { border: 2px solid var(--line); border-radius: 8px; padding: 0; width: 64px; height: 64px; overflow: hidden; background: #fff; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-size: 1.5rem; margin-bottom: .2em; }
.sub { font-weight: 600; margin: 0; }
.form.reserve { margin-top: 14px; }
.form.reserve h2 { font-size: 1.15rem; }

/* Admin */
body.admin .top { background: #16283f; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; text-align: center; text-decoration: none; color: inherit; }
.tile b { display: block; font-size: 1.5rem; color: var(--navy); }
.tile span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.tabs { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 10px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-color: var(--navy); }
.subtabs { font-size: .9rem; color: var(--muted); }
.subtabs a.on { font-weight: 700; color: var(--navy); text-decoration: none; }
.list { display: grid; gap: 10px; }
.row { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; text-decoration: none; color: inherit; }
.row:not(.static):hover { border-color: var(--navy-2); }
.row-img { width: 72px; height: 72px; flex: none; border-radius: 8px; background: var(--soft); overflow: hidden; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .92rem; }
.pill { display: inline-block; align-self: flex-start; font-size: .7rem; font-weight: 800; padding: 2px 9px; border-radius: 99px; color: #fff; margin-top: 3px; letter-spacing: .03em; }
.pill.orange { background: var(--orange); } .pill.navy { background: var(--navy); } .pill.green { background: var(--green); } .pill.grey { background: #8a93a0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row input { flex: 1; min-width: 0; }
.inline-row .btn, .inline-row select { flex: none; width: auto; }
.mini { width: 70px !important; padding: 6px 8px; }
.kv { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.kv th, .kv td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--soft); vertical-align: top; font-size: .93rem; }
.kv th { width: 34%; color: var(--muted); font-weight: 600; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
.tbl th, .tbl td { padding: 8px; border-bottom: 1px solid var(--soft); text-align: left; }
.tbl th { background: var(--soft); }
.tbl tr.dim td { opacity: .55; }
.ogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.ofig { margin: 0; }
.ofig img { border-radius: 8px; border: 1px solid var(--line); max-height: 420px; object-fit: contain; background: #fff; }
.ofig figcaption { font-size: .8rem; color: var(--muted); }
.ophotos { display: flex; gap: 8px; flex-wrap: wrap; }
.ophoto { width: 104px; font-size: .78rem; text-decoration: none; color: var(--muted); }
.ophoto img { width: 104px; height: 104px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ophoto input { width: auto; }
