/*
Theme Name: Skyddsam Shop
Theme URI: https://skyddsam.mkdsgn.se
Author: MKDSGN
Description: Minimalistisk WooCommerce-butik med livepreview för eget tryck.
Version: 1.4.0
Text Domain: skyddsam-shop
*/

:root {
  color-scheme: dark;
  --bg: #090b0e;
  --bg-subtle: #0f1217;
  --surface: #151920;
  --surface-2: #1b2028;
  --text: #f5f7fa;
  --muted: #9ca6b5;
  --border: rgba(255,255,255,.12);
  --accent: #087ee8;
  --accent-strong: #2594ff;
  --success: #78d7aa;
  --ring: rgba(37,148,255,.42);
  --shadow-1: 0 18px 60px rgba(0,0,0,.24);
  --shadow-2: 0 28px 90px rgba(0,0,0,.38);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;
  --radius-xl: 32px;
  --container: 1280px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f7;
  --bg-subtle: #eceff2;
  --surface: #ffffff;
  --surface-2: #e8ecf0;
  --text: #0b0d11;
  --muted: #586273;
  --border: rgba(11,13,17,.13);
  --accent: #006ed5;
  --accent-strong: #005bb2;
  --success: #097449;
  --ring: rgba(0,110,213,.28);
  --shadow-1: 0 18px 50px rgba(21,33,48,.09);
  --shadow-2: 0 30px 90px rgba(21,33,48,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 480;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .03;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.eyebrow { margin: 0 0 10px; color: var(--accent-strong); font-size: .73rem; font-weight: 780; letter-spacing: .15em; text-transform: uppercase; }
.display { margin: 0; font-size: clamp(3.1rem, 7vw, 7.2rem); line-height: .91; letter-spacing: -.07em; font-weight: 790; }
.section-title { margin: 0; font-size: clamp(2.25rem, 4vw, 4.8rem); line-height: .98; letter-spacing: -.055em; }
.muted { color: var(--muted); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-s); }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 15; padding: 14px 0; pointer-events: none; }
.nav-shell { min-height: 68px; padding: 10px 12px 10px 18px; border: 1px solid var(--border); border-radius: var(--radius-m); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px); box-shadow: var(--shadow-1); display: flex; align-items: center; justify-content: space-between; gap: 22px; pointer-events: auto; }
.brand img { width: 190px; height: auto; }
[data-theme="light"] .brand img { filter: brightness(.08); }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: .88rem; font-weight: 650; }
.nav-links a { color: var(--muted); transition: color .2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .cart-link { min-width: 42px; height: 42px; border: 1px solid var(--border); color: var(--text); background: var(--surface); border-radius: var(--radius-s); display: inline-flex; align-items: center; justify-content: center; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.icon-btn:hover, .cart-link:hover { transform: translateY(-2px); border-color: var(--accent); }
.cart-link { gap: 8px; padding: 0 14px; font-size: .82rem; font-weight: 720; }
.cart-count { color: var(--accent-strong); }

.hero { min-height: 84vh; padding: clamp(72px, 10vw, 150px) 0 70px; display: grid; align-items: end; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(350px, .95fr); align-items: end; gap: clamp(40px, 7vw, 110px); }
.hero-copy { padding-bottom: 5vw; position: relative; z-index: 2; }
.hero-copy .lead { max-width: 620px; margin: 26px 0 34px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.24rem); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--radius-s); background: var(--accent); color: white; font-weight: 760; box-shadow: 0 14px 32px rgba(0,120,232,.28); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.primary-btn:hover { transform: translateY(-2px); background: var(--accent-strong); box-shadow: 0 18px 42px rgba(0,120,232,.36); }
.primary-btn:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.hero-price { display: flex; flex-direction: column; line-height: 1.1; }
.hero-price strong { font-size: 1.5rem; letter-spacing: -.03em; }
.hero-price span { color: var(--muted); font-size: .75rem; }
.hero-visual { position: relative; min-height: 620px; border-radius: var(--radius-xl) var(--radius-xl) 12px var(--radius-xl); overflow: hidden; background: #e8e7e5; box-shadow: var(--shadow-2); }
.hero-visual::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(150deg, transparent 55%, rgba(0,120,232,.16)); pointer-events: none; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.visual-tag { position: absolute; right: 18px; bottom: 18px; z-index: 2; padding: 9px 12px; border-radius: var(--radius-s); background: rgba(8,10,13,.76); color: white; backdrop-filter: blur(12px); font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }

.configurator { padding: 110px 0; background: var(--bg-subtle); }
.config-head { display: grid; grid-template-columns: 1fr .55fr; gap: 40px; align-items: end; margin-bottom: 48px; }
.config-head p:last-child { color: var(--muted); max-width: 520px; margin: 0; justify-self: end; }
.product-shell { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.product-stage { position: relative; min-height: 720px; display: grid; place-items: center; overflow: hidden; background: #e5e5e3; }
.product-stage > img { width: 100%; height: 100%; object-fit: cover; }
.print-preview { position: absolute; left: 36.5%; top: 37.5%; width: 21%; min-height: 46px; transform: rotate(-1deg); color: #fff; text-align: center; font-size: clamp(.52rem, 1.1vw, .96rem); font-weight: 780; letter-spacing: .06em; line-height: 1.15; text-transform: uppercase; text-shadow: 0 1px 3px rgba(0,0,0,.7); overflow-wrap: anywhere; display: grid; place-items: center; opacity: 0; transition: opacity .2s ease, color .2s ease; }
.print-preview.is-visible { opacity: 1; }
.product-panel { padding: clamp(28px, 4vw, 58px); display: flex; flex-direction: column; }
.product-panel h3 { margin: 0; font-size: clamp(2rem, 3vw, 3.4rem); letter-spacing: -.05em; line-height: 1; }
.product-subline { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0 26px; border-bottom: 1px solid var(--border); }
.product-subline strong { font-size: 1.55rem; }
.stock { color: var(--success); font-size: .8rem; font-weight: 700; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 7px; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.product-form { display: grid; gap: 22px; padding-top: 28px; }
.field { display: grid; gap: 9px; }
.field label, .field legend { color: var(--muted); font-size: .76rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.field input[type="text"], .field select, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--bg); color: var(--text); padding: 14px 15px; transition: border-color .2s ease, box-shadow .2s ease; }
.field input[type="text"]:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); outline: 0; }
.field-hint { color: var(--muted); font-size: .76rem; }
.size-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.field-heading > span { color: var(--muted); font-size: .76rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.size-guide-trigger { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--text); font-size: .76rem; font-weight: 680; line-height: 1.45; transition: color .2s ease; }
.size-guide-trigger:hover { color: var(--accent-strong); }
.size-dialog { position: fixed; inset: 0; z-index: 1000; width: min(1096px, calc(100% - 32px)); max-height: min(540px, calc(100vh - 32px)); margin: auto; padding: 0; border: 1px solid #111; border-radius: 0; background: #fff; color: #111; box-shadow: 0 0 0 100vmax rgba(4,7,11,.7), 0 36px 100px rgba(0,0,0,.4); overflow: hidden; }
.size-dialog:not([open]) { display: none; }
.size-dialog::backdrop { background: rgba(4,7,11,.72); backdrop-filter: blur(8px); }
.size-dialog-inner { position: relative; padding: 40px; overflow: auto; max-height: min(540px, calc(100vh - 32px)); }
.size-dialog-close { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #111; transition: transform .2s ease; }
.size-dialog-close:hover { transform: rotate(6deg); }
.size-dialog-close svg { width: 25px; height: 25px; stroke-width: 2.2; }
.size-table-wrap { overflow-x: auto; border: 0; }
.size-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.size-table th, .size-table td { padding: 7px 18px; border: 2px solid #111; text-align: center; white-space: nowrap; color: #111; background: #fff; line-height: 1.1; }
.size-table th:first-child, .size-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 215px; text-align: left; background: #fff; }
.size-table th { font-size: 1rem; font-weight: 800; letter-spacing: 0; text-transform: none; }
.size-table td:first-child { font-weight: 500; }
body:has(.size-dialog[open]) { overflow: hidden; }
.size-grid input { position: absolute; opacity: 0; pointer-events: none; }
.size-grid label { height: 44px; border: 1px solid var(--border); border-radius: 7px; display: grid; place-items: center; color: var(--muted); font-size: .8rem; font-weight: 760; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.size-grid input:checked + label { color: white; background: var(--accent); border-color: var(--accent); }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-swatch { position: relative; }
.color-swatch input { position: absolute; opacity: 0; }
.color-swatch span { width: 32px; height: 32px; display: block; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); transition: transform .2s ease, box-shadow .2s ease; }
.color-swatch input:checked + span { transform: scale(.88); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.buy-row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; margin-top: 6px; }
.qty { display: flex; border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; }
.qty button { width: 30px; border: 0; background: var(--bg); color: var(--text); }
.qty input { width: 32px; border: 0; background: var(--bg); color: var(--text); text-align: center; appearance: textfield; }
.delivery-note { display: flex; gap: 10px; color: var(--muted); font-size: .78rem; }
.delivery-note svg { flex: 0 0 auto; color: var(--accent-strong); }
.form-error { display: none; color: #ff8c8c; font-size: .78rem; }
.form-error.is-visible { display: block; }

.story { padding: 120px 0; }
.story-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 24px; align-items: stretch; }
.story-copy { padding: clamp(34px, 5vw, 72px); border: 1px solid var(--border); border-radius: var(--radius-l) 10px 10px var(--radius-l); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; }
.story-copy p:not(.eyebrow) { color: var(--muted); max-width: 540px; }
.story-points { display: grid; gap: 12px; margin-top: 38px; }
.story-point { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .87rem; }
.story-point span { color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.story-image { min-height: 620px; border-radius: 10px var(--radius-xl) var(--radius-xl) 10px; overflow: hidden; }
.story-image img { width: 100%; height: 100%; object-fit: cover; }

.contact { padding: 30px 0 120px; }
.contact-card { padding: clamp(36px, 7vw, 90px); border-radius: var(--radius-xl); background: var(--accent); color: white; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; box-shadow: 0 30px 80px rgba(0,92,185,.24); }
.contact-card p { max-width: 620px; color: rgba(255,255,255,.78); }
.contact-card a { background: white; color: #07111f; min-height: 52px; padding: 0 22px; border-radius: var(--radius-s); display: inline-flex; align-items: center; font-weight: 760; transition: transform .2s ease; }
.contact-card a:hover { transform: translateY(-2px); }

.site-footer { padding: 26px 0 22px; background: var(--bg-subtle); }
.footer-shell { border: 1px solid var(--border); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-s) var(--radius-s); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.footer-cta { padding: clamp(34px, 6vw, 78px); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 50px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.footer-cta::after { content: ""; position: absolute; width: 360px; height: 360px; right: -180px; top: -230px; border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent); border-radius: 50%; box-shadow: 0 0 0 58px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 0 116px color-mix(in srgb, var(--accent) 3%, transparent); pointer-events: none; }
.footer-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--muted); font-size: .7rem; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.footer-kicker span { width: 24px; height: 2px; background: var(--accent); }
.footer-cta h2 { max-width: 800px; margin: 0; font-size: clamp(2.7rem, 6vw, 6.8rem); line-height: .9; letter-spacing: -.065em; }
.footer-cta-copy > p:last-child { max-width: 560px; margin: 24px 0 0; color: var(--muted); }
.footer-action { position: relative; z-index: 1; min-width: 250px; min-height: 72px; padding: 0 18px 0 24px; border-radius: var(--radius-m); background: var(--accent); color: white; display: flex; align-items: center; justify-content: space-between; gap: 28px; font-weight: 760; box-shadow: 0 18px 42px rgba(0,120,232,.24); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.footer-action svg { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: rgba(255,255,255,.14); transition: transform .2s ease; }
.footer-action:hover { transform: translateY(-3px); background: var(--accent-strong); box-shadow: 0 24px 54px rgba(0,120,232,.32); }
.footer-action:hover svg { transform: translate(2px,-2px); }
.footer-directory { padding: 42px clamp(30px, 5vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: start; border-bottom: 1px solid var(--border); }
.footer-mark img { width: min(260px, 100%); }
[data-theme="light"] .footer-mark img { filter: brightness(.08); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: clamp(40px, 7vw, 100px); }
.footer-nav span { display: block; margin-bottom: 14px; color: var(--muted); font-size: .68rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.footer-nav a { display: block; width: max-content; margin: 7px 0; font-size: .9rem; transition: color .2s ease, transform .2s ease; }
.footer-nav a:hover { color: var(--accent-strong); transform: translateX(3px); }
.footer-service { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.footer-service div { min-height: 90px; padding: 20px clamp(18px, 3vw, 36px); display: flex; align-items: center; gap: 16px; }
.footer-service div + div { border-left: 1px solid var(--border); }
.footer-service span { color: var(--accent-strong); font-size: .68rem; font-weight: 780; letter-spacing: .1em; }
.footer-service strong { font-size: .8rem; font-weight: 680; }
.footer-wordmark { height: .79em; padding: 0 clamp(18px, 3vw, 38px); overflow: hidden; color: color-mix(in srgb, var(--text) 8%, transparent); font-size: clamp(4.6rem, 15.5vw, 13.6rem); font-weight: 820; letter-spacing: -.085em; line-height: .82; white-space: nowrap; user-select: none; }
.footer-bottom { min-height: 58px; padding: 16px clamp(20px, 3vw, 38px); border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; color: var(--muted); font-size: .71rem; }
.footer-bottom a { justify-self: end; color: var(--text); transition: color .2s ease; }
.footer-bottom a:hover { color: var(--accent-strong); }
.footer-bottom a span { margin-left: 6px; color: var(--accent-strong); }

.woocommerce-notices-wrapper { width: min(calc(100% - 40px), var(--container)); margin: 20px auto 0; }
.woocommerce-message, .woocommerce-info { border: 1px solid var(--border); border-top: 3px solid var(--accent); background: var(--surface); color: var(--text); border-radius: var(--radius-m); }
.page-content { min-height: 70vh; padding: 90px 0; }
.page-content .entry-content { max-width: 820px; }
.woocommerce { color: var(--text); }
.woocommerce table.shop_table, .woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register { border-color: var(--border); border-radius: var(--radius-m); }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit { background: var(--accent); color: white; border-radius: var(--radius-s); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { min-height: auto; padding-top: 70px; }
  .hero-grid, .config-head, .product-shell, .story-grid, .contact-card, .footer-cta { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { min-height: 540px; }
  .config-head p:last-child { justify-self: start; }
  .product-stage { min-height: 620px; }
  .story-copy, .story-image { border-radius: var(--radius-l); }
  .story-image { min-height: 440px; }
  .contact-card, .footer-cta { align-items: start; }
  .footer-action { width: min(100%, 360px); }
}

@media (max-width: 560px) {
  .wrap { width: min(calc(100% - 24px), var(--container)); }
  .site-header { padding-top: 8px; }
  .nav-shell { min-height: 58px; padding-left: 12px; }
  .brand img { width: 142px; }
  .cart-link span:first-child { display: none; }
  .hero { padding-top: 50px; }
  .display { font-size: clamp(3rem, 16vw, 4.4rem); }
  .hero-visual { min-height: 430px; }
  .configurator, .story { padding: 82px 0; }
  .product-stage { min-height: 440px; }
  .product-panel { padding: 26px 20px 30px; }
  .size-grid { grid-template-columns: repeat(3, 1fr); }
  .size-dialog { width: calc(100% - 20px); max-height: calc(100vh - 20px); }
  .size-dialog-inner { padding: 48px 14px 24px; max-height: calc(100vh - 20px); }
  .size-table { min-width: 900px; }
  .buy-row { grid-template-columns: 1fr; }
  .qty { min-height: 46px; justify-content: center; }
  .story-image { min-height: 360px; }
  .footer-shell { border-radius: var(--radius-l) var(--radius-l) var(--radius-s) var(--radius-s); }
  .footer-cta { padding: 36px 22px; gap: 32px; }
  .footer-cta h2 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .footer-action { width: 100%; min-width: 0; }
  .footer-directory { padding: 34px 22px; grid-template-columns: 1fr; gap: 34px; }
  .footer-mark img { width: 190px; }
  .footer-nav { gap: 25px; }
  .footer-service { grid-template-columns: 1fr; }
  .footer-service div { min-height: 66px; }
  .footer-service div + div { border-left: 0; border-top: 1px solid var(--border); }
  .footer-wordmark { height: .86em; padding-inline: 12px; font-size: 22vw; }
  .footer-bottom { grid-template-columns: 1fr auto; }
  .footer-bottom > span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
