@font-face { font-family: Amiri; src: url(fonts/Amiri-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Amiri; src: url(fonts/Amiri-400i.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Amiri; src: url(fonts/Amiri-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Amal Jain deck: maroon ground, blush-cream type, gold accent */
  --bg: #241113; --card: #33191c; --card-hi: #402023;
  --cream: #ecdcd1; --dim: rgba(236, 220, 209, .58); --line: rgba(236, 220, 209, .14);
  --gold: #c9a15e; --paper: #faf5f1; --ink: #2b1416; --err: #f0a39a;
  --r: 12px;
  --sans: Amiri, Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--cream); font: 400 18px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 22px 28px 130px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
header.top img { height: 52px; width: auto; display: block; }
header.top nav { display: flex; gap: 4px; }
header.top nav a { color: var(--dim); text-decoration: none; font-size: 15px; padding: 7px 14px; border-radius: 999px; }
header.top nav a.on { color: var(--cream); background: var(--card); }

h1 { font-weight: 400; font-size: 30px; margin: 18px 0 10px; }
h2 { font-weight: 400; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
section { padding: 22px 0 6px; }
.muted { color: var(--dim); }

/* fields */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fields.three { grid-template-columns: 1.1fr 1fr 1.1fr; }
.fields .full { grid-column: 1 / -1; }
label.f { display: block; min-width: 0; }
label.f span { display: block; font-size: 14px; color: var(--dim); margin: 0 0 4px 2px; }
label.f span em { font-style: italic; opacity: .7; }
input, select, textarea {
  width: 100%; font: 400 19px/1.3 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid transparent; border-radius: 10px; padding: 10px 13px; outline: none; -webkit-appearance: none; appearance: none; min-height: 48px;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,161,94,.28); }
.phone { display: flex; gap: 6px; }
.phone input:first-child { width: 66px; flex: none; text-align: center; padding: 10px 4px; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-radius: var(--r); padding: 4px; gap: 4px; }
.seg button { height: 50px; border: 0; border-radius: 9px; background: none; color: var(--cream); font: 400 18px var(--sans); cursor: pointer; }
.seg button.on { background: var(--cream); color: var(--bg); }

details.more { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; color: var(--dim); font-size: 16px; list-style: none; display: flex; align-items: center; gap: 10px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; width: 18px; color: var(--gold); font-size: 20px; line-height: 1; }
details.more[open] summary::before { content: '−'; }
details.more > :not(summary) { margin-top: 14px; }

/* buttons */
.btn { height: 54px; padding: 0 28px; border-radius: 12px; border: 0; background: var(--gold); color: var(--ink); font: 700 18px var(--sans); letter-spacing: .06em; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--dim); font-weight: 400; padding: 0 16px; }
.btn.line { background: transparent; color: var(--cream); border: 1px solid var(--line); font-weight: 400; height: 46px; padding: 0 16px; font-size: 16px; }

/* recent */
.recent { list-style: none; padding: 0; margin: 0; }
.recent li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.recent li:last-child { border-bottom: 0; }
.recent small { color: var(--dim); font-size: 14px; }
.pill { font-size: 12px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.pill.wait { border-color: var(--gold); color: var(--gold); }

/* orders / prices */
.tablewrap { overflow-x: auto; background: var(--card); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; font-weight: 400; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
td small { font-size: 14px; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td input { font-size: 17px; padding: 6px 10px; min-height: 40px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 6px 0 16px; }
.toolbar label.f { min-width: 150px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
.stat { background: var(--card); border-radius: var(--r); padding: 12px 16px; font-size: 16px; }
.stat small { display: block; font-size: 13px; color: var(--dim); }
.stat b { font-weight: 400; font-size: 28px; }
.link { background: none; border: 0; color: var(--dim); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; padding: 4px; }

/* toast + dialog */
.toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -150%); transition: transform .3s cubic-bezier(.2,.9,.3,1); z-index: 20; background: var(--cream); color: var(--bg); padding: 11px 22px; border-radius: 999px; font-size: 17px; box-shadow: 0 10px 30px rgba(0,0,0,.35); width: max-content; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.toast.bad { background: var(--err); color: var(--ink); }
dialog { border: 0; border-radius: 16px; background: var(--bg); color: var(--cream); padding: 24px; width: min(640px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(20, 6, 8, .6); }

/* ===== New-sale screen: built for the counter iPad — quiet, generous, premium ===== */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: 100vh; height: 100dvh; }
.shop { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 34px 48px 48px; }
.pos-page header.top { padding-bottom: 26px; margin-bottom: 0; border-bottom-color: rgba(201,161,94,.22); }
.pos-page header.top img { height: 46px; }
.pos-page h2 { font-size: 11.5px; letter-spacing: .32em; margin: 34px 0 18px; color: rgba(201,161,94,.9); }
.panel { display: flex; flex-direction: column; min-height: 0; background: #1a0b0d; border-left: 1px solid rgba(201,161,94,.18); }
.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 34px 36px 16px; }
.panel h2:first-child { margin-top: 4px; }

/* perfume tiles: object on blush paper, hairline sizes */
.prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 26px; }
.prod { display: flex; flex-direction: column; }
.prod .ph { position: relative; background: #efe3da; border-radius: 6px; overflow: hidden; aspect-ratio: 5 / 4; outline: 1px solid transparent; outline-offset: 5px; transition: outline-color .2s; }
.prod.has .ph { outline-color: rgba(201,161,94,.85); }
.prod img { width: 100%; height: 100%; object-fit: contain; padding: 3% 6% 1%; mix-blend-mode: multiply; display: block; }
.prod .noimg { display: block; width: 100%; height: 100%; }
.prod .nm { padding: 16px 2px 12px; font-size: 20px; line-height: 1.2; letter-spacing: .02em; text-align: center; }
.sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.size { position: relative; min-height: 60px; border-radius: 4px; border: 1px solid rgba(236,220,209,.2); background: none; color: var(--cream); font: 400 14px/1.2 var(--sans); cursor: pointer; padding: 7px 4px; touch-action: manipulation; transition: background .15s, border-color .15s, transform .08s; }
.size b { display: block; font-weight: 400; font-size: 16px; letter-spacing: .06em; }
.size span { color: var(--dim); font-size: 13.5px; letter-spacing: .02em; }
.size:active { transform: scale(.97); }
.size.on { border-color: var(--gold); background: rgba(201,161,94,.1); }
.size .q:empty { display: none; }
.size .q { position: absolute; top: -10px; right: -8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--gold); color: var(--ink); font: 700 13px/24px var(--sans); font-style: normal; }

/* order lines */
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(236,220,209,.09); }
.lines li:last-child { border-bottom: 0; }
.lines li.empty { display: block; color: var(--dim); font-size: 16px; font-style: italic; padding: 6px 0 2px; border: 0; }
.li-name { font-size: 17px; line-height: 1.3; }
.li-name small { color: var(--dim); font-size: 13.5px; }
.li-step { display: flex; align-items: center; }
.li-step button { width: 38px; height: 38px; border: 1px solid rgba(236,220,209,.18); border-radius: 50%; background: none; color: var(--cream); font: 400 19px/1 var(--sans); cursor: pointer; touch-action: manipulation; }
.li-step span { min-width: 30px; text-align: center; }
.li-tot { text-align: right; font-size: 17px; }

/* panel fields: hairline underline, no boxes */
.stack { display: grid; gap: 18px; }
.panel label.f span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 2px; }
.panel input { background: transparent; color: var(--cream); border: 0; border-bottom: 1px solid rgba(236,220,209,.22); border-radius: 0; padding: 8px 0 9px; min-height: 44px; font-size: 20px; }
.panel input:focus { box-shadow: none; border-bottom-color: var(--gold); }
.panel input::placeholder { color: rgba(236,220,209,.3); }
.panel input[type="datetime-local"] { color-scheme: dark; }
.panel .phone { gap: 14px; }
.panel .phone input:first-child { width: 52px; text-align: left; padding: 8px 0 9px; }
.panel .seg { background: none; padding: 0; gap: 8px; }
.panel .seg button { height: 50px; border: 1px solid rgba(236,220,209,.18); border-radius: 4px; font-size: 17px; letter-spacing: .05em; }
.panel .seg button.on { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.panel details.more { margin-top: 28px; border-top-color: rgba(236,220,209,.09); padding-top: 16px; }
.panel details.more summary { font-size: 15px; }

/* checkout */
.checkout { border-top: 1px solid rgba(201,161,94,.3); padding: 20px 36px calc(22px + env(safe-area-inset-bottom)); background: #140708; }
.checkout .sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.checkout .sum small { color: var(--dim); font-size: 14px; letter-spacing: .06em; }
.tot { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; font-size: 26px; color: var(--dim); }
.tot input { width: 170px; field-sizing: content; min-width: 1.2ch; max-width: 220px; padding: 0; min-height: 0; text-align: right; font-size: 36px; background: transparent; color: var(--cream); border: 0; border-bottom: 1px dashed transparent; border-radius: 0; }
.tot input:focus { box-shadow: none; border-bottom-color: var(--gold); }
.acts { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.acts .btn { height: 58px; font-size: 15px; letter-spacing: .26em; text-transform: uppercase; border-radius: 4px; }
.acts .btn.ghost { letter-spacing: .14em; font-size: 14px; }

/* 11" / older iPads in landscape: a slightly narrower order panel */
@media (max-width: 1120px) { .pos { grid-template-columns: minmax(0, 1fr) 380px; } .shop { padding: 30px 34px 40px; } .prods { gap: 28px 20px; } .panel-scroll { padding: 30px 28px 14px; } .checkout { padding-left: 28px; padding-right: 28px; } }

/* iPad portrait / smaller: collection on top, order below, checkout pinned to the bottom */
@media (max-width: 1000px), (orientation: portrait) {
  .pos { display: block; height: auto; }
  .shop { overflow: visible; padding: 30px 40px 8px; }
  .panel { border-left: 0; background: none; }
  .panel-scroll { overflow: visible; padding: 8px 40px 200px; }
  .checkout { padding-left: 40px; padding-right: 40px; }
  .checkout { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; background: rgba(21, 8, 9, .97); backdrop-filter: blur(8px); }
  .checkout .sum { flex: 1; flex-direction: column-reverse; align-items: flex-start; gap: 0; margin: 0; min-width: 0; }
  .tot input { text-align: left; width: 180px; }
  .acts .btn { padding: 0 26px; }
  .stack { grid-template-columns: 1fr 1fr; gap: 18px 28px; }
  .stack label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .shop, .panel-scroll { padding-left: 20px; padding-right: 20px; }
  .prods { gap: 24px 14px !important; }
  .checkout { padding-left: 18px; padding-right: 18px; }
  header.top img { height: 40px; }
  header.top nav a { padding: 6px 10px; font-size: 14px; }
  .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack { grid-template-columns: 1fr; }
  .seg { grid-template-columns: repeat(2, 1fr); }
  .checkout { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .tot input { width: 130px; font-size: 28px; }
  .acts .btn { padding: 0 18px; height: 52px; font-size: 17px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { padding: 16px 16px 60px; }
}
