/* Molaplan order shop – dark, teal, Fira Sans (matches the app and the brochure). */
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-display: swap; src: url(fonts/FiraSans-Regular.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 600; font-display: swap; src: url(fonts/FiraSans-SemiBold.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 700; font-display: swap; src: url(fonts/FiraSans-Bold.woff2) format('woff2'); }
:root {
  color-scheme: dark;
  --bg: #0E1116; --bg2: #12171E; --card: #1B222C; --card2: #222B36; --line: #2A3440;
  --ink: #E8EEF0; --mut: #9FB0BC; --mut2: #6F7F8C;
  --teal: #2EC4B6; --teal-d: #159A8E; --teal-l: #CFE9E6; --amber: #E09A2D; --red: #E5615B; --violet: #8B7CF0; --green: #4CC38A;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 'Fira Sans', 'Segoe UI', Roboto, sans-serif; min-height: 100vh; }
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(14,17,22,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; }
.brand small { font-weight: 400; color: var(--mut); font-size: 14px; }
.spacer { flex: 1; }
select.lang { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 12px; padding: 10px 16px; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--teal-d); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #0B1F1D; }
.btn.primary:hover { background: #3fd3c5; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.btn .badge, .badge { display: inline-flex; min-width: 22px; height: 22px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 11px;
  background: var(--teal); color: #0B1F1D; font-size: 13px; font-weight: 700; }
.badge.amber { background: var(--amber); }
.badge.red { background: var(--red); color: #fff; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }

/* hero */
.hero { padding: 40px 0 18px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -.02em; }
.hero p { color: var(--mut); max-width: 680px; margin: 0; font-size: 17px; }
.note { display: flex; gap: 10px; align-items: flex-start; background: rgba(46,196,182,.08); border: 1px solid rgba(46,196,182,.35); color: var(--teal-l);
  border-radius: var(--r); padding: 12px 14px; font-size: 15px; margin: 18px 0 0; max-width: 760px; }
.note svg { flex: 0 0 20px; margin-top: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 6px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--mut); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #0B1F1D; }
.chip .n { opacity: .7; font-weight: 400; margin-left: 4px; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 14px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.card .img { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #1F2a35, #16202A); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .img svg { width: 64px; height: 64px; opacity: .8; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .cat { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.25; cursor: pointer; }
.card p { margin: 0; color: var(--mut); font-size: 15px; flex: 1; }
.price { font-weight: 700; font-size: 17px; }
.price.quote { font-weight: 600; font-size: 14px; color: var(--teal-l); }
.price small { font-weight: 400; color: var(--mut); }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.in-cart { font-size: 13px; color: var(--teal); font-weight: 600; }

/* drawer / dialogs */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg2); border-left: 1px solid var(--line); z-index: 41;
  display: flex; flex-direction: column; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font-size: 20px; }
.drawer .content { flex: 1; overflow: auto; padding: 12px 16px; }
.drawer footer { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
dialog { background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(640px, calc(100% - 24px)); max-height: calc(100% - 24px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog .dimg { aspect-ratio: 16 / 9; background: #16202A; display: flex; align-items: center; justify-content: center; }
dialog .dimg img { width: 100%; height: 100%; object-fit: cover; }
dialog .dbody { padding: 18px 20px 20px; }
dialog h2 { margin: 4px 0 8px; font-size: 24px; line-height: 1.2; }
dialog .desc { color: var(--ink); white-space: pre-line; margin: 10px 0 14px; }
.cartline { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cartline .name { font-weight: 600; }
.cartline .sub { color: var(--mut); font-size: 14px; grid-column: 1 / -1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: var(--card); cursor: pointer; font-size: 18px; }
.qty input { width: 48px; height: 38px; text-align: center; border: 0; background: var(--bg2); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.empty { color: var(--mut); text-align: center; padding: 40px 10px; }

/* forms */
.form { display: grid; gap: 14px; }
.field label, .lbl { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--mut); margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], input[type=password], textarea, select.in {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 16px; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal); flex: 0 0 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .two { grid-template-columns: 1fr; } }
.err { color: #FFB4AE; background: rgba(229,97,91,.12); border: 1px solid rgba(229,97,91,.4); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.ok { color: #BDEFD7; background: rgba(76,195,138,.12); border: 1px solid rgba(76,195,138,.4); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* checkout layout */
.checkout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 26px 0 50px; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 20px; }
.summary .line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary .line:last-child { border-bottom: 0; }
.thanks { text-align: center; padding: 60px 0 80px; max-width: 620px; margin: 0 auto; }
.thanks .big { width: 72px; height: 72px; border-radius: 50%; background: rgba(46,196,182,.15); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.thanks h1 { margin: 0 0 10px; }
.thanks p { color: var(--mut); }

footer.site { border-top: 1px solid var(--line); color: var(--mut); font-size: 14px; padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer.site a { color: var(--mut); }

.prose { max-width: 760px; padding: 30px 0 60px; }
.prose h1 { font-size: 32px; line-height: 1.15; margin: 0 0 12px; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: #CED8DC; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--card2); border: 1px solid var(--teal-d);
  color: var(--ink); padding: 10px 16px; border-radius: 12px; z-index: 60; box-shadow: 0 6px 24px rgba(0,0,0,.4); font-weight: 600; max-width: calc(100% - 24px); }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25); border-top-color: currentColor; border-radius: 50%; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .brand small { display: none; }
  #cartLabel { display: none; }
  header.top .wrap { gap: 8px; }
}
