/*
 * Cart drawer contents and the pieces it shares with the product page: buttons, the free
 * shipping meter, the stepper. Loaded on every page, because the drawer opens on every page.
 * Tokens only. Built first in pdp-lab (approved 2026-11-12).
 */

[hidden] {
	display: none !important;
}

.pdp-meter {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 44px;
	margin-top: var(--space-3);
	padding: 0 var(--space-4) 0 7px; /* 7px keeps the round icon concentric with the pill's end */
	border-radius: var(--radius-pill);
	background: var(--color-surface);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-honey-950) 14%, transparent);
	overflow: hidden;
	isolation: isolate;
}

.pdp-meter__fill {
	position: absolute;
	inset: 0 auto 0 0;
	z-index: -1;
	width: 0;
	min-width: 44px;
	border-radius: var(--radius-pill);
	background: var(--color-highlight);
	transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pdp-meter.is-free .pdp-meter__fill {
	border-radius: 0;
}

.pdp-meter__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--color-surface);
	color: var(--color-text);
	transition: background 0.3s 0.25s, color 0.3s 0.25s;
}

.pdp-meter__icon svg {
	width: 18px;
	height: 18px;
}

.pdp-meter__icon .i-check,
.pdp-meter.is-free .pdp-meter__icon .i-truck {
	display: none;
}

.pdp-meter.is-free .pdp-meter__icon {
	background: var(--color-accent);
	color: var(--color-accent-contrast);
}

.pdp-meter.is-free .pdp-meter__icon .i-check {
	display: block;
}

.pdp-meter__text {
	flex: 1;
	min-width: 0;
	font-size: 14.5px;
	line-height: 1.15;
	white-space: nowrap;
}

.pdp-meter__text b {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.pdp-meter__end {
	flex: none;
	color: var(--color-muted);
	font-size: 12.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.pdp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: 56px;
	padding: 0 var(--space-4);
	border: 0;
	border-radius: var(--radius-pill);
	font-size: 16px;
	font-weight: 650;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--duration), color var(--duration), transform 0.12s;
}

.pdp-btn:active {
	transform: scale(0.98);
}

.pdp-btn--add {
	background: var(--color-accent);
	color: var(--color-accent-contrast);
}

.pdp-btn--add:hover {
	background: color-mix(in srgb, var(--color-accent) 86%, #fff);
}

.pdp-btn__sep {
	width: 1px;
	height: 16px;
	background: currentColor;
	opacity: 0.32;
}

.pdp-btn__price {
	font-variant-numeric: tabular-nums;
}

.pdp-btn--add.is-added {
	background: var(--color-highlight);
	color: var(--color-text);
}

.pdp-btn--now {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px var(--color-accent);
	color: var(--color-text);
}

.pdp-btn--now:hover {
	background: var(--color-surface);
}

.pdp-btn--wide {
	width: 100%;
}

.pdp-eyebrow {
	color: var(--color-honey-800);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.pdp-item__check {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--color-honey-950) 38%, transparent);
	transition: background var(--duration), box-shadow var(--duration);
}

.pdp-cart__body {
	flex: 1;
	padding: var(--space-1) var(--space-4) var(--space-4);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.pdp-cart__nudge {
	margin-top: var(--space-3) !important;
	color: var(--color-soft);
	font-size: 13.5px;
	text-align: center;
}

.pdp-cart__nudge b {
	color: var(--color-text);
}

.pdp-cart__lines {
	margin-top: var(--space-4) !important;
}

.pdp-cart__lines li {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: var(--space-3);
	padding: var(--space-3) 0;
	border-top: var(--border);
}

.pdp-cart__lines img,
.pdp-cart__up img {
	display: block;
	width: 64px;
	height: 80px;
	border-radius: var(--radius-sm);
	object-fit: cover;
}

.pdp-cart__what {
	display: grid;
	align-content: start;
	gap: var(--space-0);
	min-width: 0;
}

.pdp-cart__what b,
.pdp-cart__up b,
.pdp-cart__gift b {
	font-size: 15.5px;
	font-weight: 650;
	line-height: 1.2;
}

.cart-drawer small {
	display: block;
	color: var(--color-muted);
	font-size: 12.5px;
	font-weight: 500;
}

.pdp-cart__price {
	font-size: 15px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.pdp-step {
	display: inline-grid;
	grid-template-columns: 34px 30px 34px;
	align-items: center;
	justify-self: start;
	height: 34px;
	margin-top: var(--space-2);
	border-radius: var(--radius-pill);
	background: var(--color-surface);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-honey-950) 18%, transparent);
}

.pdp-step button {
	display: grid;
	place-items: center;
	height: 34px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.pdp-step svg {
	width: 16px;
	height: 16px;
}

.pdp-step output {
	font-size: 14.5px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.pdp-cart__up {
	margin-top: var(--space-2);
	padding: var(--space-4);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	box-shadow: var(--surface-ring);
}

.pdp-cart__up > div {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--space-3);
	margin-top: var(--space-3);
}

.pdp-cart__up img {
	width: 52px;
	height: 65px;
}

.pdp-cart__up .pdp-btn {
	min-height: 40px;
	padding: 0 var(--space-4);
	font-size: 14.5px;
}

.pdp-cart__gift {
	margin-top: var(--space-3);
	padding: var(--space-4);
	border-radius: var(--radius-md);
	background: var(--color-honey-200);
}

.pdp-cart__gift label {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	align-items: center;
	gap: var(--space-3);
	cursor: pointer;
}

.pdp-cart__gift input {
	position: absolute;
	opacity: 0;
}

.pdp-cart__gift input:checked + .pdp-item__check {
	background: var(--color-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='m7.500 13.400 3.700 3.700 7.300-7.800' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	box-shadow: none;
}

.pdp-cart__gift input:focus-visible + .pdp-item__check {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
}

.pdp-cart__gift textarea {
	display: block;
	width: 100%;
	margin-top: var(--space-3);
	padding: var(--space-3) var(--space-3);
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--color-honey-50);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-honey-950) 18%, transparent);
	color: inherit;
	font-size: 16px;
	resize: vertical;
}

.pdp-cart__foot {
	padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
	border-top: var(--border);
	background: var(--color-surface);
}

.pdp-cart__foot dl div {
	display: flex;
	justify-content: space-between;
	gap: var(--space-4);
	padding: var(--space-1) 0;
	font-size: 14.5px;
}

.pdp-cart__foot dd {
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.pdp-cart__foot .is-saving {
	color: var(--color-honey-800);
	font-weight: 650;
}

.pdp-cart__foot .pdp-buy {
	margin-top: var(--space-3);
}

/* The drawer: lines scroll, the totals and the way to checkout stay in reach */

.cart-drawer .widget_shopping_cart_content {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: opacity var(--duration);
}

.cart-drawer .widget_shopping_cart_content.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.cart-drawer__panel {
	padding-bottom: 0;
}

.cart-drawer .pdp-cart__body {
	padding: 0 0 var(--space-4);
}

.cart-drawer :where(.pdp-cart__body, .pdp-cart__foot) :where(p, ul, dl, dd) {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pdp-cart__lines a {
	display: block;
}

.cart-drawer .pdp-cart__foot {
	margin-inline: calc(-1 * var(--space-4));
	padding-inline: var(--space-4);
}

.pdp-cart__foot .woocommerce-mini-cart__buttons {
	display: grid;
	gap: var(--space-2);
	margin-top: var(--space-3);
}

.pdp-cart__foot .pdp-btn {
	width: 100%;
}

.pdp-cart__view {
	display: block;
	padding: var(--space-2);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-underline-offset: 3px;
}

.pdp-cart__empty {
	display: grid;
	flex: 1;
	place-content: center;
	justify-items: center;
	gap: var(--space-4);
	padding: var(--space-5);
}

.pdp-cart__empty p {
	margin: 0;
}
