/**
 * HALINK C8 — Cart page (classic + WC Blocks fallback)
 */

/* ---------- Page shell ---------- */
.woocommerce-cart .hl-page--default,
.woocommerce-cart .hl-default-page {
	max-width: none;
	background: transparent;
	box-shadow: none;
	padding: 0;
	border-radius: 0;
}

.woocommerce-cart .hl-default-page__body {
	font-size: inherit;
	line-height: inherit;
}

.woocommerce-cart .hl-default-page__cta {
	display: none;
}

.c7-cart-page {
	color: var(--hl-text, #1a1a1a);
	padding-bottom: 1rem;
}

.c7-cart-page__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
	gap: 1.5rem;
	align-items: start;
}

.c7-shop-card,
.c7-cart-page__main,
.c7-cart-page__summary {
	background: #fff;
	border: 1px solid var(--hl-border, #e4e2dc);
	border-radius: 16px 6px;
	box-shadow: var(--hl-shadow-sm, 0 2px 8px rgba(18, 31, 56, 0.06));
}

.c7-cart-page__main {
	padding: 1.15rem 1.25rem 1.25rem;
}

.c7-cart-page__summary {
	padding: 1.25rem 1.35rem;
	position: sticky;
	top: calc(var(--hl-header-h-sticky, 72px) + 1rem);
}

/* ---------- Cart table ---------- */
.c7-cart-table,
.woocommerce-cart-form table.cart {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	margin: 0;
	background: transparent;
}

.c7-cart-table thead th,
.woocommerce-cart-form table.cart thead th {
	padding: 0.65rem 0.5rem 0.85rem;
	border: 0;
	border-bottom: 1px solid var(--hl-border, #e4e2dc);
	background: transparent !important;
	color: var(--hl-primary, #0f172a) !important;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: left;
}

.c7-cart-table td,
.woocommerce-cart-form table.cart td {
	padding: 1rem 0.5rem;
	border: 0;
	border-bottom: 1px solid var(--hl-border, #e4e2dc);
	background: transparent !important;
	color: var(--hl-text, #1a1a1a) !important;
	vertical-align: middle;
}

.c7-cart-table .product-name a,
.woocommerce-cart-form .product-name a {
	color: var(--hl-primary, #0f172a) !important;
	font-weight: 600;
	text-decoration: none;
}

.c7-cart-table .product-name a:hover,
.woocommerce-cart-form .product-name a:hover {
	color: var(--hl-secondary, var(--hl-primary)) !important;
}

.c7-cart-table .product-price,
.c7-cart-table .product-subtotal,
.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal {
	color: var(--hl-text, #1a1a1a) !important;
	font-weight: 600;
	white-space: nowrap;
}

.c7-cart-table .product-thumbnail img,
.woocommerce-cart-form .product-thumbnail img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px 4px;
	background: var(--hl-bg, #f1f5f9);
}

.c7-cart-table .product-remove a.remove,
.woocommerce-cart-form .product-remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #f3f1ec;
	color: var(--hl-primary, #0f172a) !important;
	font-size: 1.1rem;
	line-height: 1;
	text-decoration: none !important;
}

.c7-cart-table .product-remove a.remove:hover,
.woocommerce-cart-form .product-remove a.remove:hover {
	background: var(--hl-secondary, var(--hl-primary));
	color: #fff !important;
}

.c7-cart-table .quantity .qty,
.woocommerce-cart-form .quantity .qty {
	width: 4rem;
	height: 2.4rem;
	border: 1px solid var(--hl-border, #e4e2dc);
	border-radius: 8px;
	text-align: center;
	color: var(--hl-text, #1a1a1a);
	background: #fff;
}

.c7-cart-actions-row td {
	border-bottom: 0 !important;
	padding-top: 1.15rem !important;
}

.c7-cart-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
}

.c7-cart-coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.c7-cart-coupon .input-text {
	min-width: 180px;
	height: 2.5rem;
	padding: 0 0.9rem;
	border: 1px solid var(--hl-border, #e4e2dc);
	border-radius: var(--hl-radius-cta, 20px 5px);
	color: var(--hl-text, #1a1a1a);
	background: #fff;
}

.c7-cart-coupon .button,
.c7-cart-update.button,
.woocommerce-cart .button {
	background: var(--hl-primary, #0f172a) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: var(--hl-radius-cta, 20px 5px) !important;
	padding: 0.65rem 1.15rem !important;
	font-weight: 600 !important;
}

.c7-cart-coupon .button:hover,
.c7-cart-update.button:hover,
.woocommerce-cart .button:hover {
	background: var(--hl-secondary, var(--hl-primary)) !important;
	color: #fff !important;
}

/* ---------- Totals ---------- */
.c7-cart-totals__title {
	margin: 0 0 1rem;
	font-family: var(--hl-font-display, Lora, Georgia, serif);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--hl-primary, #0f172a) !important;
}

.c7-cart-totals__table,
.c7-cart-totals table {
	width: 100%;
	border: 0;
	margin: 0 0 1.15rem;
}

.c7-cart-totals__table th,
.c7-cart-totals__table td,
.c7-cart-totals table th,
.c7-cart-totals table td {
	padding: 0.75rem 0;
	border: 0;
	border-bottom: 1px solid var(--hl-border, #e4e2dc);
	background: transparent !important;
	color: var(--hl-text, #1a1a1a) !important;
	font-size: 0.95rem;
}

.c7-cart-totals__table th,
.c7-cart-totals table th {
	font-weight: 500;
	text-align: left;
	color: var(--hl-text-muted, #6b6b6b) !important;
}

.c7-cart-totals__table td,
.c7-cart-totals table td {
	text-align: right;
	font-weight: 600;
}

.c7-cart-totals__table .order-total th,
.c7-cart-totals__table .order-total td,
.c7-cart-totals table .order-total th,
.c7-cart-totals table .order-total td {
	border-bottom: 0;
	padding-top: 1rem;
	color: var(--hl-primary, #0f172a) !important;
	font-size: 1.05rem;
	font-weight: 700;
}

.c7-cart-totals__checkout .checkout-button,
.c7-cart-totals__checkout a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.9rem 1.25rem !important;
	border-radius: var(--hl-radius-cta, 20px 5px) !important;
	background: var(--hl-primary, #0f172a) !important;
	color: #fff !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	border: 0 !important;
}

.c7-cart-totals__checkout .checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
	background: var(--hl-secondary, var(--hl-primary)) !important;
	color: #fff !important;
}

/* ---------- Empty cart (C9 shell) ---------- */
.woocommerce-cart .woocommerce-notices-wrapper .cart-empty,
.woocommerce-cart .wc-empty-cart-message {
	display: none !important;
}

.woocommerce-cart .hl-default-page__body:has(.hl-cart-empty) {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.hl-cart-empty {
	display: flex;
	justify-content: center;
	padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.hl-cart-empty__shell {
	position: relative;
	width: min(100%, 40rem);
	margin: 0 auto;
	padding: clamp(2.25rem, 4.5vw, 3.25rem) clamp(1.5rem, 4vw, 2.75rem);
	text-align: center;
	overflow: hidden;
	background:
		radial-gradient(ellipse 70% 55% at 50% 0%, rgba(184, 154, 90, 0.12), transparent 62%),
		linear-gradient(165deg, #fff 0%, #faf6ef 100%);
	border: 1px solid rgba(184, 154, 90, 0.2);
	border-radius: clamp(1.25rem, 2.5vw, 1.75rem);
	box-shadow: 0 18px 48px rgba(47, 59, 40, 0.08);
}

.hl-cart-empty__glow {
	position: absolute;
	width: 12rem;
	height: 12rem;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

.hl-cart-empty__glow--tl {
	top: -4rem;
	left: -3rem;
	background: radial-gradient(circle, rgba(47, 59, 40, 0.07), transparent 70%);
}

.hl-cart-empty__glow--br {
	right: -3.5rem;
	bottom: -4rem;
	background: radial-gradient(circle, rgba(184, 154, 90, 0.14), transparent 70%);
}

.hl-cart-empty__icon-wrap {
	position: relative;
	z-index: 1;
	width: 5.5rem;
	height: 5.5rem;
	margin: 0 auto 1.35rem;
	display: grid;
	place-items: center;
}

.hl-cart-empty__icon-ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(184, 154, 90, 0.12);
	border: 1px solid rgba(184, 154, 90, 0.28);
	box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.65);
}

.hl-cart-empty__icon {
	position: relative;
	z-index: 1;
	width: 2.15rem;
	height: 2.15rem;
	color: var(--hl-gold, #b89a5a);
	animation: hl-cart-empty-float 3.2s ease-in-out infinite;
}

@keyframes hl-cart-empty-float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

.hl-cart-empty__eyebrow {
	position: relative;
	z-index: 1;
	margin: 0 0 0.55rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hl-gold, #b89a5a);
}

.hl-cart-empty__title {
	position: relative;
	z-index: 1;
	margin: 0 0 0.85rem;
	font-family: "Cormorant Garamond", var(--hl-font-display, Lora, Georgia, serif);
	font-size: clamp(1.85rem, 2.5vw, 2.35rem);
	font-weight: 600;
	line-height: 1.15;
	color: var(--hl-primary, #2f3b28);
}

.hl-cart-empty__text {
	position: relative;
	z-index: 1;
	max-width: 26rem;
	margin: 0 auto 1.65rem;
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--hl-muted, #5c6558);
}

.hl-cart-empty__actions {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
}

.hl-cart-empty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 2.75rem;
	padding: 0.7rem 1.35rem;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hl-cart-empty__btn--primary {
	background: var(--hl-primary, #2f3b28);
	color: #fff !important;
	box-shadow: 0 10px 24px rgba(47, 59, 40, 0.18);
}

.hl-cart-empty__btn--primary:hover {
	background: var(--hl-gold, #b89a5a);
	color: var(--hl-primary, #2f3b28) !important;
	transform: translateY(-1px);
}

.hl-cart-empty__btn--ghost {
	background: transparent;
	color: var(--hl-primary, #2f3b28) !important;
	border: 1px solid rgba(47, 59, 40, 0.16);
}

.hl-cart-empty__btn--ghost:hover {
	border-color: rgba(184, 154, 90, 0.55);
	color: var(--hl-gold, #b89a5a) !important;
	background: rgba(184, 154, 90, 0.08);
}

@media (max-width: 575.98px) {
	.hl-cart-empty__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.hl-cart-empty__btn {
		width: 100%;
	}
}

/* Legacy alias */
.c7-cart-empty {
	text-align: center;
	padding: 3rem 1.5rem;
	background: #fff;
	border-radius: 16px 6px;
	border: 1px solid var(--hl-border, #e4e2dc);
}

.c7-cart-empty__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 1rem;
	color: var(--hl-secondary, var(--hl-primary));
}

.c7-cart-empty__icon svg {
	width: 100%;
	height: 100%;
}

.c7-cart-empty__title {
	margin: 0 0 0.5rem;
	font-family: var(--hl-font-display, Lora, Georgia, serif);
	color: var(--hl-primary, #0f172a);
}

.c7-cart-empty__text {
	margin: 0 0 1.25rem;
	color: var(--hl-text-muted, #6b6b6b);
}

.c7-cart-empty .c7-shop-btn,
.c7-cart-empty .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.35rem !important;
	border-radius: var(--hl-radius-cta, 20px 5px) !important;
	background: var(--hl-primary, #0f172a) !important;
	color: #fff !important;
	font-weight: 600 !important;
	text-decoration: none !important;
}

/* ---------- WC Blocks cart (fallback colors) ---------- */
.wp-block-woocommerce-cart,
.wc-block-cart {
	color: var(--hl-text, #1a1a1a) !important;
}

.wc-block-cart table thead,
.wc-block-cart-items__header,
.wc-block-cart-items__header-image,
.wc-block-cart-items__header-product,
.wc-block-cart-items__header-total,
.wc-block-components-product-name,
.wc-block-cart__totals-title,
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value,
.wc-block-components-order-summary-item__individual-prices,
.wc-block-components-product-metadata,
.wc-block-components-product-price,
.wc-block-components-product-badge {
	color: var(--hl-primary, #0f172a) !important;
}

.wc-block-cart-items__header span,
.wc-block-cart-items__header div {
	color: var(--hl-primary, #0f172a) !important;
	opacity: 1 !important;
}

a.wc-block-components-product-name {
	color: var(--hl-secondary, var(--hl-primary)) !important;
}

.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-cart .wc-block-components-button:not(.is-link) {
	background: var(--hl-primary, #0f172a) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: var(--hl-radius-cta, 20px 5px) !important;
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart .wc-block-components-button:not(.is-link):hover {
	background: var(--hl-secondary, var(--hl-primary)) !important;
	color: #fff !important;
}

.wc-block-cart__submit-button .wc-block-components-button__text,
.wc-block-cart .wc-block-components-button__text {
	color: #fff !important;
}

@media (max-width: 991px) {
	.c7-cart-page__layout {
		grid-template-columns: 1fr;
	}

	.c7-cart-page__summary {
		position: static;
	}
}

@media (max-width: 767px) {
	.c7-cart-table thead {
		display: none;
	}

	.c7-cart-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.c7-cart-coupon {
		width: 100%;
	}

	.c7-cart-coupon .input-text {
		flex: 1 1 auto;
		min-width: 0;
	}
}
