:root {
  --bg: #FAF8FB;
  --card: #FFFFFF;
  --ink: #1B1D1C;
  --muted: #63675F;
  --line: #EEEAE3;
  --field: #E1DCD3;
  --accent: #7B5EA7;
  --accent-dark: #634890;
  --accent-soft: #F2EDF9;
  --accent-ink: #3E2A5C;
  --pink: #C94C7E;
  --pink-soft: #FCEEF4;
  --pink-ink: #8A2E55;
  --green: #2E7A5C;
  --green-soft: #EAF4EE;
  --shadow: 0 1px 2px rgba(27,29,28,.04), 0 8px 24px rgba(27,29,28,.06);
  --r: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Figtree', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, label, input, select { touch-action: manipulation; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; line-height: 1.5; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 20px; padding-bottom: 56px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* Topp */
.top { position: sticky; top: 0; z-index: 20; background: rgba(250,248,251,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-in { height: 64px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; }
.logo img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(60,40,90,.12); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.nav-app { background: var(--accent); color: #fff !important; }
.cart-btn { position: relative; width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
@media (max-width: 560px) { .nav a[data-nav="home"] { display: none; } .nav a { padding: 8px 10px; font-size: 14px; } .logo span { display: none; } }

/* Knappar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 16px; border: 0; background: #fff; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(123,94,167,.28); }
.btn.primary:hover { background: var(--accent-dark); }
.btn.pink { background: var(--pink); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--accent); }
.btn.block { width: 100%; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* Startsida */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 28px 0 12px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--muted); margin-top: 14px; max-width: 520px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { position: relative; aspect-ratio: 1; border-radius: 32px; background: radial-gradient(circle at 30% 25%, #fff 0, #F3ECFA 45%, #FBE9F1 100%); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.phone { height: 84%; aspect-ratio: 9/17; background: #fff; border-radius: 28px; box-shadow: 0 20px 50px rgba(62,42,92,.22), 0 0 0 7px #1B1820; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.phone .ph-big { font-size: 30px; font-weight: 800; }
.phone .ph-chip { align-self: flex-start; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
.phone .ph-bar { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.phone .ph-bar i { display: block; height: 100%; width: 64%; background: var(--accent); }
.float-card { position: absolute; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 10px 14px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-art { max-width: 420px; width: 100%; margin: 0 auto; } }

.section { margin-top: 52px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 28px; font-weight: 800; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.feature { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.feature .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 4px; }
.feature b { font-size: 16px; }
@media (max-width: 820px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.banner-app { margin-top: 52px; border-radius: 28px; padding: 28px; background: linear-gradient(135deg, var(--accent), var(--pink)); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.banner-app h2 { font-size: 26px; font-weight: 800; }
.banner-app p { opacity: .9; margin-top: 6px; }
.banner-app .btn { background: #fff; color: var(--accent-ink); }

/* Produkter */
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--field); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.pill[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pcard { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s ease; }
.pcard:hover { transform: translateY(-2px); }
.pimg { position: relative; aspect-ratio: 1; background: #F6F3F8; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge.soft { background: #fff; color: var(--accent-ink); box-shadow: var(--shadow); }
.pinfo { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pinfo .ttl { font-weight: 700; font-size: 15px; line-height: 1.3; }
.price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; }
.price b { font-size: 18px; font-weight: 800; }
.price s { color: var(--muted); font-size: 14px; }
.price .sale { color: var(--pink-ink); }
.empty { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 40px 20px; text-align: center; color: var(--muted); }

/* Produktsida */
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; margin-bottom: 14px; }
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 820px) { .pd { grid-template-columns: 1fr; gap: 18px; } }
.gallery-main { aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: #F6F3F8; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs button { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #F6F3F8; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
.pd .price b { font-size: 28px; }
.pd .desc { font-size: 16px; color: #3B3F3A; white-space: pre-line; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 4px; }
.qty button { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--accent-soft); color: var(--accent-dark); font-size: 20px; font-weight: 700; cursor: pointer; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; font-size: 17px; }
.trust { display: grid; gap: 10px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.trust div { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }

/* Varukorg */
.backdrop { position: fixed; inset: 0; background: rgba(20,18,24,.45); z-index: 50; display: flex; justify-content: flex-end; animation: fade .15s ease; }
.drawer { width: min(440px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column; animation: slide .2s ease; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top)) 18px 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 18px; display: flex; flex-direction: column; gap: 10px; }
.drawer-foot { padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.line { display: flex; gap: 12px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 10px; align-items: center; }
.line img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #F6F3F8; }
.line .grow { flex: 1; min-width: 0; }
.line .qty { box-shadow: none; padding: 0; }
.line .qty button { width: 32px; height: 32px; font-size: 17px; }
.sum { display: flex; justify-content: space-between; font-size: 15px; }
.sum.total { font-size: 18px; font-weight: 800; }
.x { width: 40px; height: 40px; border-radius: 12px; border: 0; background: #fff; box-shadow: var(--shadow); cursor: pointer; font-size: 20px; }
.modal-wrap { position: fixed; inset: 0; background: rgba(20,18,24,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 24px; padding: 24px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* Text-sidor */
.doc { max-width: 720px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 26px; }
.doc h1 { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
.doc h2 { font-size: 19px; margin: 22px 0 8px; }
.doc p, .doc li { font-size: 16px; color: #3B3F3A; line-height: 1.55; }
.doc ul { padding-left: 20px; margin: 6px 0; }

/* Sidfot */
.foot { background: #fff; border-top: 1px solid var(--line); padding: 32px 0 calc(20px + env(safe-area-inset-bottom)); }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot-legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 620px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-in .foot-col:first-child { grid-column: 1 / -1; } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #1B1820; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.notice { background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; padding: 12px 14px; font-size: 15px; }
