:root {
  --ink: #000002;
  --muted: #6c6c70;
  --line: rgba(0, 0, 0, .12);
  --soft: #f4f4f2;
  --good: #1d7f49;
  --warn: #b97a00;
  --bad: #c2362b;
  --serif: "New York", "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", serif;
  --sans: Lato, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--sans); color: var(--ink); background: #fff; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ── page chrome (a stand-in for eglaf.my) ── */
.demo-bar { background: #fff7d6; border-bottom: 1px solid #ecdca0; padding: 8px 16px; font-size: 12.5px; text-align: center; }
.site-head { background: #000; color: #fff; }
.marquee { display: flex; gap: 56px; overflow: hidden; white-space: nowrap; padding: 7px 0; font-size: 11px; letter-spacing: .04em; border-bottom: 1px solid #222; }
.marquee span::before { content: "✦"; margin-right: 56px; }
.nav { display: flex; align-items: center; gap: 40px; padding: 16px 28px; }
.logo { font-weight: 900; font-size: 22px; letter-spacing: .06em; }
.nav nav { display: flex; gap: 26px; font-size: 12px; letter-spacing: .04em; flex-wrap: wrap; }
.pdp { max-width: 1240px; margin: 0 auto; padding: 18px 28px 80px; }
.crumbs { font-size: 11px; letter-spacing: .04em; color: var(--muted); margin: 0 0 16px; }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.gallery img#hero { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--soft); border-radius: 6px; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.thumbs button { padding: 0; border: 1px solid transparent; border-radius: 5px; overflow: hidden; background: none; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { aspect-ratio: 1; object-fit: cover; }
.vendor { font-size: 11px; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
h1 { font: 400 36px/1.12 var(--serif); letter-spacing: -.02em; margin: 0 0 14px; }
.price { font: 400 34px/1 var(--serif); letter-spacing: -.02em; margin: 0; }
.tax { font-size: 12px; color: var(--muted); margin: 6px 0 22px; }
.opt-label { font-size: 12px; margin: 0 0 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { min-width: 44px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; }
.chips button[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips button:disabled { color: #b5b5b5; text-decoration: line-through; cursor: not-allowed; background: var(--soft); }
.chips button.reco { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--good); }
.cart-row { display: flex; gap: 10px; margin: 18px 0 28px; }
.qty { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 7px; padding: 0 14px; height: 46px; color: var(--muted); }
.qty b { color: var(--ink); font-weight: 400; }
.atc { flex: 1; height: 46px; border: 1px solid var(--line); border-radius: 7px; background: #fff; letter-spacing: .04em; font-size: 15px; }
.spec-h { font: 400 16px var(--sans); margin: 0 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.spec { color: #333; margin: 0 0 10px; max-width: 60ch; }

/* ── entry point under the size picker ── */
.fp-entry { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fp-open { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 18px 0 14px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 700; font-size: 13.5px; letter-spacing: .01em; }
.fp-open:hover { background: #222; }
.fp-inline { margin: 0; font-size: 13px; color: #333; }
.fp-inline b { font-weight: 900; }
.fp-inline .dot { margin-right: 6px; }

/* ── widget shell ── */
.fp-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .42); z-index: 40; animation: fade .2s ease; }
.fp { position: fixed; top: 0; right: 0; bottom: 0; width: min(940px, 100vw); background: #fff; z-index: 50; display: flex; flex-direction: column; box-shadow: -18px 0 50px rgba(0, 0, 0, .18); animation: slide .26s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.fp.narrow { width: min(480px, 100vw); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.fp-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 26px 14px; border-bottom: 1px solid var(--line); flex: none; }
.fp-kicker { margin: 0 0 2px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fp-head h2 { margin: 0; font: 400 26px/1.15 var(--serif); letter-spacing: -.015em; }
.fp-x { width: 38px; height: 38px; border: 0; background: none; font-size: 28px; line-height: 1; border-radius: 50%; }
.fp-x:hover { background: var(--soft); }
.fp-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.fp-cta { width: 100%; height: 50px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .02em; margin-top: 6px; }
.fp-cta:hover { background: #222; }
.fp-cta:disabled { background: #b9b9b9; cursor: not-allowed; }
button:focus-visible, input:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* ── step 1 ── */
.fp-form { padding: 20px 26px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.fp-lead { margin: 0; font-size: 15px; color: #222; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lab { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #333; font-weight: 700; }
.lab em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); margin-left: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; background: var(--soft); }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg button { height: 40px; border: 0; border-radius: 6px; background: none; font-size: 13.5px; }
.seg button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .16); font-weight: 700; }
.unit-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; height: 48px; padding: 0 6px 0 2px; }
.unit-input:focus-within { border-color: var(--ink); }
.unit-input input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; font: 400 20px var(--sans); padding: 0 10px; background: none; }
.unit { display: flex; background: var(--soft); border-radius: 6px; padding: 2px; flex: none; }
.unit button { border: 0; background: none; padding: 5px 9px; border-radius: 5px; font-size: 12px; color: var(--muted); }
.unit button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.err { margin: -8px 0 0; color: var(--bad); font-size: 13px; }
.field-note { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ── step 2 ── */
.fp-result { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); min-height: 0; flex: 1; }
.fp-pic { background: #d9dadb; display: flex; flex-direction: column; min-height: 0; position: relative; }
.pic-frame { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.pic-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.pic-frame img.top { opacity: 0; transition: opacity .32s ease; }
.pic-frame img.top.on { opacity: 1; }
.pic-size { position: absolute; left: 14px; top: 14px; background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 5px 12px; font-weight: 900; font-size: 13px; letter-spacing: .04em; }
.pic-cap { margin: 0; padding: 9px 14px; font-size: 12px; background: #fff; border-top: 1px solid var(--line); color: #333; flex: none; }
.fp-info { padding: 20px 26px 26px; overflow-y: auto; min-width: 0; }
.verdict { font: 400 25px/1.18 var(--serif); letter-spacing: -.015em; margin: 0 0 6px; }
.why { margin: 0 0 16px; color: #333; font-size: 14px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

.size-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 18px; }
.size-strip button { position: relative; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 0 7px; overflow: hidden; text-align: center; }
.size-strip img { width: 100%; aspect-ratio: 1 / 1.18; object-fit: cover; object-position: 50% 34%; background: #d9dadb; }
.size-strip b { display: block; font-size: 14px; font-weight: 900; margin-top: 6px; }
.size-strip small { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 10.5px; color: #333; line-height: 1.2; min-height: 14px; }
.size-strip small .dot { width: 7px; height: 7px; flex: none; }
.size-strip button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.size-strip button.soldout img { opacity: .45; }
.size-strip button.soldout b { text-decoration: line-through; color: var(--muted); }
.size-strip .best { position: absolute; top: 5px; left: 5px; background: var(--good); color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 999px; }

.zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.zones li { display: grid; grid-template-columns: 82px 1fr; column-gap: 12px; align-items: center; }
.zones .zn { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; }
.zones .zt { grid-column: 2; font-size: 13px; color: #333; margin: 7px 0 0; }
.zones .zt b { color: var(--ink); }
.meter { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e3e3e0 0 19.4%, #fff 19.4% 20.6%, #e3e3e0 20.6% 39.4%, #fff 39.4% 40.6%, #e3e3e0 40.6% 59.4%, #fff 59.4% 60.6%, #e3e3e0 60.6% 79.4%, #fff 79.4% 80.6%, #e3e3e0 80.6%); }
.meter .mk { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); transition: left .32s cubic-bezier(.2, .8, .2, 1), background .2s; }
.meter .mk.warn { background: var(--warn); } .meter .mk.bad { background: var(--bad); } .meter .mk.good { background: var(--good); }
.meter .nt, .legend .notch { position: absolute; top: -5px; width: 0; height: 0; margin-left: -4px; border: 4px solid transparent; border-top: 5px solid #8a8a8a; }
.legend { position: relative; margin: 12px 0 16px; padding-left: 16px; font-size: 11.5px; color: var(--muted); }
.legend .notch { left: 4px; top: 5px; }

.fp-links { display: flex; justify-content: space-between; margin-top: 12px; }
.link { border: 0; background: none; padding: 4px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.how { margin-top: 12px; padding: 14px 16px; background: var(--soft); border-radius: 8px; font-size: 13px; }
.how h3 { margin: 0 0 4px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.how p { margin: 0 0 12px; color: #333; }
.how p:last-child { margin: 0; }
.how table { border-collapse: collapse; width: 100%; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.how th, .how td { text-align: left; padding: 3px 8px 3px 0; font-weight: 400; }
.how th { color: var(--muted); font-size: 11.5px; }
.how tr.sel td { font-weight: 900; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 13.5px; z-index: 60; animation: fade .2s ease; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); max-width: calc(100vw - 32px); text-align: center; }

/* thumbnails in the size strip are zoomed to the torso; the main picture is shifted up so no face shows */
.size-strip .th { width: 100%; aspect-ratio: 1 / 1.18; background-color: #d9dadb; background-size: 150% auto; background-position: 50% 25%; background-repeat: no-repeat; }
.pic-frame img { inset: auto 0 0 0; height: 109%; }

/* ── small screens: the widget becomes a full-height sheet, picture on top ── */
@media (max-width: 820px) {
  .pdp { padding: 14px 16px 60px; }
  .pdp-grid { grid-template-columns: 1fr; gap: 22px; }
  .nav { padding: 12px 16px; gap: 18px; }
  .nav nav { display: none; }
  h1 { font-size: 28px; }
  .price { font-size: 28px; }
  .fp, .fp.narrow { width: 100vw; top: auto; height: 100dvh; animation-name: rise; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
  .fp-head { padding: 12px 16px 10px; }
  .fp-head h2 { font-size: 21px; }
  .fp-form { padding: 16px 16px 24px; }
  .fp-result { display: block; overflow-y: auto; }
  .fp-pic { height: 50dvh; }
  .pic-frame img { inset: 0; height: 100%; object-position: 50% 30%; }
  .fp-info { padding: 16px 16px 26px; overflow: visible; }
  .verdict { font-size: 22px; }
  .zones li { grid-template-columns: 74px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
