/* Vertex Mattress – demo store
   VOICE  calm, restful, premium-but-friendly furniture showroom
   IDEA   a night sky that turns into morning: deep indigo hero (sleep), sunrise-coral actions (wake, buy)
   PICTURE the real product in 3D, slowly turning on a glowing pedestal
   COLOUR indigo #00285F, mist #F1F7FB, sunrise #00A0D2
   TYPE   Sora for headings, Manrope for text */

:root {
  --night: #00285F; --night-2: #0A3C80; --ink: #0B1A33; --text: #3A3D5C; --muted: #6A6E8C;
  --mist: #F1F7FB; --mist-2: #E2EFF8; --line: #DAE7F0; --white: #fff;
  --sun: #00A0D2; --sun-2: #4FC6EE; --sun-ink: #00285F; --ok: #1E9E62; --bad: #C2362B;
  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --shadow: 0 24px 60px -28px rgba(0, 40, 95, .35);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --head: "Sora", system-ui, sans-serif; --body: "Manrope", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--body); color: var(--text); background: var(--white); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, 1200px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: 12px; transform: translateY(-200%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent; font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, color .2s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn--sun { background: linear-gradient(135deg, var(--sun), var(--sun-2)); color: var(--sun-ink); box-shadow: 0 12px 28px -12px rgba(0, 160, 210, .8); }
.btn--sun:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(0, 160, 210, .9); }
.btn--glass { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255,255,255,.2); }
.btn--ink { background: var(--night); color: #fff; }
.btn--ink:hover { background: var(--night-2); }
.btn--line { background: transparent; border-color: var(--night); color: var(--night); }
.btn--line:hover { background: var(--night); color: #fff; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Top bar + header */
.topbar { background: var(--ink); color: #BCD3E6; font-size: .86rem; text-align: center; padding: 8px 16px; }
.topbar p { margin: 0; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.header.is-scrolled { box-shadow: 0 10px 30px -20px rgba(0,40,95,.5); }
.header__in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.logo { display: block; }
.logo img { width: auto; height: 56px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 10px 12px; border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--ink); }
.nav a:hover { background: var(--mist); }
.cart-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.cart-btn svg { width: 24px; height: 24px; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--sun); color: var(--sun-ink); font: 800 .75rem/22px var(--body); text-align: center; }
.cart-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.18); } 60% { transform: scale(.94); } }
.menu-btn { display: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; position: relative; }
.menu-btn span:first-child, .menu-btn span:first-child::before, .menu-btn span:first-child::after { position: absolute; left: 14px; width: 20px; height: 2px; background: var(--ink); content: ""; transition: transform .2s; }
.menu-btn span:first-child { top: 23px; }
.menu-btn span:first-child::before { left: 0; top: -6px; }
.menu-btn span:first-child::after { left: 0; top: 6px; }
.menu-btn[aria-expanded="true"] span:first-child { background: transparent; }
.menu-btn[aria-expanded="true"] span:first-child::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:first-child::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .cart-btn { margin-left: auto; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #fff; padding: 8px 16px 18px; border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--mist-2); }
  .logo img { height: 46px; }
}

/* HERO – night sky to sunrise */
.hero { position: relative; overflow: hidden; isolation: isolate; color: #D3E3F0;
  background: radial-gradient(70% 90% at 85% 110%, rgba(0,160,210,.45), transparent 60%),
              radial-gradient(50% 60% at 10% 0%, rgba(0,130,210,.55), transparent 60%),
              linear-gradient(170deg, #00183A 0%, var(--night) 55%, #003B73 100%);
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px); }
.hero__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__sky i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .6; animation: twinkle 4s ease-in-out infinite; }
.hero__sky i:nth-child(1) { left: 8%; top: 18%; } .hero__sky i:nth-child(2) { left: 22%; top: 70%; animation-delay: -1s; }
.hero__sky i:nth-child(3) { left: 38%; top: 12%; animation-delay: -2s; } .hero__sky i:nth-child(4) { left: 52%; top: 40%; animation-delay: -3s; width: 2px; height: 2px; }
.hero__sky i:nth-child(5) { left: 66%; top: 10%; animation-delay: -.5s; } .hero__sky i:nth-child(6) { left: 80%; top: 28%; animation-delay: -1.5s; }
.hero__sky i:nth-child(7) { left: 92%; top: 60%; animation-delay: -2.5s; width: 2px; height: 2px; } .hero__sky i:nth-child(8) { left: 45%; top: 85%; animation-delay: -3.5s; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: .9; transform: scale(1.2); } }
.hero__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero__place { font-weight: 700; color: var(--sun-2); margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6.4vw, 4.6rem); font-weight: 800; }
.hero h1 span { display: inline-block; animation: rise 1s var(--ease) both; }
.hero h1 span:nth-child(2) { animation-delay: .12s; }
.hero h1 span:nth-child(3) { animation-delay: .24s; background: linear-gradient(100deg, var(--sun), var(--sun-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 46ch; animation: rise 1s var(--ease) .36s both; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; animation: rise 1s var(--ease) .46s both; }
.hero__points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; animation: rise 1s var(--ease) .56s both; }
.hero__points li { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); font-size: .93rem; }
.hero__points b { color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero__stage { position: relative; aspect-ratio: 1.15 / 1; animation: rise 1.2s var(--ease) .2s both; }
.hero__ring { position: absolute; left: 8%; right: 8%; bottom: 10%; height: 28%; border-radius: 50%; background: radial-gradient(closest-side, rgba(79,198,238,.55), rgba(0,160,210,.15) 60%, transparent 75%); filter: blur(6px); animation: glow 5s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.06); opacity: .8; } }
.hero__model { position: absolute; inset: 0; width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.hero__tag { position: absolute; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.95); color: var(--ink); font: 700 .88rem/1 var(--body); box-shadow: var(--shadow); animation: float 5s ease-in-out infinite; pointer-events: none; }
.hero__tag--a { top: 8%; left: 4%; }
.hero__tag--b { bottom: 8%; right: 2%; animation-delay: -2.5s; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } .hero__stage { max-width: 560px; width: 100%; margin-inline: auto; } }

/* Perks */
.perks { border-bottom: 1px solid var(--line); background: #fff; }
.perks__row { display: grid; grid-template-columns: repeat(4, 1fr); }
.perks__row div { padding: 22px 18px; border-left: 1px solid var(--line); }
.perks__row div:first-child { border-left: 0; }
.perks b { display: block; color: var(--ink); font-family: var(--head); font-size: 1rem; }
.perks span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .perks__row { grid-template-columns: 1fr 1fr; } .perks__row div:nth-child(3) { border-left: 0; } .perks__row div { border-top: 1px solid var(--line); } }

/* PRODUCT */
.product { padding-block: clamp(48px, 7vw, 96px); }
.product--alt { background: var(--mist); }
.product__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.product--alt .viewer { order: 2; }
.viewer { position: sticky; top: 92px; }
.viewer__model { display: block; width: 100%; height: clamp(340px, 44vw, 560px); border-radius: var(--r-xl); background: radial-gradient(80% 70% at 50% 35%, #fff 0%, #E9F3FA 70%, #DDEBF6 100%); --poster-color: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.product--alt .viewer__model { background: radial-gradient(80% 70% at 50% 35%, #fff 0%, #EFF6FB 70%, #E2EEF7 100%); }
.viewer__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.ar-btn { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--night); color: #fff; font: 700 .95rem/1 var(--body); box-shadow: var(--shadow); cursor: pointer; }
.ar-btn svg { width: 20px; height: 20px; }
.viewer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.viewer__hint { flex: 1 1 220px; color: var(--muted); font-size: .9rem; }
.viewer__btn { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 700 .9rem/1 var(--body); cursor: pointer; }
.viewer__btn:hover { border-color: var(--night); }
.viewer__btn--ar { background: var(--night); color: #fff; border-color: var(--night); }

.buy__cat { color: var(--sun); font-weight: 800; margin-bottom: 8px; }
.buy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.buy__tag { color: var(--muted); font-size: 1.05rem; }
.buy__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 18px 0 2px; }
.buy__price [data-price] { font: 800 2.1rem/1 var(--head); color: var(--ink); transition: color .3s; }
.buy__price [data-price].flash { animation: flash .6s var(--ease); }
@keyframes flash { 40% { color: var(--sun); transform: translateY(-2px); } }
.buy__price s { color: var(--muted); }
.buy__price em { font-style: normal; font-weight: 800; color: var(--ok); }
.buy__note { color: var(--muted); font-size: .9rem; }
.opt { border: 0; padding: 0; margin: 22px 0 0; }
.opt legend { padding: 0; margin-bottom: 10px; font-weight: 700; color: var(--ink); }
.opt legend b { font-weight: 600; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transition: transform .2s var(--ease); }
.swatch:hover { transform: scale(1.08); }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--night); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 5px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.chips--sm { grid-template-columns: repeat(3, 1fr); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: #fff; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.chip b { color: var(--ink); }
.chip small { color: var(--muted); font-size: .82rem; }
.chip input:checked + span { border-color: var(--night); background: #F2F9FD; box-shadow: 0 0 0 1px var(--night); }
.chip input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.chip--custom span { border-style: dashed; }
.chips--sm .chip span { align-items: center; text-align: center; padding: 11px 8px; }
.custom-size { margin-top: 14px; padding: 16px; border-radius: var(--r-m); background: #fff; border: 1.5px dashed var(--night); animation: rise .4s var(--ease); }
.custom-size__msg { margin: 10px 0 0; font-size: .88rem; color: var(--muted); }
.custom-size__msg.is-bad { color: var(--bad); font-weight: 700; }
.unit-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.unit-row label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; color: var(--ink); }
input, textarea { font: inherit; font-size: 16px; color: var(--ink); width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: #fff; }
input:focus, textarea:focus { outline: none; border-color: var(--night); box-shadow: 0 0 0 4px rgba(0,40,95,.12); }
.unit-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--mist); }
.unit-toggle button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font: 700 .9rem/1 var(--body); color: var(--muted); cursor: pointer; }
.unit-toggle .is-on { background: var(--night); color: #fff; }
.custom-box { margin-top: 18px; border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 0 16px; background: #fff; }
.custom-box summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--ink); }
.custom-box p { color: var(--muted); font-size: .94rem; }
.custom-box .btn { margin: 14px 0 16px; }
.buy__row { display: flex; gap: 12px; margin: 26px 0 12px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 44px; height: 46px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.qty output { min-width: 26px; text-align: center; font-weight: 800; }
.buy__features { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.buy__features li { position: relative; padding-left: 26px; font-size: .95rem; }
.buy__features li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--mist-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='%2300285F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.buy__desc { margin-top: 18px; border-top: 1px solid var(--line); }
.buy__desc summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--ink); }
@media (max-width: 900px) {
  .product__grid { grid-template-columns: 1fr; }
  .product--alt .viewer { order: 0; }
  .viewer { position: static; }
}
@media (max-width: 480px) { .buy__features { grid-template-columns: 1fr; } .unit-row { grid-template-columns: 1fr 1fr; } .unit-toggle { grid-column: 1 / -1; justify-self: start; } }

/* How it works */
.how { padding-block: clamp(56px, 8vw, 104px); background: var(--night); color: #BCD3E6; position: relative; overflow: hidden; }
.how::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(0,160,210,.45), transparent 65%); pointer-events: none; }
.how h2 { color: #fff; }
.how__lead { max-width: 56ch; font-size: 1.08rem; }
.steps { list-style: none; counter-reset: s; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; position: relative; z-index: 1; }
.steps li { counter-increment: s; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-l); padding: 22px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--sun), var(--sun-2)); color: var(--sun-ink); font: 800 1rem/1 var(--head); margin-bottom: 14px; }
.steps b { display: block; color: #fff; font-family: var(--head); font-size: 1.08rem; margin-bottom: 6px; }
.steps span { font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* About */
.about { padding-block: clamp(56px, 8vw, 104px); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about__list li { padding: 20px; border-radius: var(--r-l); background: var(--mist); }
.about__list b { display: block; color: var(--ink); font-family: var(--head); margin-bottom: 4px; }
.about__list span { font-size: .94rem; color: var(--muted); }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .about__list { grid-template-columns: 1fr; } }

/* Track */
.track { padding-block: clamp(48px, 7vw, 88px); background: var(--mist); }
.track__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.track__form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; background: #fff; padding: 20px; border-radius: var(--r-l); box-shadow: var(--shadow); }
.track__form label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; color: var(--ink); }
.track__out { grid-column: 1 / -1; }
.track__out:empty { display: none; }
.timeline { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.timeline li { position: relative; padding-top: 30px; font-size: .86rem; font-weight: 700; color: var(--muted); text-align: center; }
.timeline li::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--mist-2); border: 2px solid var(--line); }
.timeline li::after { content: ""; position: absolute; top: 12px; left: calc(50% + 12px); right: calc(-50% + 12px); height: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.done::after { background: var(--ok); }
.track__err { color: var(--bad); font-weight: 700; margin: 0; }
@media (max-width: 760px) { .track__grid { grid-template-columns: 1fr; } .track__form { grid-template-columns: 1fr; } }

/* Contact */
.contact { padding-block: clamp(56px, 8vw, 104px); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
address { font-style: normal; margin-bottom: 14px; }
.contact__lines a { font-weight: 700; color: var(--night); }
.enquiry { display: grid; gap: 14px; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-xl); background: var(--mist); }
.enquiry label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; color: var(--ink); }
.form-msg { margin: 0; font-weight: 700; }
.form-msg.ok { color: var(--ok); } .form-msg.bad { color: var(--bad); }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

.footer { background: var(--ink); color: #9FB6CC; padding: 40px 0; }
.footer__in { display: grid; gap: 8px; justify-items: start; }
.footer__logo { background: #fff; border-radius: 14px; padding: 8px 12px; }
.footer__logo img { height: 52px; width: auto; }
.footer p { margin: 0; }
.footer__small { font-size: .85rem; }

/* Drawer */
.drawer, .modal { position: fixed; inset: 0; z-index: 80; }
.drawer__shade, .modal__shade { position: absolute; inset: 0; background: rgba(0,20,45,.55); backdrop-filter: blur(3px); animation: fade .3s both; }
@keyframes fade { from { opacity: 0; } }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; display: flex; flex-direction: column; animation: slide .4s var(--ease) both; }
@keyframes slide { from { transform: translateX(100%); } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 1.3rem; margin: 0; }
.x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink); }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line__icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--mist); }
.line__icon i { width: 30px; height: 18px; border-radius: 6px; background: var(--c, var(--night)); }
.line b { color: var(--ink); display: block; line-height: 1.3; }
.line small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.line__right { text-align: right; }
.line__right b { white-space: nowrap; }
.line__qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.line__qty button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.line__rm { background: none; border: 0; color: var(--bad); font: 700 .82rem/1 var(--body); cursor: pointer; padding: 8px 0 0; }
.empty { text-align: center; padding: 48px 10px; color: var(--muted); }
.drawer__foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); }
.drawer__total { display: flex; justify-content: space-between; font-size: 1.1rem; margin: 0 0 4px; color: var(--ink); }
.drawer__total b { font-family: var(--head); }
.drawer__note { color: var(--ok); font-size: .88rem; font-weight: 700; }

/* Modal */
.modal { display: grid; place-items: center; padding: 16px; }
.modal__box { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: var(--r-xl); padding: clamp(22px, 4vw, 34px); animation: pop .4s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal__box > .x { position: absolute; top: 14px; right: 14px; }
.modal h3 { font-size: 1.5rem; padding-right: 48px; }
.mform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mform label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; color: var(--ink); }
.mform .full { grid-column: 1 / -1; }
.summary { background: var(--mist); border-radius: var(--r-m); padding: 14px 16px; margin: 12px 0 16px; font-size: .94rem; }
.summary p { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
.summary p:last-child { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 800; color: var(--ink); }
.pay { border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); }
.pay__head { background: linear-gradient(135deg, #0B1F4D, #1E4BB8); color: #fff; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.pay__head b { font-family: var(--head); font-size: 1.3rem; }
.pay__body { padding: 16px 18px; display: grid; gap: 10px; }
.pay__opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-m); cursor: pointer; font-weight: 700; color: var(--ink); }
.pay__opt input { width: 18px; min-height: 0; accent-color: var(--night); }
.pay__opt:has(input:checked) { border-color: var(--night); background: #F2F9FD; }
.pay__gw { font-size: .82rem; color: var(--muted); text-align: center; margin: 4px 0 0; }
.demo-note { font-size: .82rem; color: var(--muted); background: #E8F6FC; border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; }
.done { text-align: center; }
.done__tick { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px; background: var(--ok); display: grid; place-items: center; animation: pop .5s var(--ease) both; }
.done__tick svg { width: 40px; height: 40px; }
.done__tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done__code { font: 800 1.4rem/1 var(--head); color: var(--ink); background: var(--mist); padding: 12px 16px; border-radius: 12px; display: inline-block; margin: 6px 0 14px; letter-spacing: .04em; }
.spinner { width: 44px; height: 44px; margin: 24px auto; border-radius: 50%; border: 4px solid var(--mist-2); border-top-color: var(--night); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { .mform { grid-template-columns: 1fr; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 200%); visibility: hidden; z-index: 90; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); transition: transform .4s var(--ease), visibility .4s; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

/* Scroll reveal */
.js .reveal { opacity: 0; }
.reveal.is-in { animation: rise .9s var(--ease) var(--d, 0ms) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; }
}
