/* Milaf shelf demo. Look: pharmacy-shelf daylight, soft colour tiles, one deep green for actions. Type: Readex Pro. 4 px grid. */
:root {
  --bg: #F1F3EE;
  --card: #FFFFFF;
  --ink: #1B2521;
  --muted: #56635C;
  --green: #1D5A48;
  --green-soft: #DCE8E1;
  --line: rgba(27, 37, 33, .14);
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.7 "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh; overflow-x: hidden;
}
body.has-cart { padding-bottom: 96px; }
bdi { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; inset-inline-start: 16px; top: -64px; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--r-s); z-index: 5; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1160px; margin: 0 auto; padding: 8px 16px 0; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: none; }
.back:hover { color: var(--ink); }
.demo-tag { font-size: 13px; color: var(--ink); background: var(--card); box-shadow: 0 0 0 1px var(--line); border-radius: 999px; padding: 4px 12px; }

.page { max-width: 1160px; margin: 0 auto; padding: 16px 16px 48px; }
.brand { display: grid; line-height: 1.5; }
.brand-name { font-size: 20px; font-weight: 600; color: var(--green); }
.brand-by { font-size: 14px; color: var(--muted); }
h1 { margin-top: 24px; font-size: 30px; font-weight: 600; line-height: 1.4; text-wrap: balance; max-width: 12em; }
.sub { margin-top: 12px; color: var(--muted); max-width: 32em; text-wrap: pretty; }

.qr-card { margin-top: 32px; display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: var(--r-l); padding: 12px; padding-inline-end: 20px; box-shadow: 0 0 0 1px var(--line), 0 16px 32px -24px rgba(27, 37, 33, .35); }
.qr { width: 104px; height: 104px; flex: none; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.qr svg { width: 100%; height: 100%; fill: var(--ink); }
.qr-empty { font-size: 20px; font-weight: 600; color: var(--muted); width: 72px; height: 72px; display: grid; place-items: center; border-radius: 8px; outline: 2px dashed var(--line); }
.qr-card h2 { font-size: 16px; font-weight: 500; line-height: 1.6; }
.qr-card p { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.6; }

#products { margin-top: 48px; scroll-margin-top: 16px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sec-head h2 { font-size: 22px; font-weight: 600; }
.sec-head p { font-size: 13px; color: var(--muted); }
.grid { margin-top: 16px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
.card { display: flex; flex-direction: column; min-width: 0; }
.shot { aspect-ratio: 6 / 7; border-radius: var(--r-m); display: grid; place-items: end center; overflow: hidden; outline: 1px solid rgba(0, 0, 0, .06); outline-offset: -1px; transition: box-shadow .16s ease-out; }
.shot svg { width: 86%; height: auto; display: block; margin-bottom: 4%; }
.shot-sage { background: linear-gradient(160deg, #E4ECDF, #CFDDCB); }
.shot-butter { background: linear-gradient(160deg, #F5ECD0, #EADDB3); }
.shot-sky { background: linear-gradient(160deg, #DFE9EF, #C9D9E3); }
.shot-blush { background: linear-gradient(160deg, #F4E2DB, #E8CEC4); }
.shot-lilac { background: linear-gradient(160deg, #E8E3F0, #D6CEE3); }
.shot-sand { background: linear-gradient(160deg, #EEE7DB, #E0D5C3); }
.in-cart .shot { box-shadow: 0 0 0 3px var(--green); outline-color: transparent; }
.name { margin-top: 12px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.size { font-size: 13px; color: var(--muted); }
.buy { margin-top: auto; padding-top: 8px; display: grid; gap: 8px; }
.price { font-size: 15px; font-weight: 500; }
.price bdi { font-size: 18px; font-weight: 600; }

.qty { display: flex; align-items: center; height: 44px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); transition: background-color .16s ease-out; }
.step { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; transition: transform .14s ease-out, background-color .14s ease-out; }
.step:active { transform: scale(.96); }
.step:disabled { opacity: .35; cursor: default; }
.step span { display: none; }
.step.is-add { flex: 1; width: auto; font-size: 15px; font-weight: 500; color: var(--green); }
.step.is-add span { display: inline; }
.step.is-add:hover { background: var(--green-soft); }
.count { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.in-cart .buy .qty { background: var(--green); color: #fff; box-shadow: none; }
.in-cart .buy .qty :focus-visible { outline-color: var(--ink); }

.made { max-width: 1160px; margin: 0 auto; padding: 24px 16px 32px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
.made a { color: var(--green); font-weight: 500; text-underline-offset: 6px; display: inline-block; padding: 8px 0; }

.cart-bar { position: fixed; inset: auto 0 0 0; z-index: 3; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; animation: rise .22s cubic-bezier(.2, 0, 0, 1); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.cart-open { pointer-events: auto; width: 100%; max-width: 480px; margin: 0 auto; min-height: 60px; padding-inline: 8px 20px; border-radius: var(--r-m); background: var(--ink); color: #fff; display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; box-shadow: 0 16px 32px -8px rgba(27, 37, 33, .5); transition: transform .14s ease-out; }
.cart-open:active { transform: scale(.98); }
.cart-open:focus-visible { outline-color: var(--green); outline-offset: 4px; border-radius: var(--r-m); }
.cart-count { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 600; }
.cart-total { margin-inline-start: auto; font-weight: 400; }
.cart-total bdi { font-weight: 600; }

.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 88dvh; border: 0; padding: 0; border-radius: var(--r-l) var(--r-l) 0 0; background: var(--bg); color: var(--ink); overflow: hidden; box-shadow: 0 -16px 48px rgba(27, 37, 33, .25); }
.sheet[open] { display: flex; flex-direction: column; animation: rise .24s cubic-bezier(.2, 0, 0, 1); }
.sheet::backdrop { background: rgba(27, 37, 33, .45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.sheet-head h2 { font-size: 22px; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); margin-inline-end: -8px; }
.icon-btn:hover { background: var(--green-soft); color: var(--ink); }
.sheet-body { overflow-y: auto; padding: 0 20px 16px; overscroll-behavior: contain; }
.lines { list-style: none; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-name { font-size: 15px; font-weight: 500; line-height: 1.5; }
.line-price { font-size: 14px; color: var(--muted); }
.line .qty { width: 124px; flex: none; }
.empty { padding: 24px 0; color: var(--muted); }
.sum { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; font-size: 16px; font-weight: 500; }
.sum bdi { font-size: 22px; font-weight: 600; }
.field { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.field span { color: var(--muted); font-weight: 400; }
#buyer { width: 100%; min-height: 48px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid #77837D; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.sheet-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.send { min-height: 56px; border-radius: var(--r-m); background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 500; text-decoration: none; transition: transform .14s ease-out, background-color .14s ease-out; }
.send:hover { background: #164A3A; }
.send:active { transform: scale(.98); }
.send[aria-disabled="true"] { background: #C9D1CC; color: #56635C; cursor: default; }
.fine { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; text-align: center; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; }
  .sheet { inset: 0; margin: auto; width: 480px; height: fit-content; max-height: min(720px, 88dvh); border-radius: var(--r-l); }
}
@media (min-width: 960px) {
  .demo-bar { padding: 16px 40px 0; }
  .page { padding: 48px 40px 96px; }
  .top { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 80px; align-items: end; }
  h1 { font-size: 52px; line-height: 1.35; margin-top: 40px; }
  .sub { margin-top: 20px; font-size: 18px; }
  .qr-card { margin-top: 0; padding: 16px; padding-inline-end: 24px; gap: 20px; }
  .qr { width: 136px; height: 136px; }
  .qr-card h2 { font-size: 18px; }
  .qr-card p { font-size: 14px; }
  #products { margin-top: 80px; }
  .grid { gap: 56px 32px; }
  .shot { aspect-ratio: 5 / 4; }
  .shot svg { width: auto; height: 82%; }
  .name { font-size: 18px; margin-top: 16px; }
  .buy { grid-template-columns: 1fr 148px; align-items: center; padding-top: 12px; }
  .made { padding: 32px 40px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .step:active, .cart-open:active, .send:active { transform: none; }
}
