/* =========================================================
   Brand carousel + brand archive
   Bruker scroll-snap for horisontal scroll på desktop og mobil,
   ren grid for 'Alle merker'-visning.
   ========================================================= */

/* ---------- Marquee carousel (forsiden) ---------- */
.ec-shop-brand-marquee-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 4px;
}
.ec-shop-brand-marquee {
	overflow: hidden;
	width: 100%;
	padding: 6px 0;
	mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
	flex: 1;
	min-width: 0;
}
.ec-shop-brand-marquee-track {
	display: flex;
	gap: 10px;
	width: max-content;
	animation: ec-brand-marquee 60s linear infinite;
	will-change: transform;
}
.ec-shop-brand-marquee:hover .ec-shop-brand-marquee-track,
.ec-shop-brand-marquee:focus-within .ec-shop-brand-marquee-track,
.ec-shop-brand-marquee.is-paused .ec-shop-brand-marquee-track {
	animation-play-state: paused;
}
@keyframes ec-brand-marquee {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.ec-shop-brand-marquee-track { animation: none; }
	.ec-shop-brand-marquee {
		mask-image: none;
		-webkit-mask-image: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}
}
.ec-shop-brand-tile--marquee {
	flex: 0 0 140px;
	min-height: 78px;
	padding: 12px 10px;
	scroll-snap-align: start;
}
.ec-shop-brand-tile--marquee .ec-shop-brand-tile-logo {
	max-height: 32px;
}
.ec-shop-brand-tile--marquee .ec-shop-brand-tile-name {
	font-size: 13px;
	letter-spacing: 0.04em;
}

.ec-shop-brand-marquee-arrow {
	flex: 0 0 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--shop-line);
	background: #FFFFFF;
	color: var(--ec-ink);
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-sm);
	transition: background .15s, border-color .15s, transform .15s;
	z-index: 2;
}
.ec-shop-brand-marquee-arrow:hover {
	background: var(--shop-navy);
	color: #FFFFFF;
	border-color: var(--shop-navy);
}
.ec-shop-brand-marquee-arrow:active { transform: scale(0.96); }

@media (max-width: 720px) {
	.ec-shop-brand-tile--marquee { flex-basis: 120px; min-height: 70px; }
	.ec-shop-brand-marquee-arrow { display: none; }
}

/* ---------- Static grid (brukes på /merke/) ---------- */
.ec-shop-brand-carousel {
	display: grid;
	grid-template-columns: repeat(8, minmax(140px, 1fr));
	gap: 12px;
}
.ec-shop-brand-carousel--all {
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

.ec-shop-brand-tile {
	background: #FFFFFF;
	border: 1px solid var(--shop-line);
	border-radius: var(--r-md);
	padding: 18px 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 110px;
	text-decoration: none;
	color: var(--ec-ink);
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ec-shop-brand-tile:hover {
	border-color: var(--ec-ink);
	transform: translateY(-1px);
	box-shadow: var(--shadow-sm);
}
.ec-shop-brand-tile-logo {
	max-width: 100%;
	max-height: 40px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: 0.75;
	transition: filter .15s, opacity .15s;
}
.ec-shop-brand-tile:hover .ec-shop-brand-tile-logo {
	filter: grayscale(0);
	opacity: 1;
}
.ec-shop-brand-tile-name {
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 14px;
	color: var(--ec-ink);
	letter-spacing: 0.02em;
}
.ec-shop-brand-tile-ct {
	font-size: 10px;
	color: var(--ec-mute);
	font-family: var(--font-mono);
	margin-top: 2px;
}

/* Brand hero (på /merke/<slug>/) */
.ec-shop-brand-hero {
	padding: 28px 0 24px;
	background: var(--shop-surface);
	border-bottom: 1px solid var(--shop-line);
}
.ec-shop-brand-hero-grid {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: center;
	margin-top: 16px;
}
.ec-shop-brand-hero-text { max-width: 720px; }
.ec-shop-brand-reseller-copy {
	color: var(--ec-mute);
	font-size: 14px;
	line-height: 1.6;
	max-width: 600px;
	margin: 8px 0 12px;
}
.ec-shop-brand-hero-mark {
	background: #FFFFFF;
	border: 1px solid var(--shop-line);
	border-radius: var(--r-md);
	padding: 18px 28px;
	min-width: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ec-shop-brand-hero-mark img {
	max-width: 220px;
	max-height: 80px;
	width: auto;
	height: auto;
	object-fit: contain;
}
.ec-shop-brand-hero-mark-text {
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 28px;
	letter-spacing: 0.02em;
	color: var(--ec-ink);
}
.ec-shop-brand-reseller-copy p { margin: 0 0 8px; }
.ec-shop-brand-reseller-copy p:last-child { margin-bottom: 0; }

/* Kategori-strip på brand-side */
.ec-shop-brand-catstrip {
	background: #FFFFFF;
	border-bottom: 1px solid var(--shop-line);
	padding: 14px 0;
}
.ec-shop-brand-catstrip-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.ec-shop-brand-catstrip-label {
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ec-mute);
}
.ec-shop-brand-catstrip-list {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.ec-shop-brand-catchip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--shop-surface);
	border: 1px solid var(--shop-line);
	border-radius: var(--r-pill);
	font-size: 13px;
	color: var(--ec-ink);
	text-decoration: none;
	transition: background .15s, border-color .15s;
}
.ec-shop-brand-catchip:hover {
	background: var(--shop-navy);
	color: #FFFFFF;
	border-color: var(--shop-navy);
}
.ec-shop-brand-catchip span {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--ec-mute);
}
.ec-shop-brand-catchip:hover span { color: rgba(255,255,255,0.75); }

@media (max-width: 1100px) {
	.ec-shop-brand-carousel { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}
@media (max-width: 720px) {
	.ec-shop-brand-carousel { grid-template-columns: repeat(2, 1fr); }
	.ec-shop-brand-hero-grid { grid-template-columns: 1fr; }
	.ec-shop-brand-hero-mark { justify-self: flex-start; }
}
