/* Stuga — Scandinavian furniture store */
:root {
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #faf7f2;
  --ink: #1b1f2e;
  --ink-2: #454a5c;
  --muted: #7a7d8a;
  --blue: #22398f;
  --blue-2: #192b70;
  --yellow: #ffcf33;
  --sand: #f1ece4;
  --line: rgba(27, 31, 46, 0.09);
  --tm-ink: #22398f;
  --tm-bg: rgba(34, 57, 143, 0.05);
}
.btn { font-weight: 700; }
.btn-blue { --b-bg: var(--blue); --b-fg: #fff; }
.btn-yellow { --b-bg: var(--yellow); --b-fg: var(--blue-2); }
h1, h2, h3 { font-weight: 800; }

/* ---------- Promo + nav ---------- */
.promo { background: var(--yellow); color: var(--blue-2); font-size: 13px; font-weight: 600; }
.promo .container { display: flex; justify-content: center; gap: 28px; padding: 9px 0; flex-wrap: wrap; }
.promo span { display: inline-flex; align-items: center; gap: 8px; }
.nav { position: sticky; top: 0; z-index: 100; padding: 12px 0; transition: background 0.4s, box-shadow 0.4s; }
.nav.scrolled { background: rgba(250, 247, 242, 0.75); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); box-shadow: 0 1px 0 var(--line); }
.nav .container { display: flex; align-items: center; gap: 24px; }
.logo { font-size: 30px; font-weight: 800; letter-spacing: -0.05em; color: var(--blue); line-height: 1; }
.logo span { color: var(--yellow); }
.nav-links { display: flex; gap: 4px; font-weight: 600; font-size: 15px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; transition: background 0.3s; }
.nav-links a:hover { background: rgba(34, 57, 143, 0.07); }
.search { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); max-width: 420px; margin-left: auto; transition: box-shadow 0.3s, border-color 0.3s; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(34, 57, 143, 0.12); }
.search input { border: 0; outline: 0; background: none; width: 100%; font-size: 15px; color: var(--ink); }
.icons { display: flex; gap: 4px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; transition: background 0.3s; }
.icon-btn:hover { background: rgba(34, 57, 143, 0.08); }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--yellow); color: var(--blue-2); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.cart-count.bump { animation: bump 0.6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }

/* ---------- Hero ---------- */
.hero { padding: 8px 0 0; }
.hero-frame { position: relative; border-radius: 40px; overflow: hidden; min-height: clamp(520px, 72vh, 720px); }
.hero-frame .media { position: absolute; inset: 0; }
.hero-frame .media img { animation: settle 2.4s var(--ease) both; }
@keyframes settle { from { transform: scale(1.08); } }
.hero-card { position: absolute; left: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 40px); max-width: 520px; padding: clamp(24px, 3vw, 40px); border-radius: 32px; background: rgba(250, 247, 242, 0.72); }
.hero-card .chip { background: var(--yellow); border-color: transparent; color: var(--blue-2); font-weight: 700; }
.hero-card h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: 0.98; letter-spacing: -0.045em; margin: 18px 0 14px; color: var(--ink); }
.hero-card p { color: var(--ink-2); font-size: 17px; }
.hero-card .actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

.hotspot { position: absolute; z-index: 5; }
.hotspot > button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--blue); display: grid; place-items: center; font-size: 13px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); animation: hsring 2.4s infinite; transition: transform 0.4s var(--ease), background 0.3s; }
.hotspot > button:hover, .hotspot.open > button { transform: rotate(45deg) scale(1.1); background: var(--yellow); }
@keyframes hsring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.75), 0 6px 16px rgba(0, 0, 0, 0.2); } 70%, 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0), 0 6px 16px rgba(0, 0, 0, 0.2); } }
.tip { position: absolute; left: 50%; bottom: calc(100% + 12px); width: 220px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.35); transform: translate(-50%, 8px) scale(0.96); opacity: 0; pointer-events: none; transition: all 0.4s var(--ease); }
.hotspot:hover .tip, .hotspot.open .tip, .hotspot:focus-within .tip { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tip b { display: block; font-size: 13px; letter-spacing: 0.04em; }
.tip span { font-size: 13px; color: var(--muted); }
.tip .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.tip .row strong { font-size: 20px; letter-spacing: -0.03em; }
.tip .row button { height: 32px; padding: 0 12px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; }

/* ---------- Categories ---------- */
.cats { padding: 40px 0 0; }
.cat-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; }
.cat-row::-webkit-scrollbar { display: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 15px; transition: all 0.35s var(--ease); }
.cat .ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--blue); font-size: 16px; transition: all 0.35s var(--ease); }
.cat:hover { border-color: rgba(34, 57, 143, 0.35); }
.cat[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.cat[aria-pressed="true"] .ico { background: var(--yellow); color: var(--blue-2); }

/* ---------- Products ---------- */
section.block { padding: clamp(64px, 8vw, 110px) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.sec-head h2 { font-size: clamp(32px, 3.8vw, 52px); letter-spacing: -0.045em; line-height: 1; }
.sec-head a { font-weight: 700; color: var(--blue); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product { position: relative; display: flex; flex-direction: column; border-radius: 28px; background: #fff; border: 1px solid var(--line); padding: 10px; transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease); }
.product:hover { box-shadow: 0 30px 50px -30px rgba(27, 31, 46, 0.35); transform: translateY(-4px); }
.product.hide { display: none; }
.product.pop { animation: popin 0.6s var(--ease); }
@keyframes popin { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.product .media { aspect-ratio: 1; border-radius: 20px; background: var(--sand); }
.product:hover .media img { transform: scale(1.05); }
.fav { position: absolute; top: 20px; right: 20px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; font-size: 15px; transition: transform 0.3s var(--ease), color 0.3s; }
.fav:hover { transform: scale(1.1); }
.fav[aria-pressed="true"] { color: #e0245e; }
.flag { position: absolute; top: 20px; left: 20px; z-index: 3; padding: 5px 10px; border-radius: 8px; background: var(--yellow); color: var(--blue-2); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.flag.blue { background: var(--blue); color: #fff; }
.product .info { padding: 16px 8px 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product h3 { font-size: 16px; letter-spacing: 0.06em; }
.product p { font-size: 14px; color: var(--muted); line-height: 1.4; }
.rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rating .stars { color: var(--ink); display: flex; gap: 1px; font-size: 11px; }
.buy { display: flex; justify-content: space-between; align-items: end; margin-top: auto; padding-top: 14px; }
.price { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.price sup { font-size: 0.5em; vertical-align: top; position: relative; top: 0.12em; margin-right: 1px; }
.add { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 17px; transition: transform 0.4s var(--ease), background 0.3s; }
.add:hover { transform: scale(1.08); background: var(--blue-2); }
.add.done { background: #16a34a; }
.flyer { position: fixed; z-index: 999; border-radius: 16px; object-fit: cover; pointer-events: none; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4); }

/* ---------- Inspiration ---------- */
.insp { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 18px; min-height: clamp(560px, 70vw, 760px); }
.tile { position: relative; border-radius: 32px; overflow: hidden; display: flex; align-items: flex-end; padding: 22px; isolation: isolate; }
.tile .media { position: absolute; inset: 0; z-index: -1; }
.tile:hover .media img { transform: scale(1.05); }
.tile.big { grid-row: span 2; }
.tile-label { padding: 18px 20px; border-radius: 22px; background: rgba(255, 255, 255, 0.78); display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; }
.tile-label h3 { font-size: 22px; letter-spacing: -0.03em; }
.tile-label p { font-size: 14px; color: var(--ink-2); }
.tile-label .arrow-circle { background: var(--blue); flex: none; }
.tile:hover .arrow-circle { transform: rotate(-45deg); }
.tile.plan { background: var(--blue); color: #fff; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 32px; }
.tile.plan::before { content: ""; position: absolute; right: -20%; bottom: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 207, 51, 0.45), transparent 65%); z-index: -1; }
.tile.plan .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--yellow); color: var(--blue-2); font-size: 24px; }
.tile.plan h3 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.035em; line-height: 1.05; }
.tile.plan p { color: rgba(255, 255, 255, 0.75); margin-top: 8px; }

/* ---------- Value props ---------- */
.props { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.prop { padding: 26px; border-radius: 26px; background: var(--sand); }
.prop .ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--blue); font-size: 20px; margin-bottom: 28px; }
.prop h3 { font-size: 18px; letter-spacing: -0.02em; margin-bottom: 6px; }
.prop p { font-size: 15px; color: var(--ink-2); }

/* ---------- Membership ---------- */
.member { position: relative; overflow: hidden; border-radius: 40px; background: var(--yellow); color: var(--blue-2); padding: clamp(36px, 6vw, 80px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; isolation: isolate; }
.member::before, .member::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.member::before { width: 380px; height: 380px; right: -80px; top: -140px; background: rgba(255, 255, 255, 0.35); animation: drift2 12s ease-in-out infinite alternate; }
.member::after { width: 220px; height: 220px; left: 38%; bottom: -120px; background: rgba(34, 57, 143, 0.08); animation: drift2 9s ease-in-out infinite alternate-reverse; }
@keyframes drift2 { to { transform: translate(-30px, 30px); } }
.member h2 { font-size: clamp(34px, 4.4vw, 60px); letter-spacing: -0.045em; line-height: 1; }
.member p { margin-top: 14px; font-size: 17px; font-weight: 500; }
.join { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: 0 20px 40px -24px rgba(100, 70, 0, 0.6); }
.join input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 18px; font-size: 16px; background: none; }
.join-note { font-size: 13px; margin-top: 12px; opacity: 0.75; }
.join-ok { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; }
.join-ok .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; }

/* ---------- Footer ---------- */
.foot { background: var(--blue-2); color: rgba(255, 255, 255, 0.75); padding: 70px 0 90px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot .logo { color: #fff; display: inline-block; margin-bottom: 14px; }
.foot h4 { color: #fff; font-size: 14px; margin-bottom: 14px; font-weight: 700; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.foot .credits { color: rgba(255, 255, 255, 0.55); margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot .credits a { text-decoration-color: rgba(255, 255, 255, 0.3); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; top: 84px; z-index: 200; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 999px; background: rgba(27, 31, 46, 0.88); color: #fff; font-size: 14px; font-weight: 600; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.5); transform: translate(-50%, -20px); opacity: 0; transition: all 0.5s var(--ease); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #16a34a; }

/* ---------- Template mode tweaks ---------- */
.is-template .hotspot { opacity: 0.35; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .props { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 820px) {
  .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .insp { grid-template-columns: 1fr; grid-template-rows: auto; }
  .tile { min-height: 320px; }
  .tile.big { grid-row: auto; min-height: 420px; }
  .member { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .search { display: none; }
  .icons { margin-left: auto; }
  .promo span:nth-child(n+2) { display: none; }
  .hero-frame { min-height: 640px; }
  .hero-card { right: 16px; }
  .hotspot { display: none; }
}
@media (max-width: 520px) {
  .props { grid-template-columns: 1fr; }
  .price { font-size: 24px; }
  .add { width: 40px; height: 40px; }
  .product p { display: none; }
}

/* ---------- Fluid scaling ---------- */
.foot { padding-bottom: calc(90px + var(--safe-b)); }
@media (max-width: 420px) {
  .logo { font-size: 26px; }
  .nav .container { gap: 12px; }
  .icon-btn { width: 40px; height: 40px; font-size: 17px; }
  .hero-frame { border-radius: 28px; min-height: 600px; }
  .hero-card { left: 10px; right: 10px; bottom: 10px; border-radius: 24px; padding: 20px; }
  .hero-card .actions .btn { flex: 1; }
  .cat { height: 46px; font-size: 14px; }
  .products { gap: 8px; }
  .product { padding: 6px; border-radius: 22px; }
  .product .media { border-radius: 16px; }
  .product .info { padding: 12px 4px 4px; }
  .product h3 { font-size: 14px; }
  .fav { top: 10px; right: 10px; width: 28px; height: 28px; font-size: 12px; }
  .flag { top: 10px; left: 10px; padding: 4px 6px; font-size: 9px; letter-spacing: 0; border-radius: 6px; }
  .price { font-size: 21px; }
  .add { width: 36px; height: 36px; font-size: 14px; }
  .tile { padding: 12px; } .tile-label { padding: 14px; } .tile-label h3 { font-size: 18px; }
  .member { border-radius: 28px; padding: 28px 20px; }
  .join input { padding: 0 12px; }
  .join .btn { padding: 0 16px; }
}
@media (min-width: 1680px) {
  .hero-frame { min-height: clamp(720px, 70vh, 920px); }
  .hero-card { max-width: 620px; }
  .hero-card h1 { font-size: 86px; }
  .hero-card p { font-size: 19px; }
  .product h3 { font-size: 18px; } .product p { font-size: 15px; }
  .price { font-size: 34px; }
  .prop h3 { font-size: 20px; } .prop p { font-size: 16px; }
}

/* Let the membership columns shrink on small phones */
.member > * { min-width: 0; }
