/*
 * Adhesive Bras + Accessories — category page.
 * Mobile-first. Tokens come from DS-theme/style.css (--ds-*); type sizes and
 * letter-spacing are the storefront's own (Tiempos Headline names, Quicksand
 * body at 11px, hairline rules, square black buttons).
 */

.ds-category-adhesive .content {
	float: none;
	width: 100%;
}

.ds-adh {
	--adh-pad: var(--ds-page-pad, 16px);
	--adh-serif: "Tiempos Headline", Georgia, serif;
	--adh-sans: Quicksand, system-ui, sans-serif;
	--adh-frame: #f7f4f0;
	font-family: var(--adh-sans);
	font-size: 11px;
	line-height: 20px;
	color: var(--ds-body, #333);
	background: #fff;
}

.ds-adh img {
	display: block;
	max-width: 100%;
	height: auto;
}

.ds-adh a {
	color: inherit;
	text-decoration: none;
}

/* ---------- shared atoms ---------- */

.ds-adh__eyebrow {
	margin: 0;
	font-size: 9px;
	line-height: 14px;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--ds-label, #999);
}

.ds-adh__eyebrow--ink {
	color: var(--ds-ink, #000);
}

.ds-adh__price {
	margin: 0;
	font-size: 11px;
	line-height: 20px;
	letter-spacing: 2px;
	color: var(--ds-ink, #000);
}

.ds-adh__price .woocommerce-Price-amount,
.ds-adh__price .amount {
	font-weight: 400;
}

.ds-adh__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	padding: 4px 12px;
	background: var(--ds-ink, #000);
	color: #fff;
	font-family: var(--adh-sans);
	font-size: 10px;
	line-height: 14px;
	font-weight: 500;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	text-align: center;
	border: 1px solid var(--ds-ink, #000);
	border-radius: 0;
	transition: background-color .15s ease, color .15s ease;
}

/*
 * As a link the button also matches the theme's `.content a` rules, which
 * outrank a single class; the selectors below carry the ancestor so the
 * button's own colours win whether it is an <a> or a <span>.
 */
.ds-adh a.ds-adh__btn,
.ds-adh a.ds-adh__btn:visited {
	color: #fff;
	text-decoration: none;
}

.ds-adh .ds-adh__btn:hover,
.ds-adh .ds-adh__btn:focus-visible,
.ds-adh a.ds-adh__btn:hover,
.ds-adh a.ds-adh__btn:focus-visible {
	background: var(--ds-hover, #111);
	color: #fff;
}

.ds-adh__btn:focus-visible {
	outline: 2px solid var(--ds-ink, #000);
	outline-offset: 3px;
}

.ds-adh .ds-adh__btn--line,
.ds-adh a.ds-adh__btn--line,
.ds-adh a.ds-adh__btn--line:visited {
	background: #fff;
	color: var(--ds-ink, #000);
}

.ds-adh .ds-adh__btn--line:hover,
.ds-adh .ds-adh__btn--line:focus-visible,
.ds-adh a.ds-adh__btn--line:hover,
.ds-adh a.ds-adh__btn--line:focus-visible {
	background: var(--ds-ink, #000);
	color: #fff;
}

.ds-adh .ds-adh__btn--soon,
.ds-adh .ds-adh__btn--soon:hover {
	background: #fff;
	color: var(--ds-label, #999);
	border-color: var(--ds-hairline, #e0e0e0);
	cursor: default;
}

/* ---------- top: intro + hero ---------- */

.ds-adh__intro {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 26px var(--adh-pad) 14px;
}

.ds-adh__title {
	margin: 0;
	font-family: var(--adh-serif);
	font-weight: 300;
	font-size: 26px;
	line-height: 32px;
	letter-spacing: .4px;
	text-transform: none;
	color: var(--ds-ink, #000);
}

.ds-adh__lede {
	margin: 0;
	max-width: 300px;
	color: var(--ds-secondary, #666);
}

/* The compare cards carry these same two actions on a phone. */
.ds-adh__intro-actions {
	display: none;
}

.ds-adh__hero {
	position: relative;
	margin: 0;
	aspect-ratio: 39 / 44;
	overflow: hidden;
	background: #fff;
}

/*
 * The frames own the ratio and the image fills them absolutely, so a slow or
 * missing image never reflows the page and the crop is the frame's, not the
 * file's.
 */
.ds-adh__hero-img,
.ds-adh__card-img,
.ds-adh__tile-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ds-adh__hero-img {
	object-position: 50% 15%;
}

/* The compare cards' files are framed alike (cups at ~86% of the width); tiles crop in a touch (the wings file already fills 80% of its width). */
.ds-adh__tile-img {
	transform: scale(1.08);
}

.ds-adh__hero-label {
	position: absolute;
	z-index: 1;
	left: var(--adh-pad);
	bottom: var(--adh-pad);
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 14px;
	background: #fff;
}

.ds-adh__hero-name {
	font-family: var(--adh-serif);
	font-weight: 300;
	font-size: 17px;
	line-height: 22px;
	color: var(--ds-ink, #000);
}

/* ---------- compare ---------- */

.ds-adh__compare {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-bottom: 1px solid var(--ds-hairline, #e0e0e0);
}

.ds-adh__card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 12px 20px var(--adh-pad);
}

.ds-adh__card--left {
	order: 1;
	border-right: 1px solid var(--ds-hairline, #e0e0e0);
}

.ds-adh__card--right {
	order: 2;
	padding-left: 12px;
	padding-right: var(--adh-pad);
}

.ds-adh__card-media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #fff;
}

.ds-adh__card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ds-adh__card-name {
	margin: 0;
	font-family: var(--adh-serif);
	font-weight: 300;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 1px;
	text-transform: none;
	color: var(--ds-body, #333);
}

/* The theme styles links in .content; the name is the same type whether or not it links. */
.ds-adh__card-name a {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
	text-decoration: none;
}

.ds-adh__card-name a:hover {
	color: var(--ds-ink, #000);
}

.ds-adh__card-body .ds-adh__eyebrow + .ds-adh__card-name {
	margin-top: -8px;
}

.ds-adh__card-body .ds-adh__card-name + .ds-adh__price {
	margin-top: -8px;
}

.ds-adh__specs {
	display: flex;
	flex-direction: column;
	margin: 0;
	font-size: 10px;
	line-height: 16px;
	color: var(--ds-secondary, #666);
}

.ds-adh__spec {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 3px 0;
	border-top: 1px solid var(--ds-hairline, #e0e0e0);
}

.ds-adh__spec:first-child {
	border-top: 0;
	padding-top: 0;
}

.ds-adh__spec dt,
.ds-adh__spec dd {
	margin: 0;
}

.ds-adh__spec dd {
	color: var(--ds-ink, #000);
	text-align: right;
}

/* ---------- wear it with ---------- */

.ds-adh__with {
	padding: 26px var(--adh-pad) 8px;
}

.ds-adh__with-head {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 14px;
}

.ds-adh__with-title {
	margin: 0;
	font-family: var(--adh-serif);
	font-weight: 300;
	font-size: 18px;
	line-height: 24px;
	text-transform: none;
	color: var(--ds-ink, #000);
}

.ds-adh__with-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ds-adh__tile {
	margin: 0;
}

.ds-adh__tile-link {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ds-adh__tile-media {
	position: relative;
	display: block;
	aspect-ratio: 15 / 19;
	overflow: hidden;
	background: #fff;
}

.ds-adh__badge {
	position: absolute;
	z-index: 1;
	top: 8px;
	left: 8px;
	padding: 3px 7px;
	background: var(--ds-ink, #000);
	color: #fff;
	font-size: 8px;
	line-height: 12px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}

.ds-adh__tile-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ds-adh__tile-name {
	font-family: var(--adh-serif);
	font-weight: 300;
	font-size: 11px;
	line-height: 18px;
	letter-spacing: 1.5px;
	color: var(--ds-body, #333);
}

.ds-adh__tile-link:hover .ds-adh__tile-name {
	color: var(--ds-ink, #000);
}

.ds-adh__tile-caption {
	font-size: 10px;
	line-height: 15px;
	color: var(--ds-secondary, #666);
}

.ds-adh__tile-link:focus-visible {
	outline: 2px solid var(--ds-ink, #000);
	outline-offset: 3px;
}

/* ---------- tablet ---------- */

/* ---------- fit finder ---------- */

/* Hidden until js/finder.js marks the section ready: no script, no band. */
.ds-adh__finder {
	display: none;
}

.ds-adh--finder .ds-adh__finder {
	display: block;
	padding: 24px var(--adh-pad) 20px;
	background: var(--adh-frame);
	border-bottom: 1px solid var(--ds-hairline, #e0e0e0);
}

.ds-adh__finder-head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 18px;
}

.ds-adh__finder-title {
	margin: 0;
	font-family: var(--adh-serif);
	font-weight: 300;
	font-size: 22px;
	line-height: 28px;
	letter-spacing: .2px;
	text-transform: none; /* the theme capitalises headings */
	color: var(--ds-ink, #000);
}

.ds-adh__finder-lede {
	margin: 0;
	color: var(--ds-secondary, #666);
}

.ds-adh__q {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.ds-adh__q[hidden] {
	display: none;
}

.ds-adh__q-prompt {
	padding: 0;
	margin: 0 0 12px;
	font-family: var(--adh-serif);
	font-weight: 400;
	text-transform: none;
	font-size: 15px;
	line-height: 22px;
	color: var(--ds-ink, #000);
}

.ds-adh__opts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.ds-adh__opt {
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	min-height: 56px;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	background: #fff;
	color: var(--ds-ink, #000);
	font-family: var(--adh-sans);
	font-size: 11px;
	line-height: 16px;
	letter-spacing: .3px;
	text-align: left;
	text-transform: none;
	border: 1px solid var(--ds-hairline, #e0e0e0);
	border-radius: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.ds-adh__opt:hover,
.ds-adh__opt:focus-visible {
	background: #fff;
	color: var(--ds-ink, #000);
	border-color: var(--ds-ink, #000);
}

.ds-adh__opt:focus-visible {
	outline: 2px solid var(--ds-ink, #000);
	outline-offset: 2px;
}

.ds-adh__opt.is-picked,
.ds-adh__opt.is-picked:hover {
	background: var(--ds-ink, #000);
	color: #fff;
	border-color: var(--ds-ink, #000);
}

.ds-adh__opt-icon {
	flex: 0 0 24px;
}

.ds-adh__opt-label {
	flex: 1 1 auto;
	min-width: 0;
}

.ds-adh__finder-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	min-height: 16px;
}

.ds-adh__finder-foot[hidden] {
	display: none;
}

.ds-adh__progress {
	display: flex;
	gap: 6px;
}

.ds-adh__dot {
	width: 6px;
	height: 6px;
	border: 1px solid var(--ds-ink, #000);
	background: transparent;
}

.ds-adh__dot.is-on {
	background: var(--ds-ink, #000);
}

.ds-adh__finder-link {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	font-family: var(--adh-sans);
	font-size: 9px;
	line-height: 14px;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--ds-label, #999);
	cursor: pointer;
}

.ds-adh__finder-link:hover,
.ds-adh__finder-link:focus-visible {
	background: none;
	color: var(--ds-ink, #000);
}

.ds-adh__finder-link[hidden] {
	display: none;
}

/* verdict */

.ds-adh__verdict {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 16px 18px;
	background: #fff;
	border: 1px solid var(--ds-hairline, #e0e0e0);
}

.ds-adh__verdict[hidden] {
	display: none;
}

.ds-adh__verdict-name {
	margin: -4px 0 0;
	font-family: var(--adh-serif);
	font-weight: 300;
	font-size: 22px;
	line-height: 28px;
	letter-spacing: .2px;
	text-transform: none;
	color: var(--ds-ink, #000);
}

.ds-adh__verdict-reason {
	margin: 0;
	color: var(--ds-body, #333);
}

.ds-adh__know {
	margin: -4px 0 0;
	padding: 0;
	list-style: none;
	color: var(--ds-secondary, #666);
}

.ds-adh__know li {
	position: relative;
	margin: 0;
	padding-left: 14px;
	list-style: none;
}

.ds-adh__know li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 7px;
	width: 5px;
	height: 3px;
	border-left: 1px solid var(--ds-ink, #000);
	border-bottom: 1px solid var(--ds-ink, #000);
	transform: rotate(-45deg);
}

.ds-adh .ds-adh__know-link {
	align-self: flex-start;
	padding-bottom: 2px;
	font-size: 10px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--ds-ink, #000);
	border-bottom: 1px solid var(--ds-ink, #000);
}

.ds-adh__verdict-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}

/* card re-rank */

.ds-adh__match {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 1;
	padding: 3px 8px;
	background: var(--ds-ink, #000);
	color: #fff;
	font-size: 8px;
	line-height: 12px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}

.ds-adh__match[hidden] {
	display: none;
}

/* Outranks .ds-adh-reveal.ds-visible AND cancels the reveal keyframe, whose
 * `forwards` fill would otherwise pin opacity at 1 once the safety net ran. */
.ds-adh__compare .ds-adh__card.is-other {
	animation: none;
	opacity: .6;
	transition: opacity .3s ease;
}

.ds-adh__compare .ds-adh__card.is-other:hover,
.ds-adh__compare .ds-adh__card.is-other:focus-within {
	opacity: 1;
}

@media (min-width: 768px) {
	.ds-adh {
		--adh-pad: 40px;
	}

	.ds-adh__top {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 400px;
		align-items: stretch;
		border-bottom: 1px solid var(--ds-hairline, #e0e0e0);
	}

	.ds-adh__intro {
		justify-content: center;
		gap: 14px;
		padding: 40px 32px 40px var(--adh-pad);
	}

	.ds-adh__title {
		font-size: 34px;
		line-height: 40px;
		letter-spacing: .2px;
	}

	.ds-adh__intro-actions {
		display: flex;
		flex-direction: column;
		gap: 10px;
		max-width: 240px;
		padding-top: 6px;
	}

	.ds-adh__hero {
		aspect-ratio: 400 / 480;
	}

	.ds-adh__hero-label {
		left: 20px;
		bottom: 20px;
		padding: 12px 16px;
	}

	.ds-adh__hero-name {
		font-size: 18px;
		line-height: 24px;
	}

	.ds-adh__card {
		gap: 12px;
		padding: 28px 24px 32px var(--adh-pad);
	}

	.ds-adh__card--right {
		padding-left: 24px;
		padding-right: var(--adh-pad);
	}

	.ds-adh__card-name {
		font-size: 18px;
		line-height: 24px;
		letter-spacing: .5px;
		color: var(--ds-ink, #000);
	}

	.ds-adh__specs {
		font-size: 11px;
		line-height: 17px;
	}

	.ds-adh__spec {
		gap: 12px;
		padding: 4px 0;
	}

	.ds-adh__with {
		padding: 40px var(--adh-pad) 16px;
	}

	.ds-adh__with-head {
		gap: 3px;
		margin-bottom: 20px;
	}

	.ds-adh__with-title {
		font-size: 22px;
		line-height: 28px;
	}

	.ds-adh__with-list {
		gap: 16px;
	}

	.ds-adh__tile-link {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 16px;
		align-items: center;
	}

	.ds-adh__tile-name {
		font-size: 13px;
		line-height: 20px;
		letter-spacing: 1px;
	}

	.ds-adh__badge {
		top: 12px;
		left: 12px;
		padding: 4px 8px;
	}

	.ds-adh--finder .ds-adh__finder {
		padding: 36px var(--adh-pad) 28px;
	}

	.ds-adh__opts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ds-adh__verdict {
		padding: 28px 28px 24px;
	}

	.ds-adh__verdict-actions {
		flex-direction: row;
	}

	.ds-adh__verdict-actions .ds-adh__btn {
		min-width: 200px;
	}
}

/* ---------- desktop ---------- */

@media (min-width: 1100px) {
	.ds-adh {
		--adh-pad: 96px;
	}

	.ds-adh__top {
		grid-template-columns: minmax(0, 1fr) 640px;
	}

	.ds-adh__intro {
		gap: 18px;
		padding: 72px 72px 72px var(--adh-pad);
	}

	.ds-adh__title {
		max-width: 460px;
		font-size: 48px;
		line-height: 56px;
	}

	.ds-adh__lede {
		max-width: 400px;
		font-size: 12px;
		line-height: 22px;
	}

	.ds-adh__intro-actions {
		flex-direction: row;
		gap: 12px;
		max-width: none;
		padding-top: 8px;
	}

	.ds-adh__intro-actions .ds-adh__btn {
		padding: 4px 28px;
	}

	.ds-adh__hero {
		aspect-ratio: 1 / 1;
	}

	.ds-adh__hero-label {
		left: 32px;
		bottom: 32px;
		padding: 16px 20px;
	}

	.ds-adh__hero-name {
		font-size: 22px;
		line-height: 28px;
	}

	.ds-adh__card {
		display: grid;
		grid-template-columns: 320px minmax(0, 1fr);
		gap: 36px;
		align-items: center;
		padding: 48px 48px 48px var(--adh-pad);
	}

	.ds-adh__card--right {
		padding-left: 48px;
		padding-right: var(--adh-pad);
	}

	.ds-adh__card-body {
		gap: 14px;
	}

	.ds-adh__card-name {
		font-size: 24px;
		line-height: 30px;
	}

	.ds-adh__card-body .ds-adh__price {
		font-size: 12px;
	}

	.ds-adh__specs {
		gap: 0;
	}

	.ds-adh__card-body .ds-adh__btn {
		width: 200px;
		max-width: 100%;
		margin-top: 6px;
	}

	.ds-adh__with {
		padding: 64px var(--adh-pad) 24px;
	}

	.ds-adh__with-head {
		gap: 4px;
		margin-bottom: 28px;
	}

	.ds-adh__with-title {
		font-size: 28px;
		line-height: 34px;
	}

	.ds-adh__with-list {
		gap: 24px;
	}

	.ds-adh__tile-link {
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 24px;
	}

	.ds-adh__tile-body {
		gap: 6px;
	}

	.ds-adh__tile-name {
		font-size: 14px;
		line-height: 22px;
	}

	.ds-adh__tile-caption {
		font-size: 11px;
		line-height: 17px;
	}

	.ds-adh--finder .ds-adh__finder {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 640px;
		column-gap: 72px;
		align-items: start;
		padding: 56px var(--adh-pad) 48px;
	}

	.ds-adh__finder-head {
		margin-bottom: 0;
	}

	.ds-adh__finder-title {
		font-size: 34px;
		line-height: 40px;
	}

	.ds-adh__finder-foot {
		grid-column: 2;
	}
}

/* ---------- hero fade ----------
 * The tag page's hero fade, unchanged in mechanism (productTag-page.css,
 * "hero fade"): the IMAGE is opaque from its first paint, and the backdrop's
 * own colour sits on top of it and fades out — ease-out like the gallery's
 * curve, at 0.8s so it reads on a warm cache. Built this way up because Chrome does not count a fading image as
 * painted until the fade finishes; an overlay fading out costs the LCP nothing.
 * `.ds-adh-shown` is added by the inline script beside the hero the moment the
 * image decodes (js/category-adhesive.js backstops it); the keyframe clears the
 * overlay at 3s if no script ever runs. The label is positioned, so it paints
 * above the overlay and was never part of the fade. */
.ds-adh-fade::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-color: var(--ds-adh-hero-top, #fff);
	opacity: 1;
	will-change: opacity;
	transition: opacity .8s ease-out;
	animation: ds-adh-overlay-safety .8s ease-out 3s forwards;
}

.ds-adh-fade.ds-adh-shown::before {
	opacity: 0;
	will-change: auto;
	animation: none;
}

@keyframes ds-adh-overlay-safety {
	to { opacity: 0; }
}

/* ---------- scroll reveal ----------
 * The product gallery's slide fade (single-product.css: opacity 0, 0.6s
 * ease-out, revealed by .ds-visible), applied to the compare cards and the
 * companion tiles as they enter the viewport. Same 3s safety net. */
.ds-adh-reveal {
	opacity: 0;
	transition: opacity .6s ease-out;
	animation: ds-adh-reveal-safety .6s ease-out 3s forwards;
}

.ds-adh-reveal.ds-visible {
	opacity: 1;
	animation: none;
}

.ds-adh-reveal:nth-child(2) {
	transition-delay: .12s;
}

@keyframes ds-adh-reveal-safety {
	to { opacity: 1; }
}

/* Reduced motion: everything is simply there from the first paint. */
@media (prefers-reduced-motion: reduce) {
	.ds-adh__btn {
		transition: none;
	}

	.ds-adh-fade::before {
		content: none;
	}

	.ds-adh-reveal {
		opacity: 1;
		transition: none;
		animation: none;
	}
}
