/**
 * cart-page.css — Agora full cart page (/koshyk/).
 *
 * All rules are scoped under body.gp-cart-page (added only on the cart page in
 * includes/woo-cart.php), so they are inert everywhere else. The slide-out
 * drawer keeps its own global cart.css; this file styles the standalone page:
 * a two-column layout (items left, sticky summary right) that collapses to one
 * column on mobile, reusing the design tokens and the drawer's visual language.
 *
 * @package woodmart-child
 */

/* ═══════════════════════════════════════════════
   1. Page shell + header
═══════════════════════════════════════════════ */
.gp-cart-page .gp-cart {
	padding: 32px 0 80px;
	font-family: var(--gp-sans);
	color: var(--gp-ink);
}

.gp-cart-page .gp-cart__head {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 28px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--gp-line);
}

.gp-cart-page .gp-cart__title {
	font-family: var(--gp-serif);
	font-weight: 400;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1;
	letter-spacing: -.012em;
	color: var(--gp-ink);
	margin: 0;
}

.gp-cart-page .gp-cart__count {
	font-family: var(--gp-mono);
	font-size: 13px;
	color: var(--gp-text-soft);
	letter-spacing: .02em;
}

/* ═══════════════════════════════════════════════
   2. Two-column layout
═══════════════════════════════════════════════ */
.gp-cart-page .gp-cart__cols {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 48px;
	align-items: start;
}

.gp-cart-page .gp-cart__main {
	min-width: 0;
}

.gp-cart-page .gp-cart__aside {
	position: sticky;
	top: 24px;
}

/* ═══════════════════════════════════════════════
   3. Free-shipping bar (reuse .gp-ship-bar, page variant)
═══════════════════════════════════════════════ */
.gp-cart-page .gp-ship-bar {
	padding: 14px 18px;
	background: var(--gp-cream);
	border: 1px solid var(--gp-line);
	border-radius: 12px;
	margin-bottom: 8px;
}

.gp-cart-page .gp-ship-bar__msg {
	font-size: var(--gp-small);
}

/* ═══════════════════════════════════════════════
   4. Cart item rows
═══════════════════════════════════════════════ */
.gp-cart-page .gp-cart__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gp-cart-page .gp-cart-item {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 18px;
	padding: 20px 0;
	border-bottom: 1px solid var(--gp-line);
}

.gp-cart-page .gp-cart-item__img {
	width: 96px;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 10px;
	background: var(--gp-cream);
	border: 1px solid var(--gp-line);
}

.gp-cart-page .gp-cart-item__img a,
.gp-cart-page .gp-cart-item__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gp-cart-page .gp-cart-item__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gp-cart-page .gp-cart-item__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.gp-cart-page .gp-cart-item__name {
	font-family: var(--gp-serif);
	font-size: 18px;
	line-height: 1.25;
	color: var(--gp-ink);
}

.gp-cart-page .gp-cart-item__name a {
	color: inherit;
	text-decoration: none;
}

.gp-cart-page .gp-cart-item__name a:hover {
	color: var(--gp-sea);
}

/* WooCommerce variation / meta data */
.gp-cart-page .gp-cart-item__name .variation,
.gp-cart-page .gp-cart-item__name .wc-item-meta {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	font-family: var(--gp-sans);
	font-size: 12px;
	color: var(--gp-text-soft);
	line-height: 1.5;
}

.gp-cart-page .gp-cart-item__name .variation dt,
.gp-cart-page .gp-cart-item__name .variation dd {
	display: inline;
	margin: 0;
	font-weight: 400;
}

.gp-cart-page .gp-cart-item__name .variation dt {
	font-weight: 500;
}

.gp-cart-page .backorder_notification {
	font-size: 12px;
	color: var(--gp-sun-deep);
	margin: 4px 0 0;
}

.gp-cart-page .gp-cart-item__remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex-shrink: 0;
	border: none;
	background: none;
	color: var(--gp-text-soft);
	font-size: 22px;
	line-height: 1;
	text-decoration: none;
	border-radius: 6px;
	transition: color 180ms var(--gp-ease), background 180ms var(--gp-ease);
}

.gp-cart-page .gp-cart-item__remove:hover {
	color: #b0443c;
	background: #fdf2f1;
}

.gp-cart-page .gp-cart-item__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
}

.gp-cart-page .gp-cart-item__price {
	font-size: 17px;
	font-weight: 700;
	color: var(--gp-ink);
	white-space: nowrap;
}

/* ── Qty stepper (WoodMart .quantity: minus / input / plus) ── */
.gp-cart-page .gp-cart-item .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--gp-line);
	border-radius: 999px;
	overflow: hidden;
	height: 40px;
	background: #fff;
}

.gp-cart-page .gp-cart-item .quantity .minus,
.gp-cart-page .gp-cart-item .quantity .plus {
	width: 38px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: none;
	color: var(--gp-ink);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background 160ms var(--gp-ease);
}

.gp-cart-page .gp-cart-item .quantity .minus:hover,
.gp-cart-page .gp-cart-item .quantity .plus:hover {
	background: var(--gp-cream);
}

.gp-cart-page .gp-cart-item .quantity input.qty {
	width: 40px;
	height: 100%;
	border: none;
	border-left: 1px solid var(--gp-line);
	border-right: 1px solid var(--gp-line);
	background: none;
	text-align: center;
	font-family: var(--gp-mono);
	font-size: 14px;
	font-weight: 500;
	color: var(--gp-ink);
	-moz-appearance: textfield;
	appearance: textfield;
}

.gp-cart-page .gp-cart-item .quantity input.qty::-webkit-outer-spin-button,
.gp-cart-page .gp-cart-item .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ═══════════════════════════════════════════════
   5. Coupon + update actions
═══════════════════════════════════════════════ */
.gp-cart-page .gp-cart__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding-top: 22px;
}

.gp-cart-page .gp-cart__coupon {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 8px;
	flex: 1 1 260px;
}

/* WoodMart's inline AJAX coupon validation injects .coupon-error-notice /
   .coupon-info-notice into .gp-cart__coupon — let it wrap to its own line. */
.gp-cart-page .gp-cart__coupon .coupon-error-notice,
.gp-cart-page .gp-cart__coupon .coupon-info-notice,
.gp-cart-page .gp-cart__coupon .woocommerce-error {
	flex-basis: 100%;
	width: 100%;
	margin: 2px 4px 0;
	font-size: 12px;
	line-height: 1.4;
	color: #b0443c;
	list-style: none;
	padding: 0;
}

.gp-cart-page .gp-cart__coupon .coupon-info-notice {
	color: #2a8a3a;
}

.gp-cart-page .gp-cart__coupon-input {
	flex: 1 1 160px;
	min-width: 0;
	height: 46px;
	padding: 0 16px;
	background: #fff;
	border: 1.5px solid var(--gp-line);
	border-radius: 999px;
	font-family: var(--gp-sans);
	font-size: var(--gp-body);
	color: var(--gp-ink);
	outline: none;
	transition: border-color 180ms var(--gp-ease);
}

.gp-cart-page .gp-cart__coupon-input:focus {
	border-color: var(--gp-sea);
}

/* Outline pill buttons — explicit rules win over WoodMart's global .button */
.gp-cart-page .gp-cart__coupon-btn,
.gp-cart-page .gp-cart__update {
	flex-shrink: 0;
	white-space: nowrap;
	height: 46px;
	padding: 0 24px;
	background: transparent;
	color: var(--gp-ink);
	border: 1.5px solid var(--gp-ink);
	border-radius: 999px;
	font-family: var(--gp-sans);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	transition: background .18s var(--gp-ease), color .18s var(--gp-ease), border-color .18s var(--gp-ease);
}

.gp-cart-page .gp-cart__coupon-btn:hover,
.gp-cart-page .gp-cart__update:hover {
	background: var(--gp-ink);
	color: #fff;
	border-color: var(--gp-ink);
}

.gp-cart-page .gp-cart__update {
	margin-left: auto;
}

/* ═══════════════════════════════════════════════
   6. Order-summary card
═══════════════════════════════════════════════ */
.gp-cart-page .gp-cart-summary {
	background: var(--gp-paper-warm);
	border: 1px solid var(--gp-line);
	border-radius: 14px;
	padding: 22px 22px 24px;
}

.gp-cart-page .gp-cart-summary__title {
	font-family: var(--gp-serif);
	font-weight: 400;
	font-size: 22px;
	letter-spacing: normal;
	text-transform: none;
	color: var(--gp-ink);
	margin: 0 0 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--gp-line);
}

.gp-cart-page .gp-cart-summary__table {
	width: 100%;
	border: none;
	margin: 0;
	border-collapse: collapse;
}

.gp-cart-page .gp-cart-summary__table tr {
	border: none;
}

.gp-cart-page .gp-cart-summary__table th,
.gp-cart-page .gp-cart-summary__table td {
	border: none;
	padding: 9px 0;
	font-size: var(--gp-small);
	font-weight: 400;
	color: var(--gp-text-soft);
	text-align: left;
	vertical-align: top;
	background: none;
}

.gp-cart-page .gp-cart-summary__table td {
	text-align: right;
	color: var(--gp-ink);
	font-weight: 500;
}

.gp-cart-page .gp-cart-summary__table .cart-discount th,
.gp-cart-page .gp-cart-summary__table .cart-discount td {
	color: #2a8a3a;
}

/* Order total row — emphasised */
.gp-cart-page .gp-cart-summary__table .order-total th,
.gp-cart-page .gp-cart-summary__table .order-total td {
	padding-top: 16px;
	border-top: 1px solid var(--gp-line);
	font-size: 15px;
	color: var(--gp-ink);
	font-weight: 600;
}

.gp-cart-page .gp-cart-summary__table .order-total td {
	font-family: var(--gp-serif);
	font-size: 22px;
	font-weight: 400;
}

/* Shipping method radios — left-aligned list under a "Доставка" label */
.gp-cart-page .gp-cart-summary__table .shipping th,
.gp-cart-page .gp-cart-summary__table .shipping td {
	display: block;
	width: 100%;
	text-align: left;
	padding: 9px 0 4px;
}

.gp-cart-page .gp-cart-summary__table .shipping ul#shipping_method {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
}

.gp-cart-page .gp-cart-summary__table .shipping li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	justify-content: flex-start;
}

.gp-cart-page .gp-cart-summary__table .shipping li label {
	color: var(--gp-ink);
	margin: 0;
}

.gp-cart-page .gp-cart-summary__table .shipping li .woocommerce-Price-amount {
	color: var(--gp-ink);
	font-weight: 600;
}

/* Method sub-description (e.g. Flexible Shipping "free over …") on its own line */
.gp-cart-page .gp-cart-summary__table .shipping li .shipping-method-description {
	flex-basis: 100%;
	margin: 0 0 0 24px;
	font-size: 12px;
	color: var(--gp-text-soft);
}

.gp-cart-page .woocommerce-shipping-destination {
	font-size: 12px;
	color: var(--gp-text-soft);
	margin: 6px 0 0;
}

.gp-cart-page .shipping-calculator-button {
	color: var(--gp-sea);
	font-size: 12px;
}

/* WoodMart paints .amount green + 600; let it inherit the row's colour/weight */
.gp-cart-page .gp-cart-summary__table .woocommerce-Price-amount,
.gp-cart-page .gp-cart-item__price .woocommerce-Price-amount {
	color: inherit;
	font-weight: inherit;
}

/* ── Proceed to checkout + continue ── */
.gp-cart-page .gp-cart-summary__actions {
	margin-top: 20px;
}

.gp-cart-page .gp-cart-summary__actions .checkout-button,
.gp-cart-page .gp-cart-summary__actions .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 15px 22px;
	background: var(--gp-sea);
	color: #fff;
	font-family: var(--gp-sans);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	border: none;
	border-radius: 999px;
	text-decoration: none;
	transition: background 180ms var(--gp-ease);
}

.gp-cart-page .gp-cart-summary__actions .checkout-button:hover,
.gp-cart-page .gp-cart-summary__actions .button:hover {
	background: var(--gp-sea-deep);
	color: #fff;
}

.gp-cart-page .gp-cart-summary__continue {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	font-size: var(--gp-small);
	color: var(--gp-text-soft);
	text-decoration: none;
	transition: color 180ms var(--gp-ease);
}

.gp-cart-page .gp-cart-summary__continue:hover {
	color: var(--gp-sea);
}

.gp-cart-page .gp-cart-summary__continue-icon {
	transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════
   7. Cross-sells row (full width, reuses .gp-xsell-card)
═══════════════════════════════════════════════ */
.gp-cart-page .gp-cart-xsell {
	margin-top: 56px;
	padding-top: 32px;
	border-top: 1px solid var(--gp-line);
}

.gp-cart-page .gp-cart-xsell__label {
	font-family: var(--gp-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .16em;
	color: var(--gp-text-soft);
	margin: 0 0 18px;
}

.gp-cart-page .gp-cart-xsell__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.gp-cart-page .gp-cart-xsell .gp-xsell-card__img {
	aspect-ratio: 1;
}

.gp-cart-page .gp-cart-xsell .gp-xsell-card__name {
	font-size: 13px;
	-webkit-line-clamp: 2;
}

.gp-cart-page .gp-cart-xsell .gp-xsell-card__price {
	font-size: 13px;
}

.gp-cart-page .gp-cart-xsell .gp-xsell-card__body {
	padding: 10px 12px 12px;
}

.gp-cart-page .gp-cart-xsell .gp-xsell-card__price .woocommerce-Price-amount {
	color: var(--gp-sea);
	font-weight: 700;
}

/* ═══════════════════════════════════════════════
   8. Empty state
═══════════════════════════════════════════════ */
/* Hide WooCommerce's default "cart is empty" info notice (kept for plugins) */
.gp-cart-page .gp-cart--empty .cart-empty.woocommerce-info,
.gp-cart-page .gp-cart--empty .woocommerce-info.cart-empty {
	display: none;
}

.gp-cart-page .gp-cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 72px 20px 80px;
}

.gp-cart-page .gp-cart-empty__icon {
	color: var(--gp-line);
	margin-bottom: 20px;
}

.gp-cart-page .gp-cart-empty__title {
	font-family: var(--gp-serif);
	font-weight: 400;
	font-size: clamp(26px, 3.4vw, 38px);
	color: var(--gp-ink);
	margin: 0 0 10px;
}

.gp-cart-page .gp-cart-empty__sub {
	font-size: var(--gp-body);
	color: var(--gp-text-soft);
	margin: 0 0 28px;
}

.gp-cart-page .gp-cart-empty__btn {
	padding: 14px 32px;
}

/* ═══════════════════════════════════════════════
   9. WooCommerce notices (coupon applied / errors)
═══════════════════════════════════════════════ */
.gp-cart-page .woocommerce-notices-wrapper .woocommerce-message,
.gp-cart-page .woocommerce-notices-wrapper .woocommerce-info,
.gp-cart-page .woocommerce-notices-wrapper .woocommerce-error {
	background: var(--gp-cream);
	border: 1px solid var(--gp-line);
	border-left: 3px solid var(--gp-sea);
	border-radius: 10px;
	padding: 14px 18px;
	font-size: var(--gp-small);
	color: var(--gp-ink);
	list-style: none;
	margin: 0 0 20px;
}

.gp-cart-page .woocommerce-notices-wrapper .woocommerce-error {
	border-left-color: #b0443c;
}

/* ═══════════════════════════════════════════════
   10. Responsive
═══════════════════════════════════════════════ */
@media (max-width: 960px) {
	.gp-cart-page .gp-cart__cols {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.gp-cart-page .gp-cart__aside {
		position: static;
	}

	.gp-cart-page .gp-cart-xsell__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.gp-cart-page .gp-cart {
		padding: 24px 0 64px;
	}

	.gp-cart-page .gp-cart__head {
		margin-bottom: 20px;
	}

	.gp-cart-page .gp-cart-item {
		grid-template-columns: 76px 1fr;
		gap: 14px;
		padding: 16px 0;
	}

	.gp-cart-page .gp-cart-item__img {
		width: 76px;
	}

	.gp-cart-page .gp-cart-item__name {
		font-size: 16px;
	}

	/* Coupon + update stack full width */
	.gp-cart-page .gp-cart__coupon {
		flex: 1 1 100%;
	}

	.gp-cart-page .gp-cart__update {
		margin-left: 0;
		width: 100%;
	}

	.gp-cart-page .gp-cart-xsell__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
