/*
 * Compact cart dropdown shared by every storefront route.
 * Kept separate from the cart/checkout bundle to protect global page weight.
 */

.site-header .cart-dropdown {
	width: min(clamp(460px, 34vw, 620px), calc(100vw - 32px));
	min-width: 0;
	max-width: none;
}

.site-header .cart-dropdown-wrapper {
	overflow: hidden;
	padding: 0;
	border: 1px solid #d8dde3;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 48px rgb(33 33 33 / 18%);
	color: #212121;
}

.site-header .cart-dropdown .tc-mini-cart__items {
	display: grid;
	gap: 0;
	max-height: min(68dvh, 650px);
	margin: 0;
	padding: 8px;
	overflow: auto;
	list-style: none;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
}

.site-header .cart-dropdown .tc-mini-cart__item {
	position: relative;
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) 44px;
	gap: 14px;
	align-items: center;
	min-height: 102px;
	padding: 12px 6px;
	border-bottom: 1px solid #eceff2;
}

.site-header .cart-dropdown .tc-mini-cart__item:last-child {
	border-bottom: 0;
}

.site-header .cart-dropdown .tc-mini-cart__image {
	display: grid;
	width: 76px;
	height: 76px;
	place-items: center;
	border: 1px solid #eceff2;
	border-radius: 8px;
	background: #fff;
}

.site-header .cart-dropdown .tc-mini-cart__image img {
	width: 68px;
	height: 68px;
	margin: 0;
	object-fit: contain;
}

.site-header .cart-dropdown .tc-mini-cart__details {
	min-width: 0;
}

.site-header .cart-dropdown .tc-mini-cart__name {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 5px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: #212121;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.site-header .cart-dropdown .tc-mini-cart__details :where(.variation, .wc-item-meta) {
	margin: 4px 0;
	color: #5d6167;
	font-size: 11px;
	line-height: 1.35;
}

.site-header .cart-dropdown .tc-mini-cart__details :where(.variation, .wc-item-meta) :where(dt, dd, p) {
	display: inline;
	margin: 0;
}

.site-header .cart-dropdown .tc-mini-cart__purchase-row {
	display: flex;
	flex-wrap: wrap;
	gap: 7px 10px;
	align-items: center;
	margin-top: 8px;
}

.site-header .cart-dropdown .tc-mini-cart__quantity {
	display: grid;
	grid-template-columns: 44px minmax(44px, 3ch) 44px;
	overflow: hidden;
	border: 1px solid #aeb5bc;
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.site-header .cart-dropdown .tc-mini-cart__quantity .quantity-button {
	display: grid;
	width: 44px;
	min-width: 44px;
	height: 44px;
	min-height: 44px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: #212121;
	position: static;
}

.site-header .cart-dropdown .tc-mini-cart__quantity .quantity-button::before,
.site-header .cart-dropdown .tc-mini-cart__quantity .quantity-button::after {
	content: none;
}

.site-header .cart-dropdown .tc-mini-cart__quantity .quantity-button:hover {
	background: #fff2c7;
}

.site-header .cart-dropdown .tc-mini-cart__quantity .quantity-button svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-width: 2;
}

.site-header .cart-dropdown .tc-mini-cart__quantity .qty {
	width: 100%;
	min-width: 3ch;
	height: 44px;
	min-height: 44px;
	padding: 0 3px;
	border: 0;
	border-right: 1px solid #d7dbe0;
	border-left: 1px solid #d7dbe0;
	border-radius: 0;
	background: #fff;
	color: #212121;
	font: inherit;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	text-align: center;
}

.site-header .cart-dropdown .tc-mini-cart__unit-price,
.site-header .cart-dropdown .tc-mini-cart__fixed-quantity {
	color: #4b4f54;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.site-header .cart-dropdown .tc-mini-cart__stock-warning {
	margin: 7px 0 0;
	padding: 6px 8px;
	border-left: 3px solid #b42318;
	border-radius: 5px;
	background: #fff1f0;
	color: #8f1b13;
	font-size: 11px;
	font-weight: 750;
	line-height: 1.35;
}

.site-header .cart-dropdown .tc-mini-cart__item--stock-error {
	background: #fff8f7;
}

.site-header .cart-dropdown .tc-mini-cart__remove {
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	border-radius: 8px;
	color: #6c7178;
	font-size: 25px;
	line-height: 1;
	text-decoration: none;
}

.site-header .cart-dropdown .tc-mini-cart__remove:hover,
.site-header .cart-dropdown .tc-mini-cart__remove:focus-visible {
	background: #fff2d2;
	color: #212121;
}

.site-header .cart-dropdown .tc-mini-cart__more {
	margin: 0;
	padding: 9px 16px;
	border-top: 1px solid #eceff2;
	background: #fffaf0;
	font-size: 12px;
	font-weight: 750;
	text-align: center;
}

.site-header .cart-dropdown .tc-mini-cart__more a {
	color: #212121;
	text-decoration-color: #ffbd27;
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

.site-header .cart-dropdown .woocommerce-mini-cart__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 54px;
	margin: 0;
	padding: 12px 16px;
	border-top: 1px solid #dfe3e7;
	background: #f6f7f8;
	color: #212121;
}

.site-header .cart-dropdown .woocommerce-mini-cart__total strong {
	color: #50545a;
	font-size: 13px;
	font-weight: 700;
}

.site-header .cart-dropdown .woocommerce-mini-cart__total .woocommerce-Price-amount {
	margin: 0;
	color: #212121;
	font-size: 18px;
	font-weight: 800;
}

.site-header .cart-dropdown .woocommerce-mini-cart__buttons {
	display: grid;
	grid-template-columns: 1fr 1.25fr;
	gap: 8px;
	margin: 0;
	padding: 12px 16px 16px;
	background: #f6f7f8;
}

.site-header .cart-dropdown .woocommerce-mini-cart__buttons .button {
	display: inline-flex;
	min-height: 46px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #212121;
	border-radius: 8px;
	background: #fff;
	color: #212121;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.site-header .cart-dropdown .woocommerce-mini-cart__buttons .checkout {
	border-color: #ffbd27;
	background: #ffbd27;
	color: #212121;
}

.site-header .cart-dropdown .woocommerce-mini-cart__buttons .button:hover,
.site-header .cart-dropdown .woocommerce-mini-cart__buttons .button:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 5px 14px rgb(33 33 33 / 14%);
}

.site-header .cart-dropdown .cart-empty {
	display: grid;
	min-height: 176px;
	margin: 0;
	padding: 24px;
	place-items: center;
	align-content: center;
	color: #212121;
	text-align: center;
}

.site-header .cart-dropdown .cart-empty .empty-icon {
	width: 44px;
	max-width: none;
	height: 44px;
	margin: 0 0 9px;
	color: #ffbd27;
}

.site-header .cart-dropdown .cart-empty .empty-text {
	margin: 0;
	color: #4b4f54;
	font-size: 14px;
	font-weight: 700;
}

@media (max-width: 600px) {
	.site-header .cart-button .cart-dropdown {
		width: calc(100vw - 16px);
		max-height: calc(100dvh - 64px);
	}

	.site-header .cart-dropdown .tc-mini-cart__items {
		max-height: min(62dvh, 540px);
	}

	.site-header .cart-dropdown .tc-mini-cart__item {
		grid-template-columns: 68px minmax(0, 1fr) 40px;
		gap: 10px;
	}

	.site-header .cart-dropdown .tc-mini-cart__image {
		width: 68px;
		height: 68px;
	}

	.site-header .cart-dropdown .tc-mini-cart__image img {
		width: 60px;
		height: 60px;
	}
}

@media (orientation: landscape) and (max-height: 600px) {
	.site-header .cart-dropdown .tc-mini-cart__items {
		max-height: 52dvh;
	}

	.site-header .cart-dropdown .tc-mini-cart__item {
		min-height: 72px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header .cart-dropdown .woocommerce-mini-cart__buttons .button {
		transition: none;
	}
}
