/*
Theme Name: Sortberg Shop
Theme URI: https://shop.sortberghansen.dk
Author: Texta for Sortberg+Hansen
Description: Medarbejdershop for Sortberg+Hansens kunder. Bygget efter det låste Figma-design (Kundegennemgang). Kundens farver kommer som CSS-variabler fra plugin'et Arne-forbindelsen.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.3
WC requires at least: 9.0
Text Domain: sortberg-shop
Domain Path: /languages
License: Proprietary
*/

/* ------------------------------------------------------------------ */
/* Skrift: Inter, hostet selv (ingen kald til Google Fonts)            */
/* ------------------------------------------------------------------ */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ */
/* Tokens. Kundens seks farver (--sh-*) skrives af plugin'et.          */
/* Standardværdierne her er Sortberg+Hansens egne.                     */
/* Neutrale, status- og pointfarver er faste (Figma: Color · Primitives)*/
/* ------------------------------------------------------------------ */
:root {
	--sh-primary: #05aef0;
	--sh-primary-hover: #059dd8;
	--sh-primary-soft: #f3f3f1;
	--sh-secondary: #e6f7fe;
	--sh-accent: #05aef0;
	/* Mørk tekst: hvid på den lyse blå er kun 2,5:1 (WCAG AA kræver 4,5:1). */
	--sh-on-primary: #111111;

	--n-0: #ffffff;
	--n-50: #f6f6f4;
	--n-100: #f3f3f1;
	--n-200: #e6e6e2;
	--n-300: #d6d6d1;
	--n-400: #a8a8a2;
	--n-500: #8a8a85;
	--n-600: #6b6b66;
	--n-800: #2b2b29;
	--n-950: #111111;

	--green-50: #dfffed;
	--green-600: #34c772;
	--green-700: #186d3c;
	--amber-50: #fff4dc;
	--amber-600: #b26b00;
	--amber-700: #8c5400;
	--red-50: #fdeceb;
	--red-600: #c4372b;
	--red-700: #9e2c22;

	--c-bg: var(--n-0);
	--c-bg-muted: var(--n-50);
	--c-bg-canvas: var(--n-100);
	--c-bg-inverse: var(--n-950);
	--c-text: var(--n-950);
	--c-text-2: var(--n-600);
	--c-text-3: var(--n-500);
	--c-text-disabled: var(--n-400);
	--c-text-inverse: var(--n-0);
	--c-border: var(--n-200);
	--c-border-strong: var(--n-300);
	--c-border-selected: var(--n-950);
	/* Fokus er altid mørk (eller hvid på mørk bund), så den kan ses uanset kundens farver. */
	--c-focus: var(--n-950);

	--c-success: var(--green-600);
	--c-success-soft: var(--green-50);
	--c-success-text: var(--green-700);
	--c-warning: var(--amber-600);
	--c-warning-soft: var(--amber-50);
	--c-warning-text: var(--amber-700);
	--c-danger: var(--red-600);
	--c-danger-soft: var(--red-50);
	--c-danger-text: var(--red-700);

	--points-bg: var(--n-0);
	--points-text: var(--n-950);
	--points-progress: var(--green-600);
	--points-track: var(--n-200);

	/* Lys tone af kundens farve (Tilpas dit tøj). */
	--sh-tint: color-mix(in srgb, var(--sh-primary) 10%, var(--n-0));

	--gutter: 40px;
	--max: 1440px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (max-width: 900px) {
	:root { --gutter: 16px; }
}
/* Figma "brand-tint" (fx #eee8f7 hos BabySam): lys, men tydelig tone af kundens farve. */
@supports (color: oklch(from red l c h)) {
	:root { --sh-tint: oklch(from var(--sh-primary) 0.94 calc(c * 0.3) h); }
}

/* ------------------------------------------------------------------ */
/* Grundlag                                                            */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.45;
	color: var(--c-text);
	background: var(--c-bg-inverse);
	-webkit-font-smoothing: antialiased;
}
.site { background: var(--c-bg); min-height: 60vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.topbar :focus-visible, .footer :focus-visible { outline-color: var(--c-text-inverse); }
[hidden] { display: none !important; }
.screen-reader-text, .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;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto;
	background: var(--c-bg); padding: 12px 16px; border: 1px solid var(--c-border-selected);
}
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.icon { display: inline-block; flex: none; vertical-align: middle; }

/* Typografi */
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: var(--c-text-3); }
.eyebrow--dark { color: var(--c-text); }
.page-title { font-size: 40px; font-weight: 500; letter-spacing: -0.2px; }
.page-title small { font-size: 14px; font-weight: 400; color: var(--c-text-2); margin-left: 10px; letter-spacing: 0; }
.section-title { font-size: 26px; font-weight: 500; }
.muted { color: var(--c-text-2); }
.link { font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; color: var(--c-text); }
.link:hover { color: var(--sh-primary); }
/* Kortere tekst på mobil ligger i en span; understregningen skal med. */
.link > span { text-decoration: underline; text-underline-offset: 3px; }

/* Knapper */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 14px 28px; border: 1px solid transparent; border-radius: 0;
	font-size: 14px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase;
	text-decoration: none; line-height: 1.2; background: none; white-space: nowrap;
}
.btn--primary { background: var(--sh-primary); color: var(--sh-on-primary); border-color: var(--sh-primary); }
.btn--primary:hover { background: var(--sh-primary-hover); border-color: var(--sh-primary-hover); }
.btn--secondary { border-color: var(--c-border-selected); color: var(--c-text); background: var(--c-bg); }
.btn--secondary:hover { background: var(--c-bg-muted); }
.btn--small { min-height: 38px; padding: 9px 16px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--large { min-height: 54px; font-size: 15px; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--c-bg-canvas); color: var(--c-text-disabled); border-color: var(--c-bg-canvas); cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; color: var(--c-text); text-decoration: none; position: relative; }

/* Badges og status */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 12px; font-weight: 500; line-height: 1.3; background: var(--c-bg-muted); color: var(--c-text-2); white-space: nowrap; }
.badge--success { background: var(--c-success-soft); color: var(--c-success-text); }
.badge--warning { background: var(--c-warning-soft); color: var(--c-warning-text); }
.badge--danger { background: var(--c-danger-soft); color: var(--c-danger-text); }

/* Pointbjælke */
.progress { height: 4px; background: var(--points-track); width: 100%; }
.progress > span { display: block; height: 100%; background: var(--points-progress); }
.points-after { border: 1px solid var(--c-border); padding: 14px 16px 16px; display: grid; gap: 12px; font-size: 14px; }
.points-after__row { display: flex; justify-content: space-between; gap: 12px; }
.points-after--short { border-color: var(--c-danger); }
.points-after--short .progress > span { background: var(--c-danger); }
.short-note { color: var(--c-danger-text); font-size: 14px; font-weight: 500; }

.note { display: flex; gap: 10px; font-size: 13px; color: var(--c-text-2); align-items: flex-start; }
.note .icon { margin-top: 1px; }

/* Felter */
.field { display: grid; gap: 8px; }
.field label, .field__label { font-size: 13px; color: var(--c-text-2); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="search"], .field input[type="number"], .field textarea, .field select, .select__button {
	width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--c-border-strong);
	border-radius: 0; background-color: var(--c-bg); font-size: 15px; color: var(--c-text);
}
.field textarea { min-height: 96px; resize: vertical; }
/* Egen pil i dropdowns med luft til højre (browserens pil sad klemt mod kanten). */
.field select, .custom .field select, .select__button {
	appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 18px center; background-size: 16px;
}
.field select:focus, .select__button:focus, .select.is-open .select__button { outline: none; border-color: var(--c-border-selected); }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--c-text-3); }
.input:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--c-border-selected); }
.field input[readonly] { background: var(--c-bg-muted); color: var(--c-text-2); }
.check { display: inline-flex; gap: 12px; align-items: center; font-size: 15px; cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; border: 1px solid var(--c-border-strong); background: var(--c-bg); display: grid; place-content: center; flex: none; }
.check input:checked { background: var(--sh-primary); border-color: var(--sh-primary); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--sh-on-primary); border-bottom: 2px solid var(--sh-on-primary); transform: translateY(-1px) rotate(-45deg); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--c-border-strong); background: var(--c-bg); }
.qty button { width: 40px; height: 40px; border: 0; background: none; display: grid; place-items: center; }
.qty input { width: 40px; height: 40px; border: 0; text-align: center; font-size: 15px; -moz-appearance: textfield; appearance: textfield; background: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--large button, .qty--large input { height: 54px; width: 46px; }

/* Bokse */
.card { border: 1px solid var(--c-border); background: var(--c-bg); padding: 28px; }
.empty { border: 1px solid var(--c-border); padding: 48px 28px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.empty__icon { width: 56px; height: 56px; display: grid; place-items: center; background: var(--c-bg-muted); }
.empty h2 { font-size: 22px; }
.empty p { color: var(--c-text-2); max-width: 44ch; }

/* WooCommerce-beskeder */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-error, .woocommerce-message, .woocommerce-info {
	list-style: none; margin: 0 0 24px; padding: 14px 16px; border: 1px solid var(--c-border);
	background: var(--c-bg-muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.woocommerce-error { background: var(--c-danger-soft); border-color: var(--c-danger); color: var(--c-danger-text); flex-direction: column; align-items: flex-start; }
.woocommerce-message { background: var(--c-success-soft); border-color: var(--c-success); color: var(--c-success-text); }
.woocommerce-error li { margin: 0; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; margin-left: auto; font-weight: 500; text-decoration: underline; background: none; border: 0; color: inherit; }

/* ------------------------------------------------------------------ */
/* Topbjælke og menu                                                   */
/* ------------------------------------------------------------------ */
.topbar { background: var(--c-bg-inverse); color: var(--c-text-inverse); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.topbar a { color: inherit; text-decoration: none; font-size: 13px; font-weight: 500; }
.topbar img { height: 16px; width: auto; }
.topbar__links { display: flex; align-items: center; gap: 20px; }
.topbar__lang { display: flex; gap: 12px; }
.topbar__lang a { opacity: 0.65; }
.topbar__lang a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

.header { background: var(--c-bg); border-bottom: 1px solid var(--c-border); position: relative; z-index: 30; }
.header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.header__left { display: flex; align-items: center; gap: 56px; }
.header__right { display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 27px; width: auto; max-width: 180px; object-fit: contain; }
.logo__text { font-size: 20px; font-weight: 700; color: var(--sh-primary); }

.nav { display: flex; gap: 32px; align-items: stretch; height: 72px; list-style: none; margin: 0; padding: 0; }
.nav__item { display: flex; align-items: center; }
.nav__link {
	font-size: 13px; font-weight: 500; letter-spacing: 0.52px; text-transform: uppercase; text-decoration: none;
	padding: 8px 0 6px; border-bottom: 2px solid transparent; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.nav__item.is-active .nav__link, .nav__link:hover { border-bottom-color: var(--sh-primary); }

.mega {
	position: absolute; left: 0; right: 0; top: 100%; background: var(--c-bg);
	border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border);
	display: none;
}
.nav__item:hover > .mega, .nav__item:focus-within > .mega, .nav__item.is-open > .mega { display: block; }
.nav__item.is-closed > .mega { display: none; }
.mega__inner { display: flex; gap: 56px; padding-top: 32px; padding-bottom: 40px; }
.mega__col { display: grid; gap: 14px; align-content: start; min-width: 140px; }
.mega__col a { font-size: 15px; text-decoration: none; }
.mega__col a:hover, .mega__col a.is-strong { text-decoration: underline; text-underline-offset: 3px; }
.mega__features { margin-left: auto; display: flex; gap: 14px; }
.mega__feature { width: 200px; display: grid; gap: 10px; align-content: start; text-decoration: none; font-size: 14px; font-weight: 500; }
.mega__feature-img { display: block; border: 1px solid var(--c-border); background: var(--c-bg); aspect-ratio: 4 / 3; overflow: hidden; }
.mega__feature-img img { width: 100%; height: 100%; object-fit: contain; }
.mega__feature span { display: inline-flex; align-items: center; gap: 6px; }

.points-badge {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--c-border);
	background: var(--points-bg); color: var(--points-text); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; line-height: 20px;
}
.points-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-success); }
.points-badge.is-low::before { background: var(--c-warning); }

form.search { display: flex; align-items: center; gap: 8px; width: 260px; height: 40px; padding: 0 12px; border: 1px solid var(--c-border-strong); background: var(--c-bg); }
form.search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13px; background: none; height: 100%; }
form.search input::placeholder { color: var(--c-text-3); }
form.search:focus-within { border-color: var(--c-border-selected); }
.header .icon-btn { width: 24px; height: 24px; }

@media (min-width: 901px) {
	.header__mobile-only { display: none !important; }
}

/* Mobilmenu */
.mnav { position: fixed; inset: 0; z-index: 60; background: var(--c-bg); overflow-y: auto; display: none; }
.mnav.is-open { display: block; }
.mnav__head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-bottom: 1px solid var(--c-border); }
.mnav__main { display: grid; gap: 24px; }
.mnav__points { justify-self: start; }
.mnav__body { padding-top: 16px; padding-bottom: 40px; display: grid; gap: 24px; }
.mnav__list { list-style: none; margin: 0; padding: 0; }
.mnav__list li { border-bottom: 1px solid var(--c-border); }
.mnav__list a, .mnav__list button {
	display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 54px; background: none; border: 0; padding: 0; text-decoration: none; font-size: 16px; text-align: left;
}
.mnav__list--top a, .mnav__list--top button { font-size: 15px; font-weight: 500; letter-spacing: 0.6px; text-transform: uppercase; }
.mnav__list--account a { justify-content: flex-start; gap: 14px; min-height: 56px; }
.mnav__sub { display: none; }
.mnav__sub.is-open { display: grid; gap: 8px; }
.mnav__sub h2 { font-size: 24px; margin: 4px 0 8px; }
.mnav__back { display: inline-flex; gap: 8px; align-items: center; background: none; border: 0; padding: 4px 0; font-size: 14px; }
.mnav.has-sub .mnav__main { display: none; }
.mnav__first a { font-weight: 500; }

/* ------------------------------------------------------------------ */
/* Sidefod                                                             */
/* ------------------------------------------------------------------ */
.footer { background: var(--c-bg-inverse); color: var(--c-text-inverse); padding: 56px 0 40px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 64px; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h2 { font-size: 12px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 0; }
.footer__col a, .footer__col span { font-size: 14px; opacity: 0.72; text-decoration: none; color: inherit; }
.footer__col a:hover { opacity: 1; text-decoration: underline; }
.footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-text-inverse); display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.footer__bottom > * { opacity: 0.6; }
.footer__bottom a { color: inherit; text-decoration: none; }
