/* ============================================================================
 * NordicTrend — site chrome + marketing sections
 * Promo bar · header · mobile menu · footer · hero · trust · category tiles ·
 * section rhythm. All values reference the design tokens.
 * ========================================================================== */

/* ----------------------------------------------------------------------------
 * Keyframes (quiet, no bounce)
 * -------------------------------------------------------------------------- */
@keyframes nt-marquee   { from { transform: translateX(0); } to { transform: translateX(-25%); } }
@keyframes nt-overlay-in{ from { opacity: 0; } to { opacity: 1; } }
@keyframes nt-menu-in   { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes nt-fade-up   { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Layout helpers --------------------------------------------------------- */
.nt-container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.nt-section   { padding-block: var(--space-9); }              /* 96px section rhythm */
.nt-eyebrow {
	font-size: 12px; font-weight: var(--fw-bold);
	letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--text-muted);
}

/* ----------------------------------------------------------------------------
 * Promo bar — pine-900, slow marquee, cream text, ★ bullets
 * -------------------------------------------------------------------------- */
.nt-promobar { background: var(--pine-900); overflow: hidden; white-space: nowrap; }
.nt-promobar__track {
	display: inline-flex; gap: 40px; padding-block: 11px;
	animation: nt-marquee 28s linear infinite; will-change: transform;
}
.nt-promobar__item { color: var(--ink-inv); font-size: 13px; font-weight: var(--fw-medium); letter-spacing: 0.01em; }
@media (prefers-reduced-motion: reduce) { .nt-promobar__track { animation: none; } }

/* ----------------------------------------------------------------------------
 * Header — sticky translucent linen + blur, hairline bottom border
 * -------------------------------------------------------------------------- */
.nt-header {
	position: sticky; top: 0; z-index: 20;
	background: rgba(246, 243, 238, 0.88);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border-default);
}
.nt-header__inner {
	max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
	height: 68px; display: flex; align-items: center; gap: 28px;
}
.nt-header__logo img { height: 52px; width: auto; display: block; }
.nt-header__nav { display: flex; gap: 22px; margin-left: 8px; flex: 1; overflow: hidden; }
.nt-header__link {
	font-size: 14px; font-weight: var(--fw-medium); color: var(--text-body);
	white-space: nowrap; padding-bottom: 2px; border-bottom: 2px solid transparent;
	transition: color var(--dur-fast) var(--ease-standard);
}
.nt-header__link:hover { color: var(--text-strong); text-decoration: none; }
.nt-header__link.is-active,
.nt-header__link[aria-current] { color: var(--text-strong); font-weight: var(--fw-semibold); border-bottom-color: var(--brand); }

.nt-header__cart {
	margin-left: auto; position: relative;
	width: 44px; height: 44px; border: 1px solid var(--border-strong);
	background: var(--paper); border-radius: var(--radius-pill);
	color: var(--text-strong); display: flex; align-items: center; justify-content: center;
	cursor: pointer;
}
.nt-header__cart-count {
	position: absolute; top: -4px; right: -4px;
	background: var(--sale); color: #fff; font-size: 11px; font-weight: var(--fw-bold);
	min-width: 20px; height: 20px; border-radius: 999px;
	display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* Hamburger (≤820px) */
.nt-header__burger { display: none; border: none; background: transparent; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nt-header__burger span { width: 22px; height: 2px; background: var(--text-strong); border-radius: 2px; }

@media (max-width: 820px) {
	.nt-header__inner { height: 60px; gap: 12px; }
	.nt-header__logo img { height: 40px; }
	.nt-header__nav { display: none; }
	.nt-header__burger { display: inline-flex; }
}

/* ----------------------------------------------------------------------------
 * Mobile slide-in menu
 * -------------------------------------------------------------------------- */
.nt-mobile-menu { position: fixed; inset: 0; z-index: 60; display: none; }
.nt-mobile-menu.is-open { display: block; }
.nt-mobile-menu__overlay { position: absolute; inset: 0; background: rgba(22, 39, 31, 0.4); animation: nt-overlay-in 0.2s ease; }
.nt-mobile-menu__panel {
	position: absolute; top: 0; left: 0; height: 100%; width: 82vw; max-width: 320px;
	background: var(--paper); box-shadow: var(--shadow-lg);
	display: flex; flex-direction: column; animation: nt-menu-in 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.nt-mobile-menu__head {
	display: flex; justify-content: space-between; align-items: center;
	padding: 18px 20px; border-bottom: 1px solid var(--border-default);
}
.nt-mobile-menu__head span { font-size: 12px; font-weight: var(--fw-bold); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.nt-mobile-menu__close { border: none; background: transparent; font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.nt-mobile-menu__nav { display: flex; flex-direction: column; padding: 8px 0; overflow-y: auto; }
.nt-mobile-menu__nav a { padding: 15px 22px; font-size: 16px; font-weight: var(--fw-medium); color: var(--text-body); border-left: 3px solid transparent; }
.nt-mobile-menu__nav a.is-active { font-weight: var(--fw-bold); color: var(--text-strong); border-left-color: var(--brand); }

/* ----------------------------------------------------------------------------
 * Footer — pine-900, cream text, 4 columns
 * -------------------------------------------------------------------------- */
.nt-footer { background: var(--pine-900); color: rgba(251, 250, 247, 0.72); margin-top: var(--space-9); }
.nt-footer__grid {
	max-width: var(--container); margin-inline: auto;
	padding: var(--space-8) var(--gutter) var(--space-6);
	display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: var(--space-6);
}
.nt-footer__logo img { height: 84px; width: auto; }
.nt-footer__blurb { margin-top: 14px; font-size: 14px; line-height: 1.6; max-width: 280px; }
.nt-footer h4 { color: #fff; font-size: 14px; font-weight: var(--fw-semibold); margin-bottom: 14px; letter-spacing: 0.02em; }
.nt-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nt-footer a { color: inherit; font-size: 14px; }
.nt-footer a:hover { color: #fff; text-decoration: none; }
.nt-footer__news p { font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.nt-footer__news-form { display: flex; gap: 8px; }
.nt-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	max-width: var(--container); margin-inline: auto; padding: 18px var(--gutter);
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.nt-footer__bottom span { font-size: 12px; }
.nt-footer__pay { display: flex; gap: 8px; flex-wrap: wrap; }
.nt-footer__pay span { display: inline-flex; align-items: center; justify-content: center; background: #fff; height: 28px; padding: 0 8px; border-radius: 5px; }
.nt-footer__pay img { height: 17px; width: auto; }
@media (max-width: 820px) { .nt-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .nt-footer__grid { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
 * Buttons (theme-side, mirrors core/Button — Woo buttons skinned separately)
 * -------------------------------------------------------------------------- */
.nt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
	font-family: var(--font-sans); font-weight: var(--fw-semibold); letter-spacing: 0.005em;
	border: none; border-radius: var(--radius-sm); cursor: pointer;
	transition: background var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.nt-btn:active { transform: translateY(1px); }
.nt-btn--sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.nt-btn--md { padding: 11px 20px; font-size: 15px; min-height: 44px; }
.nt-btn--lg { padding: 15px 28px; font-size: 16px; min-height: 52px; }
.nt-btn--pill { border-radius: var(--radius-pill); }
.nt-btn--primary { background: var(--brand); color: var(--on-brand); }
.nt-btn--primary:hover { background: var(--brand-hover); color: var(--on-brand); text-decoration: none; }
.nt-btn--secondary { background: var(--paper); color: var(--text-strong); border: 1px solid var(--border-strong); }
.nt-btn--secondary:hover { background: var(--surface-sunken); text-decoration: none; }
.nt-btn--ghost { background: transparent; color: var(--text-strong); }
.nt-btn--ghost:hover { background: var(--surface-sunken); text-decoration: none; }
.nt-btn--sale { background: var(--sale); color: #fff; }
.nt-btn--sale:hover { background: var(--clay-600); color: #fff; text-decoration: none; }
.nt-btn--full { width: 100%; }

/* Input (theme-side, mirrors forms/Input) */
.nt-input {
	width: 100%; min-height: 44px; padding: 11px var(--space-3);
	border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
	background: var(--paper); color: var(--text-strong); font-family: var(--font-sans); font-size: var(--text-base);
}
.nt-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.nt-footer__news .nt-input { background: rgba(255,255,255,0.95); }

/* ----------------------------------------------------------------------------
 * Hero (home) — full-bleed image, radius xl, 90° pine gradient, serif headline
 * -------------------------------------------------------------------------- */
.nt-hero { position: relative; border-radius: var(--radius-xl); overflow: hidden; min-height: 460px; display: flex; align-items: center; }
.nt-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nt-hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22,39,31,0.78) 0%, rgba(22,39,31,0.45) 45%, rgba(22,39,31,0) 80%); }
.nt-hero__content { position: relative; padding: var(--space-8); max-width: 560px; color: var(--ink-inv); }
.nt-hero__content .nt-eyebrow { color: rgba(251,250,247,0.8); }
.nt-hero__title {
	font-family: var(--font-serif); font-weight: 400; color: #fff;
	font-size: var(--text-3xl); line-height: var(--lh-tight); letter-spacing: var(--ls-tight);
	margin-block: var(--space-3) var(--space-4);
}
.nt-hero__title em { font-style: italic; }
.nt-hero__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }
@media (max-width: 820px) {
	.nt-hero { min-height: 380px; border-radius: var(--radius-lg); }
	.nt-hero__overlay { background: linear-gradient(180deg, rgba(22,39,31,0.35) 0%, rgba(22,39,31,0.8) 100%); }
	.nt-hero__content { padding: var(--space-6); }
	.nt-hero__title { font-size: var(--text-2xl); }
}

/* ----------------------------------------------------------------------------
 * Trust cards (3-up: Fri frakt / 30 dagars öppet köp / Trygg betalning)
 * -------------------------------------------------------------------------- */
.nt-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.nt-trust__card {
	display: flex; align-items: center; gap: var(--space-3);
	background: var(--surface-card); border: 1px solid var(--border-default);
	border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-xs);
}
.nt-trust__icon { color: var(--brand); flex-shrink: 0; }
.nt-trust__title { font-size: var(--text-base); font-weight: var(--fw-semibold); color: var(--text-strong); }
.nt-trust__sub { font-size: var(--text-sm); color: var(--text-muted); }
@media (max-width: 820px) { .nt-trust { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
 * Section heading row (title + "Visa alla" link)
 * -------------------------------------------------------------------------- */
.nt-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.nt-section-head h2 { font-size: var(--text-2xl); font-weight: var(--fw-semibold); color: var(--text-strong); }
.nt-section-head a { color: var(--text-link); font-weight: var(--fw-medium); font-size: var(--text-sm); }

/* ----------------------------------------------------------------------------
 * Category tiles (4-up): image + left/bottom pine gradient + title/subtitle
 * -------------------------------------------------------------------------- */
.nt-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.nt-cat-tile { position: relative; display: block; height: 220px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.nt-cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.nt-cat-tile:hover img { transform: scale(1.04); }
.nt-cat-tile__grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,39,31,0) 35%, rgba(22,39,31,0.78) 100%); }
.nt-cat-tile__body { position: absolute; left: 0; bottom: 0; padding: var(--space-4); color: #fff; }
.nt-cat-tile__title { font-size: var(--text-md); font-weight: var(--fw-semibold); }
.nt-cat-tile__sub { font-size: var(--text-sm); color: rgba(255,255,255,0.85); margin-top: 2px; }
@media (max-width: 1024px) { .nt-categories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .nt-categories { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
 * Listing filter bar (pill category buttons + count + sort)
 * -------------------------------------------------------------------------- */
.nt-filterbar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6); }
.nt-filter-pill {
	padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
	background: var(--paper); color: var(--text-body); font-size: var(--text-sm); font-weight: var(--fw-medium); cursor: pointer;
}
.nt-filter-pill.is-active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.nt-filterbar__count { color: var(--text-muted); font-size: var(--text-sm); margin-left: auto; }

/* ----------------------------------------------------------------------------
 * Cart drawer — right slide-in, pine-tinted overlay (presentation shell)
 * Injected by assets/js/cart-drawer.js when not already on the page.
 * -------------------------------------------------------------------------- */
#nt-cart-drawer { position: fixed; inset: 0; z-index: 70; visibility: hidden; pointer-events: none; }
#nt-cart-drawer.is-open { visibility: visible; pointer-events: auto; }
.nt-cart-drawer__overlay {
	position: absolute; inset: 0; background: rgba(22, 39, 31, 0.4);
	opacity: 0; transition: opacity var(--dur-slow) var(--ease-out);
}
#nt-cart-drawer.is-open .nt-cart-drawer__overlay { opacity: 1; }
.nt-cart-drawer__panel {
	position: absolute; top: 0; right: 0; height: 100%;
	width: 420px; max-width: 92vw;
	background: var(--paper); color: var(--text-body);
	border-left: 1px solid var(--border-default);
	box-shadow: var(--shadow-lg); border-radius: 0;
	display: flex; flex-direction: column;
	transform: translateX(100%);
	transition: transform var(--dur-slow) var(--ease-out);
}
#nt-cart-drawer.is-open .nt-cart-drawer__panel { transform: translateX(0); }
.nt-cart-drawer__head {
	display: flex; justify-content: space-between; align-items: center;
	padding: 18px 22px; border-bottom: 1px solid var(--border-default);
}
.nt-cart-drawer__title { font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--text-strong); }
.nt-cart-drawer__close { border: none; background: transparent; font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.nt-cart-drawer__body { flex: 1; overflow-y: auto; padding: 22px; }
.nt-cart-drawer__empty { color: var(--text-muted); font-size: var(--text-sm); }
.nt-cart-drawer__foot { padding: 18px 22px; border-top: 1px solid var(--border-default); }
