/* The7 header dropdown: keep its template, positioning and fragment lifecycle. */
#page .wc-shopping-cart .shopping-cart-inner {
	display: flex;
	flex-flow: column nowrap;
	width: 420px;
	max-width: calc(100vw - 32px);
	max-height: min(640px, calc(100vh - 180px));
	max-height: min(640px, calc(100dvh - 180px));
	padding: 20px;
	box-sizing: border-box;
	overflow: auto;
	overscroll-behavior: contain;
	border: 1px solid var(--wl-line);
	border-top: 3px solid var(--wl-wine);
	border-radius: 16px;
	background: var(--wl-paper);
	box-shadow: 0 12px 36px rgb(48 40 43 / 14%);
	filter: none;
	font-size: 14px;
	line-height: 1.6;
	text-align: start;
	text-transform: none;
}
#page .wc-shopping-cart .shopping-cart-inner::before { content: none; }

/* The7 uses !important header colors, including its transparent-header preset. */
#page .wc-shopping-cart .shopping-cart-inner,
#page .wc-shopping-cart .shopping-cart-inner * {
	color: var(--wl-ink) !important;
}
#page .wc-shopping-cart .cart_list {
	flex: 0 1 auto;
	min-height: 0;
	margin: 0;
	/* Leave room for borders/focus rings and keep scrollbar space stable. */
	padding: 5px 6px;
	box-sizing: border-box;
	overflow: auto;
	scrollbar-gutter: stable;
	overscroll-behavior: contain;
	list-style: none;
	scrollbar-width: thin;
	scrollbar-color: var(--wl-line) transparent;
}
#page .wc-shopping-cart .cart_list:not(.empty) li {
	position: relative;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) 32px;
	grid-template-areas: "image title remove";
	align-items: start;
	gap: 12px;
	margin: 0;
	padding: 16px 0;
	border: 0;
	border-bottom: 1px solid var(--wl-line);
}
#page .wc-shopping-cart .cart_list li:first-child { padding-top: 0; }
#page .wc-shopping-cart .cart_list li:last-child { border-bottom: 0; }
#page .wc-shopping-cart .cart_list li > a:not(.remove),
#page .wc-shopping-cart .cart_list li > img { grid-area: image; }
#page .wc-shopping-cart .cart_list li > span { grid-area: title; min-width: 0; overflow-wrap: anywhere; }
#page .wc-shopping-cart .cart_list li img {
	display: block;
	float: none;
	width: 64px;
	height: 80px;
	margin: 0;
	border-radius: 8px;
	background: var(--wl-canvas);
	object-fit: contain;
}
#page .wc-shopping-cart .cart_list li > span > a,
#page .wc-shopping-cart .cart_list li > span > a:hover {
	display: block;
	/* Site custom CSS sets Roboto only on :not(:hover); keep the family stable. */
	font-family: var(--the7-base-font-family, Roboto, sans-serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none !important;
	text-transform: none;
}
#page .wc-shopping-cart .shopping-cart-inner a:not(.button):not(.remove) {
	background: none;
	-webkit-text-fill-color: currentColor;
	text-decoration: none !important;
}
#page .wc-shopping-cart .shopping-cart-inner a:not(.button):not(.remove):hover {
	color: var(--wl-wine) !important;
}
#page .wc-shopping-cart .cart_list .price-wrap { display: block; padding-top: 6px; }
#page .wc-shopping-cart .cart_list .quantity { display: block; width: auto; margin: 0; font-size: 14px; line-height: 1.6; }
#page .wc-shopping-cart .amount { white-space: nowrap; }
#page .wc-shopping-cart .cart_list .variation,
#page .wc-shopping-cart .cart_list .variation *,
#page .wc-shopping-cart .cart_list .unit-price-cart,
#page .wc-shopping-cart .cart_list .unit-price-cart * {
	color: var(--wl-muted) !important;
	font-size: 12px;
	line-height: 1.5;
}
#page .wc-shopping-cart .cart_list .unit-price-cart { display: block; margin-top: 3px; }
#page .wc-shopping-cart .cart_list .variation { margin: 4px 0 0; padding: 0; border: 0; }
#page .wc-shopping-cart .cart_list .variation dd { margin: 0; }
#page .wc-shopping-cart .cart_list li a.remove {
	position: static;
	grid-area: remove;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px !important;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 1px solid var(--wl-line);
	border-radius: 8px;
	background: var(--wl-paper);
	color: var(--wl-muted) !important;
	font-size: 22px !important;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	opacity: 1;
}
#page .wc-shopping-cart .cart_list li a.remove:hover {
	border-color: var(--wl-wine);
	background: var(--wl-canvas);
	color: var(--wl-wine) !important;
}
#page .wc-shopping-cart .shopping-cart-bottom {
	flex: 0 0 auto;
	margin-top: 4px;
	padding-top: 16px;
	border-top: 2px solid var(--wl-line);
}
#page .wc-shopping-cart .total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
}
#page .wc-shopping-cart .total strong { font-size: 14px; font-weight: 600; }
#page .wc-shopping-cart .total small { font-size: 12px; font-weight: 400; }
#page .wc-shopping-cart .shopping-cart-bottom .buttons {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	margin: 0;
	overflow: visible;
}
/* Scrolling the product list keeps one set of actions reachable in tall carts. */
#page .wc-shopping-cart .buttons.top-position { display: none; }
#page .wc-shopping-cart .shopping-cart-inner .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	float: none;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 16px;
	box-sizing: border-box;
	border: 1px solid var(--wl-wine);
	border-radius: 8px;
	background: var(--wl-wine);
	color: #fff !important;
	box-shadow: none;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: normal;
}
#page .wc-shopping-cart .shopping-cart-inner .button.view-cart { background: var(--wl-paper); color: var(--wl-wine) !important; }
#page .wc-shopping-cart .shopping-cart-inner .button:hover { border-color: var(--wl-wine-dark); background: var(--wl-wine-dark); color: #fff !important; }
#page .wc-shopping-cart .shopping-cart-inner a:focus-visible { outline: 3px solid rgb(114 43 67 / 35%); outline-offset: 2px; }
#page .wc-shopping-cart .cart_list.empty li {
	margin: 0;
	padding: 24px 12px;
	border: 1px solid var(--wl-line);
	border-radius: 8px;
	background: var(--wl-canvas);
	color: var(--wl-muted) !important;
	text-align: center;
}
@media (max-width: 540px) {
	#page .wc-shopping-cart .shopping-cart-inner { max-width: calc(100vw - 24px); padding: 16px 12px; border-radius: 12px; }
	#page .wc-shopping-cart .cart_list:not(.empty) li { grid-template-columns: 48px minmax(0, 1fr) 32px; gap: 10px; }
	#page .wc-shopping-cart .cart_list li img { width: 48px; height: 64px; }
}
@media (max-width: 450px) {
	/* The7 centers this wrapper but otherwise caps it at 280px. */
	#page .masthead .wc-shopping-cart .shopping-cart-wrap {
		width: calc(100vw - 24px);
		max-width: calc(100vw - 24px) !important;
	}
	#page .masthead .wc-shopping-cart .shopping-cart-inner { width: 100%; }
}
