/**
 * Side cart (cart drawer) – Figma "Side Cart — Design"
 * Markup: inc/side-cart.php + woocommerce/cart/mini-cart.php
 * Desktop panel 440 px · phones 360 px (≤ 767 px)
 */

/* ---------- drawer + dark background ---------- */
.gv-cart {
	--c-red: #ac262d;
	--c-red-dark: #8e1e24;
	--c-ink: #131313;
	--c-brown: #5f4a3f;
	--c-line: #eadfd0;
	--c-cream: #fdf8ef;
	--c-sand: #fcf1e3;
	--c-amber: #b45309;
	--c-step: #8c7a6b;
	--f-ui: 'Manrope', sans-serif;
	--f-display: 'Instrument Serif', serif;
	--pad: 24px;

	position: fixed;
	inset: 0;
	z-index: 2000;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear 0.3s;
}

.gv-cart.is-open {
	visibility: visible;
	pointer-events: auto;
	transition: none;
}

@media (min-width: 601px) {
	.admin-bar .gv-cart {
		top: var(--wp-admin--admin-bar--height, 0px);
	}
}

.gv-cart .gv-cart__overlay {
	position: absolute;
	inset: 0;
	background: rgba(19, 19, 19, 0.5);
	opacity: 0;
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.gv-cart.is-open .gv-cart__overlay {
	opacity: 1;
}

.gv-cart .gv-cart__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: 440px;
	max-width: calc(100vw - 30px);
	background: #fff;
	box-shadow: 0 2px 4px -1px rgba(94, 51, 31, 0.06), 0 16px 32px -8px rgba(94, 51, 31, 0.14);
	color: var(--c-ink);
	font-family: var(--f-ui);
	text-align: left;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
	outline: 0;
}

.gv-cart.is-open .gv-cart__panel {
	transform: none;
}

body.gv-cart-open {
	overflow: hidden;
}

.gv-cart .gv-cart__panel *,
.gv-cart .gv-cart__panel *::before,
.gv-cart .gv-cart__panel *::after {
	box-sizing: border-box;
}

.gv-cart .gv-cart-i {
	display: block;
	flex: none;
}

.gv-cart .gv-cart__panel a:focus-visible,
.gv-cart .gv-cart__panel button:focus-visible {
	outline: 2px solid var(--c-red);
	outline-offset: 2px;
}

/* ---------- head: "Your cart  4 items  ×" ---------- */
.gv-cart .gv-cart__head {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 16px 16px var(--pad);
	border-bottom: 1px solid var(--c-line);
}

.gv-cart .gv-cart__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.gv-cart .gv-cart__head .gv-cart__title {
	margin: 0;
	padding: 0;
	font: 400 36px/40px var(--f-display);
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--c-red);
	white-space: nowrap;
}

.gv-cart .gv-cart__head .gv-cart__count {
	display: inline-flex;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--c-sand);
	font: 500 14px/20px var(--f-ui);
	color: var(--c-brown);
	white-space: nowrap;
}

.gv-cart .gv-cart__head .gv-cart__count[hidden] {
	display: none;
}

.gv-cart .gv-cart__head .gv-cart__close {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--c-cream);
	box-shadow: none;
	color: var(--c-ink);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gv-cart .gv-cart__head .gv-cart__close:hover {
	background: var(--c-sand);
	color: var(--c-red);
}

/* ---------- contents (updated by WooCommerce) ---------- */
.gv-cart .widget_shopping_cart_content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.gv-cart.is-busy .widget_shopping_cart_content {
	cursor: progress;
}

.gv-cart.is-busy .gv-cart__ship,
.gv-cart.is-busy .gv-cart__total,
.gv-cart.is-busy .gv-cart__checkout {
	opacity: 0.6;
	transition: opacity 0.2s ease;
}

/* ---------- free delivery bar ---------- */
.gv-cart .gv-cart__ship {
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 10px;
	padding: 16px var(--pad);
	background: var(--c-cream);
}

.gv-cart .gv-cart__ship .gv-cart__ship-text {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font: 500 14px/20px var(--f-ui);
	color: var(--c-ink);
}

.gv-cart .gv-cart__ship-text .gv-cart-i {
	color: var(--c-red);
}

.gv-cart .gv-cart__ship-text strong {
	font-weight: 700;
}

.gv-cart .gv-cart__ship-track {
	height: 8px;
	overflow: hidden;
	border-radius: 4px;
	background: var(--c-line);
}

.gv-cart .gv-cart__ship-track span {
	display: block;
	height: 100%;
	border-radius: 4px;
	background: var(--c-red);
	transition: width 0.4s ease;
}

/* ---------- product list (scrolls) ---------- */
.gv-cart .gv-cart__scroll {
	flex: 1 1 auto;
	min-height: 0;
	padding: 0 var(--pad);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--c-line) transparent;
}

.gv-cart .gv-cart__scroll::after {
	content: "";
	position: sticky;
	bottom: 0;
	display: block;
	height: 56px;
	margin: -56px calc(var(--pad) * -1) 0;
	background: linear-gradient(rgba(255, 255, 255, 0), #fff);
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.gv-cart .gv-cart__scroll.is-end::after {
	opacity: 0;
}

.gv-cart .gv-cart__scroll .gv-cart__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gv-cart .gv-cart__items .gv-cart-item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
	padding: 20px 0;
	border-bottom: 1px solid var(--c-line);
	list-style: none;
	transition: opacity 0.25s ease;
}

.gv-cart .gv-cart__items .gv-cart-item::before,
.gv-cart .gv-cart__items .gv-cart-item::after {
	content: none;
}

.gv-cart .gv-cart__items .gv-cart-item.is-removing {
	opacity: 0.4;
	pointer-events: none;
}

.gv-cart .gv-cart-item .gv-cart-item__img,
.gv-cart .gv-upsell .gv-upsell__img {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	overflow: hidden;
	border-radius: 12px;
	background: var(--c-sand);
	color: var(--c-red);
}

.gv-cart .gv-cart-item .gv-cart-item__img img,
.gv-cart .gv-upsell .gv-upsell__img img {
	display: block;
	float: none;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
}

.gv-cart .gv-cart-item__img .gv-cart-i,
.gv-cart .gv-upsell__img .gv-cart-i {
	opacity: 0.55;
}

.gv-cart .gv-cart-item .gv-cart-item__info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.gv-cart .gv-cart-item .gv-cart-item__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.gv-cart .gv-cart-item .gv-cart-item__name {
	margin: 0;
	padding: 0;
	font: 600 16px/24px var(--f-ui);
	letter-spacing: 0;
	text-transform: none;
	color: var(--c-ink);
}

.gv-cart .gv-cart-item .gv-cart-item__name a {
	display: inline;
	font-weight: inherit;
	color: inherit;
	text-decoration: none;
}

.gv-cart .gv-cart-item .gv-cart-item__name a:hover {
	color: var(--c-red);
}

.gv-cart .gv-cart-item .gv-cart-item__remove {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--c-brown);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gv-cart .gv-cart-item .gv-cart-item__remove:hover {
	background: var(--c-sand);
	color: var(--c-red);
}

.gv-cart .gv-cart-item .gv-cart-item__meta {
	margin: 0;
	font: 500 14px/20px var(--f-ui);
	color: var(--c-brown);
}

.gv-cart .gv-cart-item .gv-cart-item__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 8px;
}

.gv-cart .gv-cart-item .gv-cart-item__single {
	font: 500 14px/20px var(--f-ui);
	color: var(--c-brown);
}

/* quantity stepper */
.gv-cart .gv-cart-item .gv-cart-qty {
	display: inline-flex;
	flex: none;
	align-items: center;
	height: 38px;
	border: 1px solid var(--c-step);
	border-radius: 8px;
	background: #fff;
}

.gv-cart .gv-cart-qty .gv-cart-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: transparent;
	box-shadow: none;
	color: var(--c-ink);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gv-cart .gv-cart-qty .gv-cart-qty__btn:hover {
	background: var(--c-cream);
	color: var(--c-red);
}

.gv-cart .gv-cart-qty .gv-cart-qty__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	background: transparent;
	color: var(--c-ink);
}

.gv-cart .gv-cart-qty .gv-cart-qty__value {
	min-width: 32px;
	font: 700 16px/24px var(--f-ui);
	text-align: center;
	color: var(--c-ink);
}

/* line price */
.gv-cart .gv-cart-item .gv-cart-item__price {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	white-space: nowrap;
}

.gv-cart .gv-cart-item .gv-cart-item__was {
	font: 500 14px/20px var(--f-ui);
	color: var(--c-brown);
}

.gv-cart .gv-cart-item .gv-cart-item__now {
	font: 700 16px/24px var(--f-ui);
	color: var(--c-ink);
}

/* ---------- "Pairs well with" ---------- */
.gv-cart .gv-cart__upsell {
	padding: 20px 0;
}

.gv-cart .gv-cart__eyebrow {
	margin: 0 0 12px;
	font: 700 13px/16px var(--f-ui);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--c-amber);
}

.gv-cart .gv-cart__upsell .gv-cart__upsell-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gv-cart .gv-cart__upsell-list .gv-upsell {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--c-line);
	border-radius: 12px;
	list-style: none;
}

.gv-cart .gv-upsell .gv-upsell__img {
	width: 56px;
	height: 56px;
}

.gv-cart .gv-upsell .gv-upsell__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.gv-cart .gv-upsell .gv-upsell__name {
	overflow: hidden;
	font: 600 16px/24px var(--f-ui);
	color: var(--c-ink);
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gv-cart .gv-upsell .gv-upsell__name:hover {
	color: var(--c-red);
}

.gv-cart .gv-upsell .gv-upsell__sub {
	margin: 0;
	font: 500 14px/20px var(--f-ui);
	color: var(--c-brown);
}

.gv-cart .gv-upsell .gv-upsell__add {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 76px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--c-red);
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	font: 700 14px/20px var(--f-ui);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--c-red);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gv-cart .gv-upsell .gv-upsell__add:hover {
	background: var(--c-red);
	color: #fff;
}

.gv-cart .gv-upsell .gv-upsell__add.is-loading {
	opacity: 0.6;
	cursor: progress;
}

/* ---------- footer (stays at the bottom) ---------- */
.gv-cart .gv-cart__footer {
	position: relative;
	z-index: 1;
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 12px;
	padding: 20px var(--pad) 24px;
	border-top: 1px solid var(--c-line);
	background: #fff;
	box-shadow: 0 -8px 24px -8px rgba(94, 51, 31, 0.08);
}

.gv-cart .gv-cart__footer .gv-cart__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
}

.gv-cart .gv-cart__total .gv-cart__total-label {
	font: 400 18px/28px var(--f-ui);
	color: var(--c-ink);
}

.gv-cart .gv-cart__total .gv-cart__amount {
	font: 400 30px/34px var(--f-display);
	letter-spacing: -0.01em;
	color: var(--c-ink);
	white-space: nowrap;
}

.gv-cart .gv-cart__amount small {
	font: 500 13px/1 var(--f-ui);
	letter-spacing: 0;
	color: var(--c-brown);
}

.gv-cart .gv-cart__footer .gv-cart__note,
.gv-cart .gv-cart__footer .gv-cart__secure {
	margin: 0;
	font: 500 14px/20px var(--f-ui);
	color: var(--c-brown);
}

.gv-cart .gv-cart__footer .gv-cart__secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

/* red button with the cut corner (Checkout / Start shopping) */
.gv-cart .gv-cart__panel .gv-cart__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 52px;
	padding: 0 28px 0 24px;
	border: 0;
	border-radius: 0;
	background: var(--c-red);
	clip-path: polygon(0 0, 100% 0, 100% 75%, 94% 100%, 0 100%);
	font: 700 14px/20px var(--f-ui);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	transition: background-color 0.2s ease;
}

.gv-cart .gv-cart__panel .gv-cart__btn:hover,
.gv-cart .gv-cart__panel .gv-cart__btn:focus {
	background: var(--c-red-dark);
	color: #fff;
}

.gv-cart .gv-cart__panel .gv-cart__btn--sm {
	display: inline-flex;
	height: 48px;
}

.gv-cart .gv-cart__btn .amount,
.gv-cart .gv-cart__btn bdi {
	color: inherit;
}

/* ---------- empty cart ---------- */
.gv-cart .gv-cart__empty {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	justify-content: safe center;
	gap: 16px;
	min-height: 0;
	padding: 32px;
	overflow-y: auto;
	text-align: center;
}

.gv-cart .gv-cart__empty .gv-cart__empty-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: var(--c-sand);
	color: var(--c-red);
}

.gv-cart .gv-cart__empty .gv-cart__empty-title {
	margin: 0;
	padding: 0;
	font: 400 36px/40px var(--f-display);
	letter-spacing: -0.01em;
	text-align: center;
	color: var(--c-red);
}

.gv-cart .gv-cart__empty .gv-cart__empty-text {
	max-width: 376px;
	margin: 0;
	font: 400 16px/24px var(--f-ui);
	color: var(--c-brown);
}

.gv-cart .gv-cart__empty .gv-cart__eyebrow {
	margin: 0;
}

.gv-cart .gv-cart__empty .gv-cart__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	max-width: 376px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gv-cart .gv-cart__chips li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gv-cart .gv-cart__chips a {
	display: inline-flex;
	padding: 8px 16px;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	background: #fff;
	font: 600 15px/20px var(--f-ui);
	color: var(--c-ink);
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.gv-cart .gv-cart__chips a:hover {
	border-color: var(--c-red);
	color: var(--c-red);
}

/* ---------- phones ---------- */
@media (max-width: 767px) {
	.gv-cart {
		--pad: 20px;
	}

	.gv-cart .gv-cart__panel {
		width: 360px;
	}

	.gv-cart .gv-cart__head {
		padding: 16px 12px 16px 20px;
	}

	.gv-cart .gv-cart__head .gv-cart__title,
	.gv-cart .gv-cart__empty .gv-cart__empty-title {
		font-size: 30px;
		line-height: 34px;
	}

	.gv-cart .gv-cart__footer {
		padding: 20px 20px calc(28px + env(safe-area-inset-bottom, 0px));
	}

	.gv-cart .gv-cart__empty {
		padding: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gv-cart,
	.gv-cart .gv-cart__overlay,
	.gv-cart .gv-cart__panel,
	.gv-cart .gv-cart__ship-track span {
		transition: none;
	}
}
