/* ==========================================================================
   Cart (custom code). Copy of the WooCommerce Cart block on page #45 with the
   theme styling from inc/woocommerce/cart-style.php, as it renders live.
   ========================================================================== */

body:has(.gg-cart) {
	background-color: #FBF9F5;
}

.gg-cart {
	box-sizing: border-box;
	max-width: 1320px;
	margin: 0 auto;
	padding: 80px 16px;
	font-family: "Geist", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: -0.16px;
	color: #0E0E0E;
}

.gg-cart *,
.gg-cart *::before,
.gg-cart *::after {
	box-sizing: border-box;
}

.gg-cart .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

.gg-cart .gg-cart__inner {
	position: relative;
	transition: opacity 0.2s ease;
}

.gg-cart.is-busy .gg-cart__inner {
	opacity: 0.6;
	pointer-events: none;
}

/* Layout: items card + 340px totals card. */
.gg-cart .gg-cart__layout {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.gg-cart .gg-cart__main,
.gg-cart .gg-cart__sidebar {
	min-width: 0;
	background: #fff;
	border: 1px solid #D0D5DD;
	border-radius: 8px;
}

.gg-cart .gg-cart__main {
	flex: 1 1 auto;
	padding: 8px 24px;
}

.gg-cart .gg-cart__sidebar {
	flex: 0 0 340px;
	width: 340px;
	max-width: 100%;
	padding: 24px;
}

/* Items table. */
.gg-cart .gg-cart__items {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14.4px;
	line-height: 21.6px;
	background: transparent;
}

.gg-cart .gg-cart__items th,
.gg-cart .gg-cart__items td {
	background: transparent !important;
	border: 0 !important;
	text-align: left;
}

.gg-cart .gg-cart__head th {
	padding: 16px 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 21px;
	letter-spacing: -0.16px;
	color: #475467;
	text-transform: none;
	border-bottom: 1px solid #EAECF0 !important;
	vertical-align: middle;
}

.gg-cart .gg-cart__head-image {
	width: 80px;
}

.gg-cart .gg-cart__row + .gg-cart__row td {
	border-top: 1px solid #EAECF0 !important;
}

.gg-cart .gg-cart__row td {
	vertical-align: top;
}

.gg-cart .gg-cart__image {
	width: 80px;
	padding: 20px 16px 20px 0 !important;
}

.gg-cart .gg-cart__image a {
	display: inline;
}

.gg-cart .gg-cart__image img {
	display: inline;
	width: 64px;
	max-width: 100%;
	height: 88px;
	margin: 0;
	object-fit: cover;
	border-radius: 8px;
}

.gg-cart .gg-cart__product {
	padding: 20px 0 !important;
}

.gg-cart .gg-cart__wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.gg-cart .gg-cart__name {
	display: block;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.16px;
	color: #0E0E0E !important;
	text-decoration: none;
	overflow-wrap: anywhere;
}

a.gg-cart__name:hover,
a.gg-cart__name:focus {
	color: #0E0E0E !important;
	text-decoration: underline;
}

.gg-cart .gg-cart__meta {
	margin: 0 0 4px;
	font-size: 14px;
	line-height: 21px;
	color: #667085;
}

.gg-cart .gg-cart__desc {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 11.375px;
	line-height: 1.4;
	color: #667085;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.gg-cart .gg-cart__meta dl.variation {
	margin: 4px 0 0;
	font-size: 11.375px;
	line-height: 1.4;
}

.gg-cart .gg-cart__meta dl.variation dt,
.gg-cart .gg-cart__meta dl.variation dd,
.gg-cart .gg-cart__meta dl.variation p {
	display: inline;
	margin: 0;
}

/* Quantity + remove. */
.gg-cart .gg-cart__qty {
	display: flex;
	align-items: center;
	gap: 12px;
}

.gg-cart .gg-qty {
	display: flex;
	width: 149px;
	height: 37px;
	border: 1px solid rgba(14, 14, 14, 0.3);
	border-radius: 8px;
	background: #fff;
}

.gg-cart .gg-qty--fixed {
	width: 87px;
}

.gg-cart .gg-qty__btn {
	flex: 0 0 30px;
	width: 30px;
	min-width: 0;
	height: 35px;
	margin: 0;
	padding: 0;
	font-family: "Geist", sans-serif;
	font-size: 12.96px;
	font-weight: 400;
	line-height: 19.44px;
	color: #344054;
	background: transparent;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	box-shadow: none;
}

.gg-cart .gg-qty__btn:hover:not([disabled]),
.gg-cart .gg-qty__btn:focus:not([disabled]) {
	color: #0E0E0E;
	background: #F2F4F7;
}

.gg-cart .gg-qty__btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

.gg-cart .gg-qty__input {
	flex: 1 1 auto;
	width: 87px;
	min-width: 0;
	height: 35px;
	margin: 0;
	padding: 8px 16px;
	font-family: "Geist", sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 15px;
	color: #0E0E0E;
	text-align: center;
	background: transparent;
	border: 0;
	border-radius: 3px;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.gg-cart .gg-qty__input::-webkit-outer-spin-button,
.gg-cart .gg-qty__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.gg-cart .gg-qty__input:focus {
	outline: 1px solid #0E0E0E;
	outline-offset: -1px;
}

.gg-cart .gg-cart__remove {
	display: block;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	line-height: 0;
	color: #667085;
	background: transparent !important;
	border: 0;
	cursor: pointer;
	transition: color 0.2s ease;
}

.gg-cart .gg-cart__remove svg {
	display: block;
	fill: currentColor;
}

.gg-cart .gg-cart__remove:hover,
.gg-cart .gg-cart__remove:focus {
	color: #0E0E0E;
}

/* Basket totals. */
.gg-cart .gg-cart__summary {
	margin: 0 0 16px;
	padding-bottom: 1px;
}

.gg-cart .gg-cart__totals-title {
	margin: 0 0 8px;
	padding: 0;
	font-family: "Gentium Plus", serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 34px;
	letter-spacing: 0;
	color: #0E0E0E;
	text-transform: none;
	border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.gg-cart .gg-cart__totals-wrap {
	padding: 16px 0;
	font-size: 13px;
	line-height: 18.2px;
}

.gg-cart .gg-cart__coupon {
	border-top: 1px solid #EAECF0;
}

.gg-cart .gg-cart__totals {
	padding: 0 0 16px;
	border-top: 1px solid rgba(14, 14, 14, 0.2);
}

.gg-cart .gg-cart__totals-item {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding-bottom: 4px;
}

.gg-cart .gg-cart__totals-label {
	display: block;
	flex-grow: 1;
	font-size: 15px;
	line-height: 21px;
	color: #344054;
}

.gg-cart .gg-cart__totals-value {
	font-size: 15px;
	font-weight: 500;
	line-height: 21px;
	color: #0E0E0E;
}

.gg-cart .gg-cart__totals-value strong {
	font-weight: 700;
	text-transform: uppercase;
}

/* Proceed to Checkout. */
.gg-cart .gg-cart__submit {
	margin: 0 0 16px;
}

.gg-cart .gg-cart__submit-container {
	padding: 8px 0 0;
}

.gg-cart .gg-cart__submit-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 19px;
	font-family: "Geist", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	color: #fff !important;
	text-align: center;
	text-decoration: none !important;
	background: #000;
	border: 0;
	border-radius: 8px;
	transition: background-color 0.2s ease;
}

.gg-cart .gg-cart__submit-button:hover,
.gg-cart .gg-cart__submit-button:focus {
	color: #fff !important;
	background: #333;
}

.gg-cart .gg-cart__submit-button:focus-visible {
	outline: 2px solid #0E0E0E;
	outline-offset: 2px;
}

/* Coupon panel (shared look with checkout). */
.gg-cart .gg-wc-coupon__toggle {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0 32px 0 0;
	font-family: "Geist", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 21px;
	letter-spacing: -0.16px;
	color: #344054;
	text-align: left;
	text-transform: none;
	background: transparent !important;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

.gg-cart .gg-wc-coupon__toggle:hover,
.gg-cart .gg-wc-coupon__toggle:focus {
	color: #0E0E0E;
}

.gg-cart .gg-wc-coupon__toggle svg {
	position: absolute;
	top: 50%;
	right: 0;
	width: 24px;
	height: 24px;
	margin-top: -12px;
	fill: currentColor;
	transition: transform 0.2s ease;
}

.gg-cart .gg-wc-coupon__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.gg-cart .gg-wc-coupon__panel {
	padding-top: 16px;
}

.gg-cart .gg-wc-coupon__form {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.gg-cart .gg-wc-field {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.gg-cart .gg-wc-field input {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 16px 12px;
	font-family: "Geist", sans-serif;
	font-size: 16px;
	line-height: 25px;
	color: #2B2D2F;
	background: #fff;
	border: 1px solid #2B2D2F;
	border-radius: 4px;
	box-shadow: none;
}

.gg-cart .gg-wc-field label {
	position: absolute;
	top: 0;
	left: 10px;
	margin: 0;
	font-size: 16px;
	line-height: 22px;
	color: #0E0E0E;
	white-space: nowrap;
	pointer-events: none;
	transform: translateY(14px);
	transform-origin: top left;
	transition: transform 0.2s ease;
}

.gg-cart .gg-wc-field.is-active input {
	padding: 24px 9px 8px;
}

.gg-cart .gg-wc-field.is-active label {
	transform: translateY(6px) scale(0.875);
}

.gg-cart .gg-wc-coupon__apply {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 97px;
	height: 52px;
	margin: 0;
	padding: 14px 16px;
	font-family: "Geist", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 22.4px;
	color: #fff !important;
	background: #0E0E0E !important;
	border: 1px solid #0E0E0E;
	border-radius: 8px;
	cursor: pointer;
}

.gg-cart .gg-wc-field.has-error input {
	border-color: #CC1818;
}

.gg-cart .gg-wc-field.has-error label {
	color: #CC1818;
}

.gg-cart .gg-wc-coupon__error p {
	display: flex;
	align-items: center;
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 13px;
	color: #CC1818;
}

.gg-cart .gg-wc-coupon__error svg {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	margin: 0 1px 0 -1px;
	fill: currentColor;
}

.gg-cart .gg-wc-coupon__apply[disabled] {
	opacity: 0.5;
	cursor: default;
}

.gg-cart .gg-wc-coupon__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.gg-cart .gg-wc-coupon__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 4px 2px 10px;
	font-size: 13px;
	line-height: 18px;
	color: #0E0E0E;
	background: #F2F4F7;
	border-radius: 999px;
}

.gg-cart .gg-wc-coupon__remove {
	width: 20px;
	height: 20px;
	padding: 0;
	font-size: 16px;
	line-height: 18px;
	color: #475467;
	background: transparent !important;
	border: 0;
	cursor: pointer;
}

/* Notices. */
.gg-cart .gg-wc-notices:empty {
	display: none;
}

.gg-cart .gg-wc-notices {
	margin: 0 0 24px;
}

.gg-cart .gg-wc-notices .woocommerce-message,
.gg-cart .gg-wc-notices .woocommerce-info,
.gg-cart .gg-wc-notices .woocommerce-error {
	margin: 0 0 8px;
}

/* Empty cart (page #45 blocks). */
.gg-cart .gg-cart__empty {
	padding: 0;
}

/* Tablets and phones: cards stack (matches the block's medium layout). */
@media (max-width: 991px) {
	.gg-cart .gg-cart__layout {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.gg-cart .gg-cart__main,
	.gg-cart .gg-cart__sidebar {
		flex: 0 0 auto;
		width: 100%;
	}

	.gg-cart .gg-cart__main {
		padding: 8px 20px;
	}

	.gg-cart .gg-cart__sidebar {
		padding: 20px;
	}

	.gg-cart .gg-cart__items thead,
	.gg-cart .gg-cart__totals-title {
		display: none;
	}

	.gg-cart .gg-cart__items,
	.gg-cart .gg-cart__items tbody {
		display: block;
	}

	.gg-cart .gg-cart__row {
		display: grid;
		grid-template-columns: 80px minmax(0, 1fr);
		column-gap: 16px;
		padding: 16px 0;
	}

	.gg-cart .gg-cart__row td {
		display: block;
		min-width: 0;
	}

	.gg-cart .gg-cart__row + .gg-cart__row {
		border-top: 1px solid #EAECF0;
	}

	.gg-cart .gg-cart__row + .gg-cart__row td {
		border-top: 0 !important;
	}
}

/* Phones: sticky checkout bar while the in-card button is out of view (as WooCommerce, max 782px). */
@media (max-width: 782px) {
	.gg-cart .gg-cart__submit.is-sticky .gg-cart__submit-container {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 9999;
		padding: 12px 16px;
		background: #FBF9F5;
		border-top: 1px solid #D0D5DD;
	}
}

/* Small phones. */
@media (max-width: 480px) {
	.gg-cart .gg-cart__main {
		padding: 4px 14px;
	}

	.gg-cart .gg-cart__sidebar {
		padding: 16px;
	}

	.gg-cart .gg-cart__row {
		grid-template-columns: 64px minmax(0, 1fr);
		column-gap: 12px;
	}

	.gg-cart .gg-cart__image {
		width: 64px;
		padding-top: 14px !important;
		padding-bottom: 14px !important;
		padding-right: 0 !important;
	}

	.gg-cart .gg-cart__product {
		padding-top: 14px !important;
		padding-bottom: 14px !important;
	}

	.gg-cart .gg-cart__image img {
		height: 64px;
	}

	.gg-cart .gg-cart__qty {
		flex-wrap: wrap;
		gap: 8px;
	}

	.gg-cart .gg-qty {
		width: 124px;
	}

	.gg-cart .gg-qty--fixed {
		width: 87px;
	}
}

/* Empty basket product grid: same line height as the WooCommerce block (live). */
.gg-cart .wc-block-grid__product {
	line-height: 1.5;
}
