/*
Theme Name: Storefront Designlab Black Week
Theme URI: https://designlab.dk
Description: Black Week-udgaven af Storefront Designlab til designlab.dk: sort kampagnebjælke med live nedtælling, sort hero med "Op til -XX %" og de største rabatter, "Største rabatter lige nu" på forsiden, ?tilbud=1-filter, sorte "-XX %"-mærkater og en Black Week-boks på produktsiden. Rabatter beregnes ud fra varernes rigtige før-/nupris, og alt slår automatisk fra efter slutdatoen. Header og al øvrig funktionalitet er den samme som i standardtemaet. KRÆVER at temaet "Storefront Designlab" 1.24.0+ ligger i wp-content/themes/storefront-designlab (det skal ikke være aktivt).
Author: Claude (for designlab.dk)
Template: storefront
Version: 1.0.0
Text Domain: storefront-designlab
*/

/* -----------------------------------------------------------------------
   0. BLACK WEEK-FARVER
   Sort + designlabs pink og gule accent. Gul = rabat, pink = tid/urgency.
----------------------------------------------------------------------- */
:root {
	--bw-black: #0b0b0f;
	--bw-ink: #16161d;
	--bw-line: #2a2a35;
	--bw-muted: #a7a8b8;
	--bw-yellow: var(--dl-accent-yellow, #ffd23f);
	--bw-pink: var(--dl-primary, #ff3b7f);
}

/* -----------------------------------------------------------------------
   1. KAMPAGNEBJÆLKE (over headeren — headeren selv er uændret)
----------------------------------------------------------------------- */
a.dl-bw-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 18px;
	padding: 9px 16px;
	background: var(--bw-black);
	color: #fff;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
}
a.dl-bw-bar:hover,
a.dl-bw-bar:focus-visible {
	color: #fff;
	background: #000;
}
a.dl-bw-bar:focus-visible {
	outline: 3px solid var(--bw-yellow);
	outline-offset: -3px;
}
.dl-bw-bar__text {
	color: var(--bw-yellow);
	letter-spacing: 0.01em;
}
.dl-bw-bar__timer {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
}
.dl-bw-bar__label {
	font-weight: 600;
	color: #d9dae6;
}
.dl-bw-bar__cta {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.dl-bw-last-day .dl-bw-bar__label {
	color: var(--bw-pink);
}

/* -----------------------------------------------------------------------
   2. NEDTÆLLING
----------------------------------------------------------------------- */
.dl-bw-cd {
	display: inline-flex;
	align-items: stretch;
	font-variant-numeric: tabular-nums;
}
.dl-bw-cd__unit b {
	font-weight: 800;
}

/* Inline: 02d 14t 05m 09s */
.dl-bw-cd--inline {
	gap: 4px;
}
.dl-bw-cd--inline .dl-bw-cd__unit {
	display: inline-flex;
	align-items: baseline;
	gap: 1px;
	padding: 2px 6px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.12);
}
.dl-bw-cd--inline small {
	font-size: 0.75em;
	font-weight: 600;
	opacity: 0.8;
}
.dl-bw-cd--inline.is-last-day .dl-bw-cd__unit {
	background: var(--bw-pink);
	color: #fff;
}

/* Blokke i hero */
.dl-bw-cd--blocks {
	gap: 10px;
}
.dl-bw-cd--blocks .dl-bw-cd__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 76px;
	padding: 12px 8px 10px;
	box-sizing: border-box;
	border: 1px solid var(--bw-line);
	border-radius: 16px;
	background: var(--bw-ink);
}
.dl-bw-cd--blocks b {
	font-family: var(--dl-font-heading);
	font-size: 2.1rem;
	line-height: 1;
	color: #fff;
}
.dl-bw-cd--blocks small {
	margin-top: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bw-muted);
}
.dl-bw-cd--blocks.is-last-day .dl-bw-cd__unit {
	border-color: var(--bw-pink);
}
.dl-bw-cd--blocks.is-last-day b {
	color: var(--bw-pink);
}
.dl-bw-cd.is-ended {
	font-weight: 700;
}

/* -----------------------------------------------------------------------
   3. HERO
----------------------------------------------------------------------- */
.dl-bw-hero {
	max-width: 1400px;
	margin: 0 auto 2rem;
	padding: 24px 2rem 0;
	box-sizing: border-box;
}
.dl-bw-hero__box {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 40px;
	overflow: hidden;
	padding: 56px 56px 0;
	border-radius: 32px;
	background:
		radial-gradient(60% 80% at 100% 0%, rgba(255, 59, 127, 0.28), transparent 60%),
		radial-gradient(50% 60% at 0% 100%, rgba(255, 210, 63, 0.12), transparent 60%),
		var(--bw-black);
	color: #fff;
}
.dl-bw-hero--nodeals .dl-bw-hero__box {
	grid-template-columns: minmax(0, 1fr);
}
.dl-bw-hero__text {
	position: relative;
	z-index: 1;
	min-width: 0;
	padding-bottom: 40px;
}
.dl-bw-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	padding: 6px 14px;
	border: 1px solid var(--bw-line);
	border-radius: 999px;
	background: var(--bw-ink);
	color: #fff;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.dl-bw-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bw-pink);
	box-shadow: 0 0 0 0 rgba(255, 59, 127, 0.6);
	animation: dl-bw-pulse 1.6s ease-out infinite;
}
@keyframes dl-bw-pulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 59, 127, 0.6); }
	80%, 100% { box-shadow: 0 0 0 10px rgba(255, 59, 127, 0); }
}
.dl-bw-hero__title {
	margin: 0;
	font-family: var(--dl-font-heading);
	font-size: clamp(3.4rem, 8.4vw, 7.4rem);
	font-weight: 800;
	line-height: 0.88;
	letter-spacing: -0.045em;
	text-transform: uppercase;
	color: #fff;
}
.dl-bw-hero__title span {
	display: block;
}
.dl-bw-hero__outline {
	color: transparent;
	-webkit-text-stroke: 2px #fff;
}
.dl-bw-hero__pct {
	display: inline-flex;
	align-items: baseline;
	gap: 12px;
	margin: 22px 0 0;
	padding: 8px 20px 10px;
	border-radius: 14px;
	background: var(--bw-yellow);
	color: var(--bw-black);
	font-family: var(--dl-font-heading);
	font-size: clamp(1.1rem, 2vw, 1.5rem);
	font-weight: 700;
	line-height: 1;
	transform: rotate(-2.5deg);
	transform-origin: left center;
	box-shadow: 0 10px 30px rgba(255, 210, 63, 0.25);
}
.dl-bw-hero__pct strong {
	font-size: clamp(2.2rem, 4.4vw, 3.4rem);
	font-weight: 800;
	letter-spacing: -0.03em;
}
.dl-bw-hero__sub {
	max-width: 32em;
	margin: 26px 0 0;
	font-size: 1.12rem;
	line-height: 1.55;
	color: #d3d4e2;
}
.dl-bw-hero__timer {
	margin: 26px 0 0;
}
.dl-bw-hero__timer-label {
	margin: 0 0 10px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--bw-muted);
}
.dl-bw-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}
.dl-bw-hero a.dl-btn.dl-bw-btn {
	min-height: 56px;
	padding: 0 30px;
	box-sizing: border-box;
	background: var(--bw-yellow);
	color: var(--bw-black) !important;
	font-size: 1.05rem;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 10px 24px rgba(255, 210, 63, 0.22);
}
.dl-bw-hero a.dl-btn.dl-bw-btn:hover {
	background: #ffe27a;
}
.dl-bw-hero a.dl-btn.dl-bw-btn--outline {
	background: transparent;
	border: 2px solid #fff;
	color: #fff !important;
	box-shadow: none;
}
.dl-bw-hero a.dl-btn.dl-bw-btn--outline:hover {
	background: #fff;
	color: var(--bw-black) !important;
}
.dl-bw-hero a.dl-btn.dl-bw-btn:focus-visible {
	outline: 3px solid var(--bw-pink);
	outline-offset: 3px;
}
.dl-bw-hero__code {
	margin: 18px 0 0;
	font-size: 0.95rem;
	color: #d3d4e2;
}
.dl-bw-hero__code code {
	margin-left: 4px;
	padding: 4px 10px;
	border: 1.5px dashed var(--bw-yellow);
	border-radius: 8px;
	background: transparent;
	color: var(--bw-yellow);
	font-weight: 800;
	letter-spacing: 0.06em;
}

/* De 3 største rabatter */
.dl-bw-hero__deals {
	position: relative;
	z-index: 1;
	align-self: center;
	list-style: none;
	margin: 0 0 40px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: 14px;
}
.dl-bw-hero__deals li {
	margin: 0;
	min-width: 0;
}
.dl-bw-hero__deals li:first-child {
	grid-row: span 2;
}
a.dl-bw-deal-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: 22px;
	background: #fff;
	color: var(--dl-secondary);
	text-decoration: none;
	transition: transform 0.2s ease;
}
a.dl-bw-deal-card:hover {
	transform: translateY(-4px) rotate(-0.5deg);
	color: var(--dl-secondary);
}
a.dl-bw-deal-card img {
	display: block;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	aspect-ratio: auto;
}
.dl-bw-hero__deals li:not(:first-child) a.dl-bw-deal-card img {
	max-height: 150px;
}
.dl-bw-deal-card__info {
	display: block;
	padding: 10px 14px 12px;
	font-size: 0.85rem;
	line-height: 1.3;
}
.dl-bw-deal-card__info strong {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-weight: 700;
}
.dl-bw-deal-card__price,
.dl-bw-deal-card__price ins {
	color: var(--dl-primary-dark);
	font-size: 1.05rem;
	font-weight: 800;
	text-decoration: none;
}
.dl-bw-deal-card__price del {
	margin-right: 5px;
	color: #6b7085;
	font-size: 0.8em;
	font-weight: 400;
}
.dl-bw-sticker {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	border-radius: 50%;
	background: var(--bw-yellow);
	color: var(--bw-black);
	font-family: var(--dl-font-heading);
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	white-space: nowrap;
	transform: rotate(-12deg);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.dl-bw-hero__deals li:first-child .dl-bw-sticker {
	width: 88px;
	height: 88px;
	font-size: 1.4rem;
}

/* Løbebånd i bunden af boksen */
.dl-bw-ticker {
	grid-column: 1 / -1;
	margin: 0 -56px;
	overflow: hidden;
	background: var(--bw-yellow);
	color: var(--bw-black);
	font-family: var(--dl-font-heading);
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}
.dl-bw-ticker__track {
	display: inline-flex;
	gap: 22px;
	padding: 12px 0;
	animation: dl-bw-ticker 40s linear infinite;
}
.dl-bw-star {
	color: var(--dl-primary-dark);
}
@keyframes dl-bw-ticker {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.dl-bw-ticker__track,
	.dl-bw-dot {
		animation: none;
	}
}

@media (max-width: 1024px) {
	.dl-bw-hero__box {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding: 44px 40px 0;
	}
	.dl-bw-ticker {
		margin: 0 -40px;
	}
	.dl-bw-hero__deals {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-auto-rows: auto;
	}
	.dl-bw-hero__deals li:first-child {
		grid-row: auto;
	}
	.dl-bw-hero__deals li:not(:first-child) a.dl-bw-deal-card img,
	a.dl-bw-deal-card img {
		height: auto !important;
		max-height: none;
		aspect-ratio: 1 / 1;
	}
	.dl-bw-hero__deals li:first-child .dl-bw-sticker {
		width: 66px;
		height: 66px;
		font-size: 1.05rem;
	}
}
@media (max-width: 768px) {
	.dl-bw-hero {
		padding: 14px 0.75rem 0;
		margin-bottom: 1.5rem;
	}
	.dl-bw-hero__box {
		padding: 30px 20px 0;
		border-radius: 24px;
	}
	.dl-bw-ticker {
		margin: 0 -20px;
		font-size: 0.82rem;
	}
	.dl-bw-hero__text {
		padding-bottom: 28px;
	}
	.dl-bw-hero__sub {
		font-size: 1rem;
	}
	.dl-bw-cd--blocks {
		gap: 6px;
	}
	.dl-bw-cd--blocks .dl-bw-cd__unit {
		min-width: 0;
		flex: 1 1 0;
		padding: 10px 4px 8px;
		border-radius: 12px;
	}
	.dl-bw-cd--blocks b {
		font-size: 1.6rem;
	}
	.dl-bw-hero__actions a.dl-btn {
		flex: 1 1 100%;
	}
	.dl-bw-hero__deals {
		gap: 8px;
		margin-bottom: 28px;
	}
	.dl-bw-sticker,
	.dl-bw-hero__deals li:first-child .dl-bw-sticker {
		top: 6px;
		left: 6px;
		width: 48px;
		height: 48px;
		font-size: 0.78rem;
	}
	.dl-bw-deal-card__info {
		padding: 8px 8px 10px;
		font-size: 0.75rem;
	}
	.dl-bw-deal-card__info strong {
		display: none;
	}
	.dl-bw-deal-card__price,
	.dl-bw-deal-card__price ins {
		font-size: 0.9rem;
	}
	.dl-bw-deal-card__price del {
		display: block;
		margin: 0;
	}
	a.dl-bw-bar {
		font-size: 0.8rem;
		gap: 4px 12px;
	}
	.dl-bw-bar__cta {
		display: none;
	}
}

/* -----------------------------------------------------------------------
   4. FORSIDEN
----------------------------------------------------------------------- */
.dl-usps--bw .dl-usp {
	border-color: #ececf2;
}
.dl-usps--bw .dl-usp:first-child {
	border-color: var(--bw-black);
	background: var(--bw-black);
	color: #d3d4e2;
}
.dl-usps--bw .dl-usp:first-child strong {
	color: var(--bw-yellow);
}

.dl-bw-deals {
	margin: 0 0 3rem;
}
.dl-bw-deals .dl-section-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
.dl-bw-chip {
	display: inline-block;
	padding: 5px 12px 6px;
	border-radius: 8px;
	background: var(--bw-black);
	color: var(--bw-yellow);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	transform: rotate(-2deg);
}
.dl-bw-deals ul.products {
	margin-bottom: 0 !important;
}

/* -----------------------------------------------------------------------
   5. MÆRKATER OG LAVT LAGER (hele sitet)
----------------------------------------------------------------------- */
.dl-bw .woocommerce span.onsale.dl-bw-onsale,
.dl-bw ul.products li.product .onsale.dl-bw-onsale,
.dl-bw span.onsale.dl-bw-onsale {
	padding: 7px 11px;
	border-radius: 8px;
	background: var(--bw-black);
	color: var(--bw-yellow);
	font-family: var(--dl-font-heading);
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	transform: rotate(-4deg);
	z-index: 3;
}
/* Bestseller-mærket ligger i samme hjørne — flyttes til højre på tilbud */
.dl-bw ul.products li.product.sale .dl-badge-tag.dl-badge-bestseller {
	left: auto;
	right: 0;
	border-radius: 0 0 0 10px;
}
.dl-bw ul.products li.product .price ins {
	color: var(--dl-primary-dark);
}
ul.products li.product p.dl-bw-low {
	margin: 4px 0 0;
	padding: 0 14px;
	color: #c62828;
	font-size: 0.8rem;
	font-weight: 700;
}
ul.products li.product p.dl-bw-low::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 6px;
	border-radius: 50%;
	background: #e53935;
	vertical-align: 1px;
}

/* Note øverst på ?tilbud=1-sider */
.dl-bw-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 1.25rem;
	padding: 12px 18px;
	border-radius: 14px;
	background: var(--bw-black);
	color: #fff;
	font-size: 0.92rem;
}
.dl-bw-notice strong {
	color: var(--bw-yellow);
}
.dl-bw-notice a {
	color: #fff;
	font-weight: 700;
	text-decoration: underline;
}

/* -----------------------------------------------------------------------
   6. PRODUKTSIDEN — Black Week-boks lige under prisen
   (info-kolonnen er en flex-container; se standardtemaets afsnit 16)
----------------------------------------------------------------------- */
.single-product div.product .summary > .dl-bw-deal {
	order: 3;
	flex: 0 0 auto;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 0 1rem;
	padding: 8px 14px 8px 8px;
	border-radius: 14px;
	background: var(--bw-black);
	color: #fff;
	font-size: 0.9rem;
	line-height: 1.3;
}
.dl-bw-deal__tag {
	padding: 5px 10px;
	border-radius: 8px;
	background: var(--bw-yellow);
	color: var(--bw-black);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.dl-bw-deal__time {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}
.dl-bw-deal__stock {
	color: #ff8a9b;
	font-weight: 700;
}
.dl-bw-deal__stock::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 6px;
	border-radius: 50%;
	background: #ff4d6a;
	vertical-align: 1px;
}
