/* Layout: a jewel-box shop front. Black-and-gold from the logo; an arched display niche holds the hero, photo tiles below; checkout, payment and admin are full views swapped in place. */
:root {
  --bg: #0D0A07;
  --surface: #16110B;
  --raise: #201810;
  --line: #3A2C1B;
  --ink: #F6EEDF;
  --muted: #B6A487;
  --gold: #E5B44B;
  --gold-hi: #F8DB8E;
  --gold-ink: #1B1306;
  --danger: #F2836F;
  --ok: #86D6A2;
  --scrim: rgba(0, 0, 0, .66);

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 20px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.muted { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 22px; font-weight: 600; border: 1.5px solid var(--gold); background: transparent; color: var(--gold-hi); text-decoration: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); border-color: var(--gold); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; color: var(--muted); }
.ghost:hover { color: var(--ink); border-color: var(--muted); }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; min-width: 0; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line), 0 0 18px rgba(229, 180, 75, .25); }
.brand b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.brand small { display: block; font-family: var(--display); font-style: italic; color: var(--gold); font-size: .9rem; line-height: 1.2; }
.cats { display: flex; gap: 20px; margin-left: auto; }
.cats button { background: none; border: 0; padding: 4px 0; color: var(--muted); font-weight: 500; border-bottom: 1.5px solid transparent; }
.cats button:hover, .cats button[aria-current="true"] { color: var(--ink); border-color: var(--gold); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.bagbtn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 0; padding: 9px 16px; font-weight: 700; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); }
.bagbtn span { font-family: var(--mono); background: var(--gold-ink); color: var(--gold-hi); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: .75rem; padding-inline: 6px; }
@media (max-width: 820px) { .cats { display: none; } .top-actions { margin-left: auto; } .brand small { display: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-block: 48px 32px; }
.hero h1 { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(3.2rem, 8vw, 6.4rem); line-height: .95; letter-spacing: -.01em; margin: 14px 0 18px; background: linear-gradient(180deg, var(--gold-hi) 10%, var(--gold) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 46ch; margin: 0 0 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.contact { margin: 22px 0 0; color: var(--muted); font-size: .95rem; }
.contact .mono { color: var(--ink); }
.arch { justify-self: center; width: min(100%, 400px); aspect-ratio: 3 / 4; max-width: 100%; border-radius: 200px 200px 18px 18px; overflow: hidden; border: 1.5px solid var(--gold); padding: 8px; background: var(--surface); box-shadow: 0 0 60px rgba(229, 180, 75, .18); }
.arch img { width: 100%; height: 100%; object-fit: cover; border-radius: 192px 192px 12px 12px; display: block; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 28px; } .arch { width: min(100%, 320px); } }

/* Shop */
.shop { padding-block: 24px 64px; }
.shop-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 15px; font-weight: 500; color: var(--muted); }
.chip em { font-style: normal; font-family: var(--mono); font-size: .75rem; margin-left: 5px; opacity: .75; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.search { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; min-width: 0; width: min(280px, 100%); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 28px 18px; }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { display: flex; flex-direction: column; gap: 10px; background: none; border: 0; padding: 0; text-align: left; min-width: 0; }
.card .ph { position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--raise); border: 1px solid var(--line); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.card:hover .ph img { transform: scale(1.04); }
.badge { position: absolute; top: 10px; left: 10px; background: var(--gold); color: var(--gold-ink); border-radius: 999px; padding: 3px 10px; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.soldout { position: absolute; inset: auto 0 0 0; background: rgba(0,0,0,.72); color: var(--ink); text-align: center; padding: 8px; font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.card h3 { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.price { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--gold-hi); }
.price s { color: var(--muted); margin-left: 6px; font-size: .85em; }
.empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }

footer.foot { border-top: 1px solid var(--line); }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-block: 28px; color: var(--muted); font-size: .92rem; }
footer.foot b { color: var(--ink); font-family: var(--display); font-size: 1.1rem; }

/* Overlays */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }
.modal { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.sheet { position: relative; pointer-events: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; width: min(920px, 100%); max-height: calc(100% - 24px); overflow: auto; display: grid; grid-template-columns: 1.05fr 1fr; }
.gallery { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gallery .main { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--raise); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs button { width: 58px; height: 58px; padding: 0; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--line); background: var(--raise); }
.thumbs button[aria-pressed="true"] { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pinfo { padding: 28px 26px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pinfo h2 { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.05; margin: 0; }
.pinfo .price { font-size: 1.3rem; }
.pinfo p { margin: 0; color: var(--muted); }
.optlabel { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { min-width: 48px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); font-family: var(--mono); }
.size[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { background: none; border: 0; width: 34px; height: 34px; font-size: 1.1rem; }
.qty span { font-family: var(--mono); min-width: 2.2ch; text-align: center; }
.addrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.addrow .btn { flex: 1 1 180px; }
.warn { color: var(--danger); font-size: .92rem; margin: 0; min-height: 1.4em; }
.x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.3rem; line-height: 1; z-index: 2; }
@media (max-width: 720px) { .sheet { grid-template-columns: 1fr; } .gallery .main { aspect-ratio: 1; } }

.drawer { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-family: var(--display); font-size: 1.6rem; margin: 0; }
.drawer header .x { position: static; }
.dbody { flex: 1; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.dfoot { border-top: 1px solid var(--line); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; }
.line .t { min-width: 0; }
.line .t b { display: block; font-weight: 600; line-height: 1.25; font-size: .95rem; }
.line .t small { color: var(--muted); }
.line .r { display: flex; flex-direction: column; align-items: end; gap: 6px; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: .85rem; }
.sum { display: flex; justify-content: space-between; gap: 12px; }
.sum span:last-child { font-family: var(--mono); text-align: right; }
.sum.total { font-weight: 700; font-size: 1.1rem; }

/* Checkout + pay */
.page { padding-block: 36px 64px; }
.page h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; margin: 8px 0 24px; }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; min-width: 0; }
.panel h2 { font-family: var(--display); font-size: 1.4rem; margin: 0 0 14px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .fld { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 500; }
.form input, .form select, .form textarea, .fld input, .fld select, .fld textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.opt:has(input:checked) { border-color: var(--gold); }
.opt input { accent-color: var(--gold); }
.opt span:last-child { margin-left: auto; font-family: var(--mono); color: var(--gold-hi); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.summary { display: flex; flex-direction: column; gap: 12px; }
.note { font-size: .88rem; color: var(--muted); margin: 0; }

.pay { max-width: 760px; }
.due { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; border: 1.5px solid var(--gold); border-radius: 18px; padding: 20px 22px; background: var(--surface); margin-bottom: 26px; }
.due .amt { font-family: var(--mono); font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--gold-hi); line-height: 1; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.steps > li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); font-family: var(--mono); font-weight: 500; }
.steps h3 { margin: 4px 0 8px; font-size: 1.05rem; }
.steps .body { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.acct { display: grid; gap: 4px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.acct .num { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 1.25rem; color: var(--ink); }
.copy { background: var(--raise); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: .8rem; color: var(--gold-hi); font-family: var(--body); }
.wa { background: #1FA855; border-color: #1FA855; color: #FFFFFF; }

/* Admin */
.admin-top { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 67px); z-index: 20; background: var(--raise); border-bottom: 1px solid var(--line); }
.admin-top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-block: 10px; }
.admin-top .status { margin-right: auto; font-size: .92rem; color: var(--muted); }
.admin-top .status.dirty { color: var(--gold-hi); }
.admin { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding-block: 28px 64px; align-items: start; }
.anav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 140px; }
.anav button { text-align: left; background: none; border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; color: var(--muted); font-weight: 500; }
.anav button[aria-current="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); }
.meter { margin-top: 16px; font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.meter .trk { height: 6px; border-radius: 6px; background: var(--raise); overflow: hidden; }
.meter .trk i { display: block; height: 100%; background: var(--gold); }
.amain { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.amain h1 { font-family: var(--display); font-size: 2rem; margin: 0; }
.ahead { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
tr:last-child td { border-bottom: 0; }
td img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
td .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.pill.off { color: var(--muted); }
.pill.out { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 1020px) { .editor { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .admin { grid-template-columns: 1fr; } .anav { position: static; flex-direction: row; flex-wrap: wrap; } .meter { flex-basis: 100%; } .admin-top { top: calc(env(safe-area-inset-top, 0px) + 67px); } }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.box > h3 { margin: 0; font-size: .78rem; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.title-in { font-family: var(--display); font-size: 1.6rem !important; font-weight: 700; }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.imgs figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--raise); }
.imgs figure img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.imgs figcaption { display: flex; justify-content: space-between; gap: 2px; padding: 4px; }
.imgs figcaption button { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: .78rem; }
.imgs .cover { position: absolute; top: 6px; left: 6px; }
.drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.drop.over { border-color: var(--gold); color: var(--ink); }
.repeat { display: flex; flex-direction: column; gap: 10px; }
.repeat .r { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.repeat .r.d { grid-template-columns: 2fr 1fr auto; }
@media (max-width: 620px) { .repeat .r, .repeat .r.d { grid-template-columns: 1fr; } }
.restore { border: 1px solid var(--gold); border-radius: 12px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--surface); }
.restore p { margin: 0 auto 0 0; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--gold); color: var(--gold-ink); font-weight: 600; padding: 11px 18px; border-radius: 999px; max-width: calc(100% - 32px); text-align: center; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } .card:hover .ph img { transform: none; } }

/* Admin sign-in */
.login { max-width: 420px; margin: 0 auto; }
.banner { border: 1px solid var(--gold); background: var(--surface); border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.foot .adminlink { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: .85rem; }
