/**
 * Slide-in cart drawer — aligned with front-page tokens (DM Sans UI, Cormorant titles, quiet surfaces).
 *
 * Overrides child theme globals: * { border-radius:0 !important; box-shadow:none !important }
 */

#hp-cart-drawer-root,
#hp-cart-drawer-root * {
	box-sizing: border-box;
}

#hp-cart-drawer-root {
	position: relative;
	z-index: 9997;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.55;
	color: var(--t, #111111);
	-webkit-font-smoothing: antialiased;
}

/* WooCommerce price markup — match product card (.hp-product-card__price) */
#hp-cart-drawer-root .woocommerce-Price-amount,
#hp-cart-drawer-root .woocommerce-Price-amount bdi,
#hp-cart-drawer-root #hp-drawer-subtotal .woocommerce-Price-amount {
	font-family: var(--sans, "DM Sans", system-ui, sans-serif) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #1a1a1a !important;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
}

.hp-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hp-cart-drawer.is-open .hp-drawer-overlay {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.hp-drawer-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	height: 100dvh;
	max-height: 100vh;
	max-height: 100dvh;
	width: 420px;
	max-width: 100vw;
	z-index: 9999;
	background: var(--off, #fafaf8);
	border-left: 0.5px solid var(--bd, rgba(0, 0, 0, 0.08));
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	box-shadow: -12px 0 40px rgba(28, 58, 40, 0.08) !important;
}

/* Fixed drawer sits under WP admin bar unless offset */
body.admin-bar .hp-drawer-panel {
	top: 32px;
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .hp-drawer-panel {
		top: 46px;
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
		max-height: calc(100vh - 46px);
		max-height: calc(100dvh - 46px);
	}
}

.hp-cart-drawer.is-open .hp-drawer-panel {
	transform: translateX(0);
}

/* Drawer header: title + close (in flow, not floating) */
.hp-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex: 0 0 auto;
	padding: 20px 24px;
	border-bottom: 1px solid var(--bd, rgba(0, 0, 0, 0.08));
	background: var(--w, #ffffff);
}

.hp-drawer-heading {
	margin: 0;
	font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--g, #1c3a28);
}

.hp-drawer-close {
	position: relative;
	top: auto;
	right: auto;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid var(--g, #1c3a28) !important;
	border-radius: 0 !important;
	background: var(--g, #1c3a28);
	color: var(--w, #ffffff);
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset !important;
}

.hp-drawer-close:hover,
.hp-drawer-close:focus-visible {
	background: var(--gm, #2e5c3e);
	color: var(--w, #ffffff);
	border-color: var(--gm, #2e5c3e) !important;
	outline: 2px solid var(--gold, #b8975a);
	outline-offset: 2px;
}

.hp-drawer-close:active {
	transform: scale(0.96);
}

/* Shipping strip */
.hp-drawer-shipping {
	flex: 0 0 auto;
	padding: 16px 24px 14px;
	border-bottom: 0.5px solid var(--bd, rgba(0, 0, 0, 0.08));
	background: var(--w, #ffffff);
}

.hp-drawer-shipping__msg {
	margin: 0 0 8px;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	font-size: 12px;
	line-height: 1.5;
	color: #1a1a1a;
}

.hp-drawer-shipping__msg .woocommerce-Price-amount,
.hp-drawer-shipping__msg .woocommerce-Price-amount bdi {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #1a1a1a !important;
	font-variant-numeric: tabular-nums;
}

.hp-drawer-shipping__msg--ok {
	color: var(--gm, #2e5c3e);
	font-weight: 500;
}

.hp-drawer-shipping__track {
	height: 4px;
	border-radius: 0 !important;
	background: var(--gp, #f0f5f2);
	overflow: hidden;
	border: 0.5px solid var(--bd, rgba(0, 0, 0, 0.06));
}

.hp-drawer-shipping__fill {
	display: block;
	height: 100%;
	background: var(--g, #1c3a28);
	border-radius: 0 !important;
	transition: width 0.35s ease;
}

.hp-drawer-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--gp, #f0f5f2);
}

.hp-drawer-items {
	padding: 0 24px;
}

.hp-drawer__empty {
	margin: 32px 0;
	text-align: center;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	color: var(--mu, #888888);
	font-size: 14px;
}

/* Row: image | main column (name, price, qty) | remove */
.hp-drawer-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--bd, rgba(0, 0, 0, 0.08));
	background: transparent;
}

.hp-drawer-item:last-child {
	border-bottom: 0;
}

#hp-cart-drawer-root .hp-drawer-item__media,
#hp-cart-drawer-root .hp-drawer-item__media-link {
	display: block;
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	overflow: hidden;
	background: var(--gp, #f0f5f2);
	border-radius: 8px !important;
}

#hp-cart-drawer-root .hp-drawer-item__media-link {
	text-decoration: none;
}

#hp-cart-drawer-root .hp-drawer-item__media img,
#hp-cart-drawer-root .hp-drawer-item__media .hp-drawer-item__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px !important;
	border: 0;
}

.hp-drawer-item__col {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.hp-drawer-item__info {
	width: 100%;
	min-width: 0;
}

.hp-drawer-item__title {
	display: block;
	margin: 0 0 4px;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--t, #111111);
	text-decoration: none;
}

.hp-drawer-item__title:hover,
.hp-drawer-item__title:focus-visible {
	color: var(--gm, #2e5c3e);
	text-decoration: underline;
}

.hp-drawer-item__price {
	margin: 0;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif) !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #1a1a1a;
	letter-spacing: 0;
}

#hp-cart-drawer-root .hp-drawer-item__price .woocommerce-Price-amount,
#hp-cart-drawer-root .hp-drawer-item__price .woocommerce-Price-amount bdi {
	color: #1a1a1a !important;
	font-weight: 600 !important;
	font-size: 14px !important;
}

.hp-drawer-item__remove-wrap {
	flex: 0 0 auto;
	align-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hp-drawer-item__remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 0 !important;
	color: var(--mu, #888888);
	text-decoration: none;
	font-size: 1.35rem;
	line-height: 1;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	font-weight: 400;
	transition: background 0.2s ease, color 0.2s ease;
	border: 0.5px solid transparent;
}

.hp-drawer-item__remove:hover,
.hp-drawer-item__remove:focus-visible {
	background: var(--gp, #f0f5f2);
	color: var(--g, #1c3a28);
	border-color: var(--bd, rgba(0, 0, 0, 0.08));
}

/* Filter-pill style qty (matches .hp-filter-strip__pill) */
.hp-drawer-item__qty {
	display: inline-flex;
	align-items: stretch;
	border: 0.5px solid rgba(0, 0, 0, 0.12);
	border-radius: 0 !important;
	overflow: hidden;
	background: var(--w, #ffffff);
}

.hp-drawer-item__qty > * + * {
	border-left: 0.5px solid var(--bd, rgba(0, 0, 0, 0.1));
}

.hp-drawer-minus,
.hp-drawer-plus {
	width: 34px;
	min-height: 34px;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--w, #ffffff);
	color: var(--g, #1c3a28);
	font-size: 1rem;
	line-height: 1;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	cursor: pointer;
	transition: background 0.15s ease;
	box-shadow: none !important;
}

.hp-drawer-minus:hover,
.hp-drawer-plus:hover,
.hp-drawer-minus:focus-visible,
.hp-drawer-plus:focus-visible {
	background: var(--gp, #f0f5f2);
}

.hp-drawer-qty-input {
	width: 38px;
	min-height: 34px;
	border: 0 !important;
	border-radius: 0 !important;
	text-align: center;
	font-size: 12px;
	font-weight: 500;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif) !important;
	color: var(--t, #111111);
	background: var(--w, #ffffff);
	-moz-appearance: textfield;
}

.hp-drawer-qty-input::-webkit-outer-spin-button,
.hp-drawer-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Cart item meta (variation etc.) */
#hp-cart-drawer-root .hp-drawer-item__info .variation,
#hp-cart-drawer-root .hp-drawer-item__info dl.variation {
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
	font-size: 11px;
	color: var(--mu, #888888);
	margin: 6px 0 0;
}

/* Footer — filter label + primary button */
.hp-drawer-footer {
	flex: 0 0 auto;
	padding: 14px 24px 18px;
	border-top: 0.5px solid var(--bd, rgba(0, 0, 0, 0.08));
	background: var(--w, #ffffff);
}

.hp-drawer-footer__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif);
}

.hp-drawer-footer__row span:first-child {
	font-size: 13px;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--mu, #888888);
	font-weight: 400;
}

.hp-drawer-footer__row span:last-child {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	letter-spacing: 0;
}

.hp-drawer-checkout {
	display: block;
	width: 100%;
	text-align: center;
	padding: 12px 20px;
	border: none !important;
	border-radius: 0 !important;
	background: var(--g, #1c3a28);
	color: var(--w, #ffffff) !important;
	font-family: var(--sans, "DM Sans", system-ui, sans-serif) !important;
	font-weight: 500;
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: opacity 0.2s ease, background 0.2s ease;
	box-shadow: none !important;
}

.hp-drawer-checkout:hover,
.hp-drawer-checkout:focus-visible {
	opacity: 0.88;
	background: var(--gm, #2e5c3e);
	color: var(--w, #ffffff) !important;
}

.hp-drawer-checkout:active {
	opacity: 1;
}

body.hp-cart-drawer-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.hp-drawer-panel {
		width: 100vw;
	}
}
