/* Etern – beställningswizard
   Layout: stegrad överst, formulär till vänster, prisöversikt som följer med till höger (bottenlist på mobil).
   Alla färger och typsnitt är tokens på .etw så att wizarden inte krockar med WordPress-temat. */
.etw {
  --etw-bg: #f4f6f3;
  --etw-surface: #ffffff;
  --etw-surface-2: #eaefe9;
  --etw-ink: #15211c;
  --etw-muted: #5b6a63;
  --etw-line: #d5ddd6;
  --etw-pine: #1d5c47;
  --etw-pine-ink: #ffffff;
  --etw-pine-soft: #dcebe3;
  --etw-ember: #d9822b;
  --etw-ember-soft: #fbead7;
  --etw-danger: #b3261e;
  --etw-danger-soft: #fbe4e2;
  --etw-panel: #15211c;
  --etw-ember-ink: #7a4310;
  --etw-focus: #2f8f6b;
  --etw-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --etw-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --etw-radius: 14px;
  --etw-radius-sm: 9px;

  color: var(--etw-ink);
  font-family: var(--etw-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.etw *, .etw *::before, .etw *::after { box-sizing: border-box; }
.etw button, .etw input, .etw textarea, .etw select { font: inherit; color: inherit; }
.etw h2, .etw h3, .etw h4, .etw p { margin: 0; }

/* ---------- Stegrad ---------- */
.etw-progress {
  display: flex; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0;
  counter-reset: etwstep;
}
.etw-progress li {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 7px;
  font-size: 12.5px; color: var(--etw-muted); letter-spacing: .01em;
}
.etw-progress li::before {
  content: ""; display: block; height: 4px; border-radius: 4px; background: var(--etw-line);
  transition: background .25s;
}
.etw-progress li.is-done::before { background: var(--etw-pine); }
.etw-progress li.is-current::before { background: var(--etw-ember); }
.etw-progress li.is-current { color: var(--etw-ink); font-weight: 600; }
.etw-progress li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .etw-progress li span { display: none; }
  .etw-progress li.is-current span { display: block; position: absolute; }
  .etw-progress { position: relative; padding-bottom: 22px; }
  .etw-progress li.is-current span { left: 0; bottom: 0; }
}

/* ---------- Skal ---------- */
.etw-shell {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start;
}
@media (max-width: 960px) { .etw-shell { grid-template-columns: minmax(0, 1fr); } }

.etw-card {
  background: var(--etw-surface);
  border: 1px solid var(--etw-line);
  border-radius: var(--etw-radius);
  padding: clamp(20px, 4vw, 36px);
  min-width: 0;
}
.etw-step { display: flex; flex-direction: column; gap: 26px; animation: etwIn .28s ease both; }
@keyframes etwIn { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.etw-eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--etw-pine);
}
.etw-step-head { display: flex; flex-direction: column; gap: 8px; }
.etw-step-head h2 {
  font-family: var(--etw-display); font-weight: 700; font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.15; letter-spacing: -.015em; text-wrap: balance;
}
.etw-step-head p { color: var(--etw-muted); max-width: 60ch; }

.etw-section { display: flex; flex-direction: column; gap: 12px; }
.etw-section > h3 { font-size: 15px; font-weight: 700; }
.etw-hint { font-size: 13.5px; color: var(--etw-muted); }

/* ---------- Fält ---------- */
.etw-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .etw-grid2 { grid-template-columns: minmax(0, 1fr); } }
.etw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.etw-field label, .etw-label { font-size: 14px; font-weight: 600; }
.etw-field .etw-opt { font-weight: 400; color: var(--etw-muted); }
.etw-input, .etw-textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--etw-radius-sm);
  border: 1.5px solid var(--etw-line); background: var(--etw-surface);
  transition: border-color .15s, box-shadow .15s;
}
.etw-textarea { min-height: 104px; resize: vertical; }
.etw-input:focus, .etw-textarea:focus {
  outline: none; border-color: var(--etw-focus); box-shadow: 0 0 0 3px var(--etw-pine-soft);
}
.etw-input::placeholder, .etw-textarea::placeholder { color: var(--etw-muted); opacity: .75; }
.etw-field.has-error .etw-input, .etw-field.has-error .etw-textarea { border-color: var(--etw-danger); }
.etw-error { font-size: 13px; color: var(--etw-danger); font-weight: 600; }

/* ---------- Valknappar (chips) ---------- */
.etw-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.etw-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--etw-line); background: var(--etw-surface);
  font-size: 14.5px; font-weight: 500; transition: border-color .15s, background .15s;
}
.etw-chip:hover { border-color: var(--etw-pine); }
.etw-chip[aria-pressed="true"], .etw-chip[aria-checked="true"] {
  background: var(--etw-pine); border-color: var(--etw-pine); color: var(--etw-pine-ink);
}
.etw-chip:focus-visible, .etw-tile:focus-visible, .etw-pkg:focus-visible, .etw-btn:focus-visible,
.etw-switch input:focus-visible + .etw-switch-ui, .etw-swatch:focus-visible, .etw-link:focus-visible {
  outline: 3px solid var(--etw-focus); outline-offset: 2px;
}

/* ---------- Valrutor (tiles) ---------- */
.etw-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.etw-tile {
  text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border-radius: var(--etw-radius-sm);
  border: 1.5px solid var(--etw-line); background: var(--etw-surface);
  transition: border-color .15s, background .15s;
}
.etw-tile strong { font-size: 15px; }
.etw-tile span { font-size: 13.5px; color: var(--etw-muted); }
.etw-tile:hover { border-color: var(--etw-pine); }
.etw-tile[aria-checked="true"] { border-color: var(--etw-pine); background: var(--etw-pine-soft); box-shadow: inset 0 0 0 1px var(--etw-pine); }

/* ---------- Paket ---------- */
.etw-pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .etw-pkgs { grid-template-columns: minmax(0, 1fr); } }
.etw-pkg {
  position: relative; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px 20px 20px; border-radius: var(--etw-radius);
  border: 1.5px solid var(--etw-line); background: var(--etw-surface);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.etw-pkg:hover { border-color: var(--etw-pine); transform: translateY(-2px); }
.etw-pkg[aria-checked="true"] { border-color: var(--etw-pine); box-shadow: inset 0 0 0 1.5px var(--etw-pine), 0 10px 28px -18px rgba(21,33,28,.5); }
.etw-pkg-name { font-family: var(--etw-display); font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.etw-pkg-tag { font-size: 14px; color: var(--etw-muted); min-height: 2.9em; }
.etw-price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.etw-price b { font-family: var(--etw-display); font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.etw-price small { font-size: 13.5px; color: var(--etw-muted); }
.etw-pkg-pages { font-size: 13.5px; font-weight: 700; color: var(--etw-pine); }
.etw-pkg ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.etw-pkg li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; }
.etw-pkg li::before {
  content: ""; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%;
  background: var(--etw-pine-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%231d5c47' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.etw-pkg li.is-addon { color: var(--etw-pine); font-weight: 600; }
.etw-badge {
  position: absolute; top: -11px; left: 18px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--etw-ember); color: #1d1206;
}
.etw-radio-dot {
  position: absolute; top: 20px; right: 18px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--etw-line); transition: border .15s;
}
.etw-pkg[aria-checked="true"] .etw-radio-dot { border: 6px solid var(--etw-pine); }

.etw-promise {
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--etw-muted);
  padding: 14px 16px; border-radius: var(--etw-radius-sm); background: var(--etw-surface-2);
}
.etw-promise span { display: inline-flex; align-items: center; gap: 7px; }
.etw-promise span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--etw-ember); }

/* ---------- Tillval ---------- */
.etw-addon-group { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--etw-line); border-radius: var(--etw-radius-sm); overflow: hidden; }
.etw-addon {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center;
  padding: 14px 16px; background: var(--etw-surface);
}
.etw-addon + .etw-addon { border-top: 1px solid var(--etw-line); }
.etw-addon.is-on { background: var(--etw-pine-soft); }
.etw-addon-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.etw-addon-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 600; font-size: 15px; }
.etw-addon-desc { font-size: 13.5px; color: var(--etw-muted); }
.etw-addon-side { display: flex; align-items: center; gap: 14px; }
.etw-addon-price { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; white-space: nowrap; }
.etw-pill {
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em;
}
.etw-pill-inc { background: var(--etw-pine); color: var(--etw-pine-ink); }
.etw-pill-tip { background: var(--etw-ember-soft); color: var(--etw-ember-ink); }
.etw-included { font-size: 13.5px; font-weight: 700; color: var(--etw-pine); white-space: nowrap; }

.etw-switch { position: relative; display: inline-flex; cursor: pointer; }
.etw-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; width: 100%; height: 100%; }
.etw-switch-ui {
  width: 44px; height: 26px; border-radius: 999px; background: var(--etw-line); position: relative;
  transition: background .18s;
}
.etw-switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s;
}
.etw-switch input:checked + .etw-switch-ui { background: var(--etw-pine); }
.etw-switch input:checked + .etw-switch-ui::after { transform: translateX(18px); }

.etw-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--etw-line); border-radius: 999px; background: var(--etw-surface); }
.etw-qty button { width: 32px; height: 30px; border: 0; background: none; cursor: pointer; font-size: 17px; font-weight: 700; color: var(--etw-pine); }
.etw-qty button:disabled { color: var(--etw-line); cursor: default; }
.etw-qty output { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- Stil ---------- */
.etw-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.etw-style { padding: 10px; gap: 10px; }
.etw-mini {
  height: 86px; border-radius: 7px; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 9px;
}
.etw-mini i { display: block; border-radius: 3px; }
.etw-mini .a { height: 8px; width: 45%; }
.etw-mini .b { height: 18px; width: 80%; }
.etw-mini .c { height: 6px; width: 60%; opacity: .6; }
.etw-mini .d { height: 14px; width: 34%; border-radius: 99px; margin-top: auto; }
.etw-mini.s-ren { background: #fbfbfa; border: 1px solid #e4e4e0; } .s-ren .a,.s-ren .b,.s-ren .c { background: #22262a; } .s-ren .d { background: var(--etw-swatch, #2b6cb0); }
.etw-mini.s-varm { background: #f6ede3; } .s-varm .a,.s-varm .b,.s-varm .c { background: #5a3b2a; } .s-varm .b { border-radius: 9px; } .s-varm .d { background: var(--etw-swatch, #b8572f); }
.etw-mini.s-mork { background: #16181d; } .s-mork .a,.s-mork .b,.s-mork .c { background: #e9e6df; } .s-mork .d { background: var(--etw-swatch, #c9a55a); }
.etw-mini.s-farg { background: linear-gradient(135deg, #ffe36e, #ff9a8b); } .s-farg .a,.s-farg .b,.s-farg .c { background: #1e1b3a; } .s-farg .b { border-radius: 10px; } .s-farg .d { background: var(--etw-swatch, #1e1b3a); }

.etw-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.etw-swatch {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 3px solid var(--etw-surface);
  box-shadow: 0 0 0 1.5px var(--etw-line); padding: 0;
}
.etw-swatch[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--etw-ink); }
.etw-swatch-custom { position: relative; overflow: hidden; background: conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c); }
.etw-swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }

/* ---------- Knappar ---------- */
.etw-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--etw-line); margin-top: 4px; padding-top: 22px; }
.etw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15.5px; cursor: pointer; transition: background .15s, transform .1s, border-color .15s;
}
.etw-btn:active { transform: translateY(1px); }
.etw-btn-primary { background: var(--etw-pine); color: var(--etw-pine-ink); }
.etw-btn-primary:hover { filter: brightness(.9); }
.etw-btn-ghost { background: transparent; border-color: var(--etw-line); color: var(--etw-ink); }
.etw-btn-ghost:hover { border-color: var(--etw-ink); }
.etw-btn[disabled] { opacity: .6; cursor: progress; }
.etw-link { background: none; border: 0; padding: 0; color: var(--etw-pine); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.etw-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14.5px; cursor: pointer; }
.etw-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--etw-pine); }
.etw-check a { color: var(--etw-pine); font-weight: 600; }

/* ---------- Prisöversikt ---------- */
.etw-summary {
  position: sticky; top: 24px;
  background: var(--etw-panel); color: #eef2ee; border-radius: var(--etw-radius);
  padding: 24px 22px; display: flex; flex-direction: column; gap: 16px;
}
.etw-summary h3 { font-family: var(--etw-display); font-size: 18px; font-weight: 700; }
.etw-sum-lines { display: flex; flex-direction: column; gap: 9px; font-size: 14px; list-style: none; margin: 0; padding: 0; }
.etw-sum-lines li { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.etw-sum-lines li span:first-child { color: #c6d1ca; min-width: 0; }
.etw-sum-lines li.is-pkg span:first-child { color: #fff; font-weight: 700; }
.etw-sum-lines li.is-inc span:last-child { color: #9fd3bb; }
.etw-sum-empty { font-size: 14px; color: #a8b5ad; }
.etw-sum-total { border-top: 1px solid rgba(255,255,255,.16); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.etw-sum-total .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.etw-sum-total b { font-family: var(--etw-display); font-size: 32px; font-weight: 800; color: var(--etw-ember); font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.etw-sum-total small { color: #a8b5ad; font-size: 13px; }
.etw-sum-facts { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #c6d1ca; margin: 0; padding: 0; list-style: none; }
.etw-sum-facts li { display: flex; gap: 8px; }
.etw-sum-facts li::before { content: "✓"; color: var(--etw-ember); font-weight: 700; }

.etw-mobilebar { display: none; }
@media (max-width: 960px) {
  .etw-summary { position: static; }
  .etw-aside { order: 2; }
  .etw-mobilebar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--etw-panel); color: #fff; box-shadow: 0 -8px 24px -12px rgba(0,0,0,.45);
  }
  .etw-mobilebar b { font-family: var(--etw-display); font-size: 21px; color: var(--etw-ember); font-variant-numeric: tabular-nums; }
  .etw-mobilebar small { display: block; font-size: 12px; color: #a8b5ad; }
  .etw-mobilebar .etw-link { color: #fff; }
  .etw { padding-bottom: 84px; }
}

/* ---------- Klar ---------- */
.etw-done { display: flex; flex-direction: column; gap: 22px; animation: etwIn .3s ease both; }
.etw-done-mark {
  width: 58px; height: 58px; border-radius: 50%; background: var(--etw-pine); display: grid; place-items: center;
}
.etw-steps-next { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: n; }
.etw-steps-next li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; counter-increment: n; }
.etw-steps-next li::before {
  content: counter(n); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--etw-ember-soft); color: var(--etw-ember-ink); font-weight: 800; font-size: 14px;
}
.etw-steps-next strong { display: block; }
.etw-steps-next span { color: var(--etw-muted); font-size: 14.5px; }
.etw-ordernr { font-variant-numeric: tabular-nums; font-weight: 700; background: var(--etw-surface-2); padding: 2px 8px; border-radius: 6px; }
.etw-notice { font-size: 13.5px; padding: 10px 14px; border-radius: var(--etw-radius-sm); background: var(--etw-ember-soft); color: var(--etw-ember-ink); }
.etw-alert { font-size: 14px; padding: 12px 14px; border-radius: var(--etw-radius-sm); background: var(--etw-danger-soft); color: var(--etw-danger); font-weight: 600; }

.etw-review { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--etw-line); border-radius: var(--etw-radius-sm); }
.etw-review > div { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 12px; padding: 11px 14px; font-size: 14.5px; align-items: start; }
.etw-review > div + div { border-top: 1px solid var(--etw-line); }
.etw-review dt { color: var(--etw-muted); }
.etw-review dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .etw-review > div { grid-template-columns: minmax(0, 1fr) auto; } .etw-review dt { grid-column: 1 / -1; } }

.etw-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .etw *, .etw *::before, .etw *::after { animation: none !important; transition: none !important; }
}
.etw [hidden] { display: none !important; }

/* Skydd mot WordPress-temats knappstilar */
.etw button { text-transform: none; letter-spacing: normal; line-height: 1.3; min-height: 0; text-shadow: none; }
.etw .etw-chip:hover, .etw .etw-tile:hover, .etw .etw-pkg:hover { background-color: var(--etw-surface); color: var(--etw-ink); }
.etw .etw-chip[aria-pressed="true"]:hover, .etw .etw-chip[aria-checked="true"]:hover { background-color: var(--etw-pine); color: var(--etw-pine-ink); }
.etw .etw-tile[aria-checked="true"]:hover { background-color: var(--etw-pine-soft); }
.etw .etw-qty button:hover, .etw .etw-link:hover { background: none; }
.etw input[type="checkbox"], .etw input[type="color"] { box-shadow: none; }
.etw .etw-field label.etw-check { font-weight: 400; font-size: 14.5px; }
.etw .etw-btn-primary, .etw .etw-btn-primary:hover { color: var(--etw-pine-ink); }
