/* ============================================================
   DLC Department Categories - v1.4.0 | 2026-11-05
   1.4.0: Text Backing (768 and up): Dark Glow (default - black at 70% behind the heading and each
   title / links group, edges feathered into the photo), Photo Shade (black at 65% over the whole photo)
   or Halo (the 1.2 look). Phones: solid department color, no halo, plain text - Hat / Costume black
   text, Bra on its 3% darker band color (same as the hero slider).
   Contrast (worst case = white photo): Dark Glow white 8.5 / gold 6.5; Photo Shade white 7.0 / gold 5.3.
   Full-width background image section (band) with circle tiles
   1.3.0: circles line up with the header on the homepage / department pages (--container-max /
   --container-gutter, corsetmaking.css b70+; was a 1170 box); fixed min-heights (500 / 425) replaced by
   content height + --space-2xl padding; breakpoints 992-1199 / 768-991 / 767 (980 / 979 retired);
   small-phone circles follow the section width (container query, was 479).
   Tokens: --font-accent, --font-primary, --font-size-14/20/25/30,
   --brand-gold-on-dark, --color-white, --text-halo-dark,
   --brand-charcoal, --color-black, --space-*, --focus-ring
   Department colors (mobile) are the documented exception.
   ============================================================ */

/* -- Section wrapper ----------------------------------------- */
.dlc-dept-cat {
	/* Crisp halo: a 1px outline on all sides (no blur) plus a light
	   2px glow. Counts as the text background for contrast, so the
	   text passes AA over any photo or department color. */
	--dc-halo-color: var(--text-halo-dark);
	--dc-halo:
		-1px -1px 0 var(--dc-halo-color),
		 1px -1px 0 var(--dc-halo-color),
		-1px  1px 0 var(--dc-halo-color),
		 1px  1px 0 var(--dc-halo-color),
		 0   -1px 0 var(--dc-halo-color),
		 0    1px 0 var(--dc-halo-color),
		-1px  0   0 var(--dc-halo-color),
		 1px  0   0 var(--dc-halo-color),
		 0    0   2px var(--dc-halo-color);
	--dc-shadow: none;
	--dc-glow: color-mix(in srgb, var(--color-black) 70%, transparent);
	--dc-heading: var(--brand-gold-on-dark);
	--dc-title: var(--color-white);
	--dc-link: var(--brand-gold-on-dark);

	position: relative;
	width: 100%;
	background-color: var(--brand-charcoal);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	padding: var(--space-2xl) 0;
	box-sizing: border-box;
	margin-bottom: 1.5em;
}

/* -- Inner container ----------------------------------------- */
.dlc-dept-cat__inner {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	container-type: inline-size;
}

/* Homepage / department pages (body#SFNT - full-width column): content lines up with the header -
   capped at --container-max and padded by --container-gutter (same as .cms-container). Elsewhere it fills its column. */
body#SFNT .dlc-dept-cat__inner {
	width: 100%;
	max-width: var(--container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-gutter);
	padding-right: var(--container-gutter);
	box-sizing: border-box;
}

/* -- Section heading ----------------------------------------- */
.dlc-dept-cat__heading {
	font-family: var(--font-accent);
	font-style: italic;
	font-weight: 600;
	font-size: var(--font-size-30);
	line-height: 1.2;
	color: var(--dc-heading);
	text-align: center;
	margin: 0;
	text-shadow: var(--dc-shadow);
}

/* Heading sits in its own wrapper so a backing can hug the text */
.dlc-dept-cat__heading-wrap {
	display: flex;
	justify-content: center;
	margin: 0 0 var(--space-lg);
}

/* Title + links group */
.dlc-dept-cat__text {
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
}

/* -- Text Backing (768 and up) -------------------------------- */
.dlc-dept-cat--backing-halo { --dc-shadow: var(--dc-halo); }

/* Dark Glow: black at 70% behind the text, edges feathered out into the photo */
.dlc-dept-cat--backing-glow .dlc-dept-cat__heading,
.dlc-dept-cat--backing-glow .dlc-dept-cat__text {
	background: var(--dc-glow);
	box-shadow: 0 0 var(--space-xl) var(--space-sm) var(--dc-glow);
	border-radius: var(--space-xl);
	padding: var(--space-sm) var(--space-md);
}

/* Circles stay above the glow */
.dlc-dept-cat__circle-link,
.dlc-dept-cat__circle {
	position: relative;
	z-index: 1;
}

/* Photo Shade: black at 65% over the whole photo */
.dlc-dept-cat--backing-shade::before {
	content: '';
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--color-black) 65%, transparent);
	pointer-events: none;
}

.dlc-dept-cat--backing-shade .dlc-dept-cat__inner {
	position: relative;
}

/* -- Grid ---------------------------------------------------- */
.dlc-dept-cat__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

/* -- Tile ---------------------------------------------------- */
.dlc-dept-cat__tile {
	flex: 0 0 25%;
	max-width: 25%;
	padding: 0 10px;
	box-sizing: border-box;
	text-align: center;
	margin-bottom: 1.5em;
}

/* -- Circle -------------------------------------------------- */
.dlc-dept-cat__circle-link {
	display: block;
	width: max-content;
	margin: 0 auto;
	border-radius: 50%;
	text-decoration: none;
}

.dlc-dept-cat__circle {
	width: 200px;
	height: 200px;
	border-radius: 50%;
	overflow: hidden;
	margin: 0 auto 0.75em;
}

.dlc-dept-cat__circle-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* -- Title --------------------------------------------------- */
.dlc-dept-cat__title {
	font-family: var(--font-accent);
	font-size: var(--font-size-25);
	font-weight: 600;
	line-height: 1.2;
	color: var(--dc-title);
	margin: 0 0 0.4em;
	text-shadow: var(--dc-shadow);
}

.dlc-dept-cat__title a {
	color: var(--dc-title);
	text-decoration: none;
	text-shadow: var(--dc-shadow);
}

.dlc-dept-cat__title a:hover {
	color: var(--dc-link);
	text-decoration: underline;
}

/* -- Sub-category links -------------------------------------- */
.dlc-dept-cat__subcats {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.dlc-dept-cat__subcat {
	font-family: var(--font-primary);
	font-size: var(--font-size-14);
	font-weight: 500;
	line-height: 1.4;
	color: var(--dc-link);
	text-decoration: none;
	display: inline-block;
	text-shadow: var(--dc-shadow);
}

a.dlc-dept-cat__subcat:hover {
	color: var(--dc-title);
	text-decoration: underline;
}

/* -- Focus --------------------------------------------------- */
.dlc-dept-cat a:focus-visible {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* -- 992px to 1199px: circles 150px ------------------------- */
@media (min-width: 992px) and (max-width: 1199px) {
	.dlc-dept-cat__circle {
		width: 150px;
		height: 150px;
	}
}

/* -- 768px to 991px: circles 150px, smaller titles ---------- */
@media (min-width: 768px) and (max-width: 991px) {
	.dlc-dept-cat__circle {
		width: 150px;
		height: 150px;
	}
	.dlc-dept-cat__title {
		font-size: var(--font-size-20);
	}
}

/* -- 767px and below: solid department color, single column -- */
@media (max-width: 767px) {

	.dlc-dept-cat {
		background-image: none !important;
	}

	/* Department solid background colors (documented exception) */
	.dlc-dept-cat[data-dept="corset"]    { background: rgb(133, 82, 125) !important; }
	.dlc-dept-cat[data-dept="bra"]       { background: rgb(191, 75, 109) !important; } /* 3% darker: white 4.73 (4.497 on rgb 197 77 112) */
	.dlc-dept-cat[data-dept="hat"]       { background: rgb(0, 154, 190) !important; }
	.dlc-dept-cat[data-dept="costume"]   { background: rgb(223, 127, 32) !important; }
	.dlc-dept-cat[data-dept="steampunk"] { background: rgb(119, 16, 0) !important; }
	.dlc-dept-cat[data-dept="leather"]   { background: rgb(35, 31, 32) !important; }

	.dlc-dept-cat__heading {
		font-size: var(--font-size-25);
	}

	/* Phones: solid color behind the text - no backing, no halo */
	.dlc-dept-cat.dlc-dept-cat { --dc-shadow: none; }
	.dlc-dept-cat.dlc-dept-cat::before { display: none; }
	.dlc-dept-cat.dlc-dept-cat .dlc-dept-cat__heading,
	.dlc-dept-cat.dlc-dept-cat .dlc-dept-cat__text {
		background: none;
		box-shadow: none;
		padding: 0;
	}
	.dlc-dept-cat[data-dept="bra"] { --dc-heading: var(--color-white); --dc-link: var(--color-white); }
	.dlc-dept-cat[data-dept="hat"],
	.dlc-dept-cat[data-dept="costume"] {
		--dc-heading: var(--color-black);
		--dc-title: var(--color-black);
		--dc-link: var(--color-black);
	}

	.dlc-dept-cat__grid {
		flex-direction: column;
		align-items: center;
	}

	.dlc-dept-cat__tile {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.dlc-dept-cat__circle {
		width: 200px;
		height: 200px;
	}

	.dlc-dept-cat__title {
		font-size: var(--font-size-20);
	}

	/* Taller tap targets */
	.dlc-dept-cat__subcats {
		gap: 0;
	}
	a.dlc-dept-cat__subcat {
		padding: 12px;
	}
}

/* -- Narrow section (under 460px - was the 479px window line): slightly smaller circles -- */
@container (max-width: 459px) {
	.dlc-dept-cat__circle {
		width: 180px;
		height: 180px;
	}
}
