/* =============================================================================
   GASTROLINE — WooCommerce cart page
   Requires: shop-archive-b2b.css (sidebar), header-b2b.css (variables)
   Scoped: body.gl-cart-page
   ============================================================================= */

body.gl-cart-page {
	background: var(--hdr-gray-bg, #f4f6f9);
}

/* Neutralise legacy style.css cart rules inside B2B layout */
body.gl-cart-page .woo-shop-layout {
	font-size: 1rem;
}

body.gl-cart-page .cart_totals {
	margin-top: 0 !important;
}

/* Neutralise legacy style.css (.checkout-button { width:245px; float:right }).
   Do NOT set width:100% on the flex/grid item itself here — that forced
   wrap under flex-wrap. Width fill is scoped to the CTA row cells below. */
body.gl-cart-page .checkout-button {
	float: none !important;
	background-color: var(--hdr-red, #b80000) !important;
}

body.gl-cart-page .woocommerce-cart-form button[name="update_cart"] {
	width: auto !important;
}

body.gl-cart-page .content-area {
	background: transparent !important;
}

body.gl-cart-page .main-special-left {
	display: none !important;
}

body.gl-cart-page .main-special-right,
body.gl-cart-page .main-special-right--full {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

/* Sidebar layout/sticky/accordion: shop-archive-b2b.css (same as category archives) */

body.gl-cart-page #primary,
body.gl-cart-page #main,
body.gl-cart-page .content-area,
body.gl-cart-page .site-main {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

/* ─── Breadcrumb & title ───────────────────────────────────────────────────── */

body.gl-cart-page .gl-cart-page__breadcrumb {
	margin-bottom: clamp(16px, 2.5vw, 24px);
}

body.gl-cart-page .gl-cart-page__breadcrumb .woocommerce-breadcrumb {
	margin: 0 !important;
	font-size: clamp(14px, 1.4vw, 15px);
	font-weight: 500;
	color: var(--hdr-muted, #5d6b7a) !important;
}

body.gl-cart-page .gl-cart-page__breadcrumb .woocommerce-breadcrumb a {
	color: var(--hdr-body, #1a2333) !important;
	text-decoration: none;
}

body.gl-cart-page .gl-cart-page__breadcrumb .woocommerce-breadcrumb a:hover {
	color: var(--hdr-red, #b80000) !important;
	text-decoration: underline;
}

body.gl-cart-page .gl-cart-page__header {
	margin-bottom: clamp(18px, 2.5vw, 26px);
}

body.gl-cart-page .gl-cart-page__title {
	margin: 0;
	font-family: var(--hdr-font, inherit);
	font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.65rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--hdr-navy, #003b6b);
}

body.gl-cart-page .gl-cart-page__inner {
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 3vw, 28px);
	width: 100%;
	max-width: 100%;
	padding-top: 0;
	margin-top: 0;
}

/* ─── Cart form card ───────────────────────────────────────────────────────── */

body.gl-cart-page .gl-cart-page__form-card {
	background: var(--hdr-white, #fff);
	border: 1px solid #d2d4d4;
	border-radius: var(--hdr-radius, 8px);
	box-shadow: none;
	padding: clamp(16px, 2.5vw, 24px);
	/* Allow horizontal scroll as a fallback; never clip TOTAL prices. */
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
}

body.gl-cart-page .woocommerce-cart-form {
	margin: 0;
	min-width: 0;
}

/* Table */
body.gl-cart-page table.shop_table {
	width: 100%;
	min-width: 0;
	border: none !important;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0 !important;
	table-layout: auto;
}

body.gl-cart-page table.shop_table thead {
	background: var(--hdr-gray-bg, #f4f6f9);
}

body.gl-cart-page table.shop_table thead th {
	padding: 12px 10px !important;
	font-family: var(--hdr-font, inherit);
	font-size: clamp(13px, 1.3vw, 14px);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hdr-navy, #003b6b) !important;
	border: none !important;
	border-bottom: 1px solid var(--hdr-gray-brd, #dce2ea) !important;
	text-align: left;
}

body.gl-cart-page table.shop_table thead .product-remove {
	width: 44px;
	min-width: 44px;
	text-align: right !important;
}

/* Remove column sits after Totalt — keep icon flush right */
body.gl-cart-page .cart_item .product-remove {
	width: 44px;
	min-width: 44px;
	text-align: right;
	padding-right: 4px !important;
}

body.gl-cart-page .cart_item .product-remove .remove {
	margin-left: auto;
}

body.gl-cart-page table.shop_table thead .product-thumbnail {
	width: 100px;
	min-width: 100px;
}

body.gl-cart-page table.shop_table thead .product-price,
body.gl-cart-page table.shop_table thead .product-quantity {
	white-space: nowrap;
}

body.gl-cart-page table.shop_table thead .product-subtotal {
	min-width: 7.5rem;
	white-space: nowrap;
}

body.gl-cart-page table.shop_table thead th {
	text-align: left !important;
}

body.gl-cart-page table.shop_table tbody tr.cart_item {
	border-bottom: 1px solid var(--hdr-gray-brd, #dce2ea);
}

body.gl-cart-page table.shop_table tbody tr.cart_item:last-child {
	border-bottom: none;
}

body.gl-cart-page table.shop_table tbody td {
	padding: clamp(12px, 1.5vw, 16px) 10px !important;
	vertical-align: middle !important;
	border: none !important;
	background: transparent !important;
	font-size: clamp(15px, 1.45vw, 16px);
	line-height: 1.45;
	color: var(--hdr-body, #1a2333);
}

/* Keep desktop thumbs readable without crushing the TOTAL column.
   Global img { max-width: 100% } + a collapsing td was shrinking photos. */
body.gl-cart-page .cart_item .product-thumbnail {
	width: 100px;
	min-width: 100px;
}

body.gl-cart-page .cart_item .product-thumbnail a {
	display: block;
	width: 80px;
}

body.gl-cart-page .cart_item .product-thumbnail img {
	display: block;
	width: 80px !important;
	height: 80px !important;
	max-width: none !important;
	min-width: 80px;
	max-height: none;
	object-fit: contain;
	padding: 6px !important;
	box-sizing: border-box;
	background: var(--hdr-white, #fff);
	border: 1px solid var(--hdr-gray-brd, #dce2ea) !important;
	border-radius: var(--hdr-radius, 8px);
}

body.gl-cart-page .cart_item .product-name {
	min-width: 0;
	width: auto;
	word-break: break-word;
	overflow-wrap: anywhere;
}

body.gl-cart-page .cart_item .product-name a {
	font-weight: 600;
	color: var(--hdr-navy, #003b6b);
	text-decoration: none;
}

body.gl-cart-page .cart_item .product-name a:hover {
	color: var(--hdr-red, #b80000);
	text-decoration: underline;
}

body.gl-cart-page .cart_item .product-price,
body.gl-cart-page .cart_item .product-subtotal {
	/* Line unit + subtotal amounts — 16px / 600 / #222 */
	font-family: "Open Sans", Lato, sans-serif;
	font-size: 1.6rem;
	font-weight: 600;
	color: #222;
	white-space: nowrap;
}

body.gl-cart-page .cart_item .product-price .woocommerce-Price-amount,
body.gl-cart-page .cart_item .product-subtotal .woocommerce-Price-amount,
body.gl-cart-page .cart_item .product-price .amount,
body.gl-cart-page .cart_item .product-subtotal .amount {
	font-family: "Open Sans", Lato, sans-serif !important;
	font-size: 1.6rem !important;
	font-weight: 600 !important;
	color: #222 !important;
}

body.gl-cart-page .cart_item .product-subtotal {
	min-width: 7.5rem;
}

/* Remove link — trash icon */
body.gl-cart-page .woocommerce a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	font-size: 0 !important;
	color: transparent !important;
	text-decoration: none !important;
	border-radius: 6px;
	transition: background 0.18s, color 0.18s;
	position: relative;
}

body.gl-cart-page .woocommerce a.remove::before {
	content: '';
	display: block;
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3Crect x='9' y='2' width='6' height='4' rx='1'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	transition: background-image 0.15s;
}

body.gl-cart-page .woocommerce a.remove:hover {
	background: #fce4ec;
}

body.gl-cart-page .woocommerce a.remove:hover::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c62828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3Crect x='9' y='2' width='6' height='4' rx='1'/%3E%3C/svg%3E");
}

/* Quantity */
body.gl-cart-page .cart_item .product-quantity {
	text-align: left;
}

body.gl-cart-page .product-quantity .quantity {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: stretch;
	justify-content: flex-start !important;
	width: auto !important;
	border: 1px solid var(--hdr-gray-brd, #dce2ea);
	border-radius: var(--hdr-radius, 8px);
	overflow: hidden;
	background: var(--hdr-white, #fff);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.gl-cart-page .qty_button.minus,
body.gl-cart-page .qty_button.plus {
	flex: 0 0 30px;
	width: 30px !important;
	min-width: 30px !important;
	height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background: var(--hdr-gray-bg, #f4f6f9) !important;
	color: var(--hdr-navy, #003b6b) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

body.gl-cart-page .qty_button.minus:hover,
body.gl-cart-page .qty_button.plus:hover {
	background: var(--hdr-navy, #003b6b) !important;
	color: var(--hdr-white, #fff) !important;
}

body.gl-cart-page .quantity input.qty {
	flex: 0 0 38px;
	width: 38px !important;
	min-width: 38px !important;
	max-width: 44px !important;
	min-height: 32px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 4px 4px !important;
	border: none !important;
	border-left: 1px solid var(--hdr-gray-brd, #dce2ea) !important;
	border-right: 1px solid var(--hdr-gray-brd, #dce2ea) !important;
	border-radius: 0 !important;
	background: var(--hdr-white, #fff) !important;
	color: var(--hdr-navy, #003b6b) !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	text-align: center;
	box-shadow: none !important;
	appearance: textfield;
	-moz-appearance: textfield;
}

body.gl-cart-page .quantity input.qty::-webkit-outer-spin-button,
body.gl-cart-page .quantity input.qty::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

/* Form footer — continue shopping + update cart */
body.gl-cart-page .gl-cart-form-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin-top: clamp(14px, 2vw, 18px);
	padding-top: clamp(14px, 2vw, 18px);
	border-top: 1px solid var(--hdr-gray-brd, #dce2ea);
}

body.gl-cart-page .gl-cart-form-actions__continue {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--hdr-font, inherit);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	color: var(--hdr-navy, #003b6b) !important;
	transition: color 0.2s ease;
}

body.gl-cart-page .gl-cart-form-actions__continue:hover {
	color: var(--hdr-red, #b80000) !important;
}

body.gl-cart-page .gl-cart-form-actions__continue svg {
	flex-shrink: 0;
}

body.gl-cart-page .gl-cart-form-actions .update-cart-btn {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
	flex-shrink: 0;
}

/* Update cart */
body.gl-cart-page .update-cart-btn {
	display: flex;
	justify-content: flex-end;
	margin-top: clamp(14px, 2vw, 18px);
	padding-top: clamp(14px, 2vw, 18px);
	border-top: 1px solid var(--hdr-gray-brd, #dce2ea);
}

body.gl-cart-page .woocommerce-cart-form .button[name="update_cart"],
body.gl-cart-page .woocommerce-cart-form button[name="update_cart"] {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 48px !important;
	padding: 12px 24px !important;
	width: auto !important;
	max-width: 100%;
	font-family: var(--hdr-font, inherit) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--hdr-white, #fff) !important;
	background: var(--hdr-navy, #003b6b) !important;
	border: 2px solid var(--hdr-navy, #003b6b) !important;
	border-radius: var(--hdr-radius, 8px) !important;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

body.gl-cart-page .woocommerce-cart-form .button[name="update_cart"]:hover,
body.gl-cart-page .woocommerce-cart-form button[name="update_cart"]:hover {
	background: var(--hdr-white, #fff) !important;
	color: var(--hdr-navy, #003b6b) !important;
}

/* Coupon (if present in actions) */
body.gl-cart-page .woocommerce-cart-form .coupon {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
}

body.gl-cart-page .woocommerce-cart-form .coupon label {
	font-weight: 600;
	color: var(--hdr-navy, #003b6b);
}

body.gl-cart-page .woocommerce-cart-form .coupon .input-text {
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--hdr-gray-brd, #dce2ea);
	border-radius: var(--hdr-radius, 8px);
	font-size: 15px;
}

body.gl-cart-page .woocommerce-cart-form .coupon .button {
	min-height: 44px !important;
	padding: 10px 18px !important;
	background: var(--hdr-navy, #003b6b) !important;
	color: #fff !important;
	border-radius: var(--hdr-radius, 8px) !important;
}

/* ─── Summary / totals ─────────────────────────────────────────────────────── */

body.gl-cart-page .gl-cart-page__summary {
	width: 100%;
}

body.gl-cart-page .cart-collaterals {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
	display: flex;
	flex-direction: column;
	gap: 0;
}

body.gl-cart-page .cart-collaterals .cross-sells {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

body.gl-cart-page .cart-collaterals .cross-sells ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin: 0 !important;
}

body.gl-cart-page .cart_totals {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
	background: var(--hdr-white, #fff);
	border: 1px solid #d2d4d4;
	border-radius: var(--hdr-radius, 8px);
	box-shadow: none;
	padding: clamp(18px, 2.5vw, 26px);
	box-sizing: border-box;
}

body.gl-cart-page .cart_totals h2 {
	margin: 0 0 clamp(14px, 2vw, 18px);
	padding-bottom: 12px;
	font-family: var(--hdr-font, inherit);
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
	font-weight: 700;
	text-transform: none;
	letter-spacing: normal;
	color: var(--hdr-navy, #003b6b);
	border-bottom: 1px solid var(--hdr-gray-brd, #dce2ea);
}

body.gl-cart-page .cart_totals table.shop_table {
	margin: 0 !important;
}

body.gl-cart-page .cart_totals table.shop_table {
	display: table !important;
	table-layout: fixed;
	width: 100% !important;
	border-collapse: collapse;
}

body.gl-cart-page .cart_totals table.shop_table tbody {
	display: table-row-group !important;
}

body.gl-cart-page .cart_totals table.shop_table tr {
	display: table-row !important;
}

body.gl-cart-page .cart_totals table.shop_table th,
body.gl-cart-page .cart_totals table.shop_table td {
	display: table-cell !important;
	padding: 12px 0 !important;
	font-size: clamp(15px, 1.45vw, 16px);
	border: none !important;
	border-bottom: 1px solid var(--hdr-gray-brd, #dce2ea) !important;
	background: transparent !important;
	width: auto !important;
	max-width: none !important;
	vertical-align: middle;
}

body.gl-cart-page .cart_totals table.shop_table th {
	font-weight: 600;
	color: var(--hdr-body, #1a2333);
	text-align: left !important;
	width: 55% !important;
}

body.gl-cart-page .cart_totals table.shop_table td {
	text-align: right !important;
	font-weight: 600;
	color: #222;
	width: 45% !important;
	white-space: normal;
	word-break: break-word;
}

body.gl-cart-page .cart_totals table.shop_table td .woocommerce-Price-amount,
body.gl-cart-page .cart_totals table.shop_table td .amount {
	font-family: "Open Sans", Lato, sans-serif !important;
	font-size: 1.7rem !important; /* 17px — Delsum etc. */
	font-weight: 600 !important;
	color: #222 !important;
}

body.gl-cart-page .cart_totals table.shop_table td::before {
	display: none !important;
	content: none !important;
}

body.gl-cart-page .cart_totals tr.order-total th,
body.gl-cart-page .cart_totals tr.order-total td {
	padding-top: 16px !important;
	padding-bottom: 0 !important;
	border-bottom: none !important;
	border-top: 2px solid var(--hdr-gray-brd, #dce2ea) !important;
	font-size: clamp(18px, 1.55vw, 20px) !important;
	font-weight: 700 !important;
	color: #111 !important;
}

body.gl-cart-page .cart_totals tr.order-total td,
body.gl-cart-page .cart_totals tr.order-total td .woocommerce-Price-amount,
body.gl-cart-page .cart_totals tr.order-total td .amount {
	font-size: 1.8rem !important; /* 18px */
	font-weight: 700 !important;
	color: #111 !important;
}

/* Checkout actions — always one horizontal row, equal share of totals card.
   Grid (not flex-wrap): previous flex + width:100%!important on each CTA
   resolved % against the full row and wrapped into two stacked lines. */
body.gl-cart-page .wc-proceed-to-checkout {
	margin-top: clamp(16px, 2.5vw, 22px);
	padding-top: clamp(16px, 2.5vw, 22px);
	border-top: 1px solid var(--hdr-gray-brd, #dce2ea);
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
	width: 100%;
	box-sizing: border-box;
	clear: both;
}

/* Kill WC clearfix pseudo that can disrupt layout */
body.gl-cart-page .wc-proceed-to-checkout::before,
body.gl-cart-page .wc-proceed-to-checkout::after {
	content: none !important;
	display: none !important;
}

/* Grid cells: outline wrapper + red checkout link share the row equally */
body.gl-cart-page .wc-proceed-to-checkout > .checkout_button_extra,
body.gl-cart-page .wc-proceed-to-checkout > .checkout-button,
body.gl-cart-page .wc-proceed-to-checkout > a.checkout-button {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0 !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	clear: none !important;
	box-sizing: border-box;
}

body.gl-cart-page .checkout_button_extra {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0 !important;
	float: none !important;
	clear: none !important;
}

/* Secondary: outline navy “Fortsette å handle” — fills its grid cell */
body.gl-cart-page .button_checkout,
body.gl-cart-page a.button_checkout,
body.gl-cart-page .checkout_button_extra .button_checkout {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 52px !important;
	padding: 14px 10px !important;
	float: none !important;
	font-family: var(--hdr-font, inherit) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.25;
	color: var(--hdr-navy, #003b6b) !important;
	background: var(--hdr-white, #fff) !important;
	border: 2px solid var(--hdr-navy, #003b6b) !important;
	border-radius: var(--hdr-radius, 8px) !important;
	text-decoration: none !important;
	box-sizing: border-box;
	box-shadow: none !important;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.gl-cart-page .button_checkout:hover,
body.gl-cart-page a.button_checkout:hover,
body.gl-cart-page .checkout_button_extra .button_checkout:hover {
	background: var(--hdr-navy, #003b6b) !important;
	color: var(--hdr-white, #fff) !important;
}

/* Primary: solid red “Fortsett til utsjekking” (+ lock via ::before) */
body.gl-cart-page .wc-proceed-to-checkout > .checkout-button,
body.gl-cart-page .wc-proceed-to-checkout > a.checkout-button,
body.gl-cart-page a.checkout-button.button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 52px !important;
	padding: 14px 10px !important;
	float: none !important;
	clear: none;
	font-family: var(--hdr-font, inherit) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	text-align: center;
	line-height: 1.25;
	color: var(--hdr-white, #fff) !important;
	background: var(--hdr-red, #b80000) !important;
	background-color: var(--hdr-red, #b80000) !important;
	border: none !important;
	border-radius: var(--hdr-radius, 8px) !important;
	box-shadow: 0 4px 16px rgba(184, 0, 0, 0.28);
	box-sizing: border-box;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

body.gl-cart-page .wc-proceed-to-checkout > .checkout-button:hover,
body.gl-cart-page .wc-proceed-to-checkout > a.checkout-button:hover,
body.gl-cart-page a.checkout-button.button:hover {
	background: #9a0000 !important;
	background-color: #9a0000 !important;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(184, 0, 0, 0.35);
}

/* Notices on cart */
body.gl-cart-page .woocommerce-notices-wrapper {
	margin-bottom: 16px;
}

/* When no notices are present the wrapper is empty — collapse it so it
   does not push the columns below the sidebar top. */
body.gl-cart-page .woocommerce-notices-wrapper:empty {
	display: none;
	margin: 0;
}

/* Strip any default top margin the WooCommerce shortcode wrapper adds. */
body.gl-cart-page .gl-cart-page__inner > .woocommerce {
	margin-top: 0 !important;
}

body.gl-cart-page .woocommerce-message,
body.gl-cart-page .woocommerce-error,
body.gl-cart-page .woocommerce-info {
	position: relative !important;
	top: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	display: flex !important;
}

body.gl-cart-page .woocommerce-error,
body.gl-cart-page .woocommerce-error li {
	color: #7f1010 !important;
	background: #fff5f5 !important;
	border-left-color: #c62828 !important;
	font-weight: 600;
}

body.gl-cart-page .woocommerce-error a {
	color: #5c0a0a !important;
	text-decoration: underline;
	font-weight: 700;
}

/* Empty cart */
body.gl-cart-page .wc-empty-cart-message,
body.gl-cart-page .return-to-shop {
	text-align: center;
}

body.gl-cart-page .return-to-shop .button {
	display: inline-flex !important;
	min-height: 48px;
	padding: 12px 24px !important;
	background: var(--hdr-navy, #003b6b) !important;
	color: #fff !important;
	border-radius: var(--hdr-radius, 8px) !important;
}

/* ─── Stacked layout: full-width cart table, then full-width Handlekurv TOTAL ─
   Sidebar stays in the shop archive shell (left). Inside .gl-cart-page__columns
   we always stack: form card (table) full width, then summary full width below
   with side-by-side outline + red checkout buttons (old theme double-color).
   Notices from woocommerce_before_cart sit above .gl-cart-page__columns.
   ─────────────────────────────────────────────────────────────────────────── */

body.gl-cart-page .gl-cart-page__columns {
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 3vw, 28px);
	width: 100%;
	max-width: 100%;
}

body.gl-cart-page .gl-cart-page__form-card {
	width: 100%;
	max-width: 100%;
	min-width: 0; /* prevent table from overflowing content area */
}

body.gl-cart-page .gl-cart-page__summary {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

body.gl-cart-page.gl-cart-is-empty .cart-empty {
	margin: 0 0 20px;
}

body.gl-cart-page.gl-cart-is-empty .return-to-shop {
	text-align: left;
}

/* ─── Tablet 768–991px: single-column (sidebar hidden, items + summary stacked) */

@media (min-width: 768px) and (max-width: 991px) {
	body.gl-cart-page .gl-cart-page__form-card {
		padding: 18px;
	}

	body.gl-cart-page table.shop_table thead .product-price,
	body.gl-cart-page table.shop_table thead .product-quantity {
		white-space: nowrap;
	}
}

/* ─── Mobile cart item cards (≤767px) ─────────────────────────────────────────
   Sidecart-style card per line item (CSS grid on <tr>):
     [thumb]  Product name              [trash]
     [thumb]  Pris: 1 234 kr
     [thumb]  Antall: [−][1][+]
     [thumb]  Totalt: 2 468 kr
   Labels and values sit tight (fixed label column + gap) — no space-between
   edge-to-edge stretch. Desktop/tablet table layout is unchanged.
   ─────────────────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	body.gl-cart-page table.shop_table.woocommerce-cart-form__contents,
	body.gl-cart-page table.shop_table.cart {
		display: block;
		width: 100% !important;
		max-width: 100%;
		table-layout: auto;
		border: none;
	}

	body.gl-cart-page table.shop_table.woocommerce-cart-form__contents thead,
	body.gl-cart-page table.shop_table.cart thead {
		display: none;
	}

	body.gl-cart-page table.shop_table.woocommerce-cart-form__contents tbody,
	body.gl-cart-page table.shop_table.cart tbody {
		display: block;
		width: 100%;
	}

	/* One cohesive card per cart line */
	body.gl-cart-page table.shop_table tbody tr.cart_item {
		display: grid;
		grid-template-columns: 72px minmax(0, 1fr) 40px;
		grid-template-areas:
			"thumb name  remove"
			"thumb price price"
			"thumb qty   qty"
			"thumb total total";
		column-gap: 12px;
		row-gap: 8px;
		align-items: start;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		margin: 0 0 12px;
		padding: 14px 12px;
		border: 1px solid var(--hdr-gray-brd, #dce2ea);
		border-radius: var(--hdr-radius, 8px);
		background: var(--hdr-gray-bg, #f4f6f9);
	}

	body.gl-cart-page table.shop_table tbody tr.cart_item:last-child {
		margin-bottom: 0;
	}

	body.gl-cart-page table.shop_table tbody tr.cart_item > td {
		display: block !important;
		width: auto !important;
		max-width: none !important;
		float: none !important;
		clear: none;
		padding: 0 !important;
		margin: 0;
		border: none !important;
		background: transparent !important;
		text-align: left !important;
		box-sizing: border-box;
	}

	/* Kill WC smallscreen float:left / right-align on cells without labels */
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-remove::before,
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-thumbnail::before,
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-name::before {
		float: none !important;
		display: none !important;
		content: none !important;
	}

	body.gl-cart-page .cart_item .product-thumbnail {
		grid-area: thumb;
		width: 72px !important;
		min-width: 72px !important;
		align-self: start;
	}

	body.gl-cart-page .cart_item .product-thumbnail a {
		display: block;
		width: 72px;
	}

	body.gl-cart-page .cart_item .product-thumbnail img {
		width: 72px !important;
		height: 72px !important;
		max-width: none !important;
		min-width: 72px;
		max-height: none;
		object-fit: contain;
		padding: 6px !important;
		box-sizing: border-box;
		background: var(--hdr-white, #fff);
		border-radius: var(--hdr-radius, 8px);
	}

	body.gl-cart-page .cart_item .product-name {
		grid-area: name;
		min-width: 0;
		padding-top: 2px !important;
	}

	/* Name is the card title — no “Produkt:” prefix (handled above) */

	body.gl-cart-page .cart_item .product-name a {
		display: block;
		font-size: 15px;
		font-weight: 700;
		line-height: 1.35;
		color: var(--hdr-navy, #003b6b);
		word-break: break-word;
	}

	body.gl-cart-page .cart_item .product-remove {
		grid-area: remove;
		justify-self: end;
		align-self: start;
		width: 40px !important;
	}

	body.gl-cart-page .cart_item .product-remove .remove {
		width: 40px;
		height: 40px;
	}

	body.gl-cart-page .cart_item .product-price {
		grid-area: price;
	}

	body.gl-cart-page .cart_item .product-quantity {
		grid-area: qty;
	}

	body.gl-cart-page .cart_item .product-subtotal {
		grid-area: total;
	}

	/* Tight meta rows: fixed label + value beside it (no middle gap) */
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-price,
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-quantity,
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-subtotal {
		display: flex !important;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		gap: 8px;
		min-width: 0;
	}

	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-price::before,
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-quantity::before,
	body.gl-cart-page table.shop_table tbody tr.cart_item > td.product-subtotal::before {
		content: attr(data-title) ":";
		display: block !important;
		float: none !important;
		flex: 0 0 4.75rem;
		width: 4.75rem;
		min-width: 4.75rem;
		margin: 0;
		padding: 0;
		font-size: 13px;
		font-weight: 700;
		line-height: 1.3;
		color: var(--hdr-navy, #003b6b);
	}

	body.gl-cart-page .cart_item .product-price .amount,
	body.gl-cart-page .cart_item .product-subtotal .amount,
	body.gl-cart-page .cart_item .product-price .woocommerce-Price-amount,
	body.gl-cart-page .cart_item .product-subtotal .woocommerce-Price-amount {
		font-size: 16px !important;
		font-weight: 600 !important;
		color: #222 !important;
		white-space: nowrap;
	}

	body.gl-cart-page .cart_item .product-subtotal .amount,
	body.gl-cart-page .cart_item .product-subtotal .woocommerce-Price-amount {
		color: #222 !important;
	}

	/* Touch-friendly qty (overrides legacy style.css flex on .product-quantity) */
	body.gl-cart-page .cart_item .product-quantity .quantity {
		display: inline-flex !important;
		flex-direction: row !important;
		align-items: stretch;
		justify-content: flex-start !important;
		width: auto !important;
		margin: 0 !important;
	}

	body.gl-cart-page .cart_item .qty_button.minus,
	body.gl-cart-page .cart_item .qty_button.plus {
		flex: 0 0 40px;
		width: 40px !important;
		min-width: 40px !important;
		height: 40px !important;
		font-size: 18px !important;
	}

	body.gl-cart-page .cart_item .quantity input.qty {
		flex: 0 0 44px;
		width: 44px !important;
		min-width: 44px !important;
		max-width: 52px !important;
		min-height: 40px !important;
		height: 40px !important;
		font-size: 15px !important;
	}

	body.gl-cart-page .gl-cart-form-actions {
		flex-direction: column;
		align-items: stretch;
	}

	body.gl-cart-page .gl-cart-form-actions__continue {
		justify-content: center;
	}

	body.gl-cart-page .gl-cart-form-actions .update-cart-btn,
	body.gl-cart-page .update-cart-btn {
		justify-content: stretch;
	}

	body.gl-cart-page .woocommerce-cart-form .button[name="update_cart"],
	body.gl-cart-page .woocommerce-cart-form button[name="update_cart"] {
		width: 100% !important;
	}

	body.gl-cart-page .woocommerce-cart-form .coupon {
		flex-direction: column;
		align-items: stretch;
	}

	body.gl-cart-page .woocommerce-cart-form .coupon .input-text,
	body.gl-cart-page .woocommerce-cart-form .coupon .button {
		width: 100%;
	}

	/* Order summary stays a real 2-col table */
	body.gl-cart-page .cart_totals table.shop_table {
		table-layout: auto;
	}

	body.gl-cart-page .cart_totals table.shop_table tbody tr {
		display: table-row !important;
	}

	body.gl-cart-page .cart_totals table.shop_table th,
	body.gl-cart-page .cart_totals table.shop_table td {
		display: table-cell !important;
		width: auto !important;
		padding: 8px 0 !important;
	}

	body.gl-cart-page .cart_totals table.shop_table th {
		width: 50% !important;
	}

	body.gl-cart-page .cart_totals table.shop_table td {
		width: 50% !important;
		text-align: right !important;
	}

	/* Keep CTAs side-by-side on mobile; tighten type so long NO labels fit */
	body.gl-cart-page .wc-proceed-to-checkout {
		gap: 8px;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
	}

	body.gl-cart-page .button_checkout,
	body.gl-cart-page a.button_checkout,
	body.gl-cart-page .checkout_button_extra .button_checkout,
	body.gl-cart-page .wc-proceed-to-checkout > .checkout-button,
	body.gl-cart-page .wc-proceed-to-checkout > a.checkout-button,
	body.gl-cart-page a.checkout-button.button {
		min-height: 48px !important;
		padding: 10px 6px !important;
		font-size: 11px !important;
		letter-spacing: 0.02em;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.gl-cart-page .wc-proceed-to-checkout > .checkout-button:hover,
	body.gl-cart-page .wc-proceed-to-checkout > a.checkout-button:hover,
	body.gl-cart-page a.checkout-button.button:hover {
		transform: none;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   CART PAGE — UI POLISH ADDITIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Checkout button — lock icon ─────────────────────────────────────────── */
body.gl-cart-page .checkout-button::before,
body.gl-cart-page a.checkout-button.button::before {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	margin-right: 8px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

/* ─── Product variation / meta text in cart row ────────────────────────────
 * Colon comes from cart-item-data.php (<dt>Label:</dt>) — do NOT add via ::after
 * (that caused Label::). Stack each attribute as its own clear row.
 */
body.gl-cart-page .cart_item .product-name .variation {
	display: block;
	margin: 4px 0 0;
	padding: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--hdr-muted, #5d6b7a);
	overflow: hidden;
}

body.gl-cart-page .cart_item .product-name .variation dt {
	float: left;
	clear: both;
	margin: 0 0.35em 0.1em 0;
	padding: 0;
	font-weight: 600;
}

body.gl-cart-page .cart_item .product-name .variation dd {
	display: block;
	margin: 0 0 0.1em;
	padding: 0;
	font-weight: 500;
}

body.gl-cart-page .cart_item .product-name .variation p {
	display: inline;
	margin: 0;
}

/* ─── Quantity input — focus ring ────────────────────────────────────────── */
body.gl-cart-page .product-quantity .quantity:focus-within {
	border-color: var(--hdr-red, #b80000) !important;
	box-shadow: 0 0 0 3px rgba(184, 0, 0, 0.1);
}

/* ─── Cart item image — hover zoom ──────────────────────────────────────── */
body.gl-cart-page .cart_item .product-thumbnail img {
	transition: transform 0.25s ease;
}

body.gl-cart-page .cart_item .product-thumbnail a:hover img {
	transform: scale(1.05);
}

/* ─── Coupon — pill-shaped input ─────────────────────────────────────────── */
body.gl-cart-page .woocommerce-cart-form .coupon {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

body.gl-cart-page .woocommerce-cart-form .coupon .input-text {
	flex: 1 1 160px;
	border-radius: 22px !important;
	padding-left: 18px !important;
	padding-right: 18px !important;
}

body.gl-cart-page .woocommerce-cart-form .coupon .button {
	flex-shrink: 0;
	border-radius: 22px !important;
	background: var(--hdr-red, #b80000) !important;
	color: #fff !important;
}

body.gl-cart-page .woocommerce-cart-form .coupon .button:hover {
	background: #9a0000 !important;
}

/* ─── Empty cart — centred card ──────────────────────────────────────────── */
body.gl-cart-page .wc-empty-cart-message {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(48px, 8vw, 80px) 24px;
	text-align: center;
	background: var(--hdr-white, #fff);
	border-radius: max(var(--hdr-radius, 8px), 12px);
	border: 1px solid var(--hdr-border, #e2e6ea);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.gl-cart-page .wc-empty-cart-message::before {
	content: '';
	display: block;
	width: 72px;
	height: 72px;
	margin-bottom: 20px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9d0da' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0.6;
}

body.gl-cart-page .wc-empty-cart-message p {
	font-size: clamp(1.1rem, 1.5vw, 1.25rem);
	font-weight: 700;
	color: var(--hdr-navy, #003b6b);
	margin: 0 0 8px;
}

body.gl-cart-page .return-to-shop {
	margin-top: 20px;
}

body.gl-cart-page .return-to-shop .wc-backward,
body.gl-cart-page .return-to-shop a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	background: transparent;
	border: 2px solid var(--hdr-navy, #003b6b) !important;
	border-radius: var(--hdr-radius, 8px);
	color: var(--hdr-navy, #003b6b) !important;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none !important;
	transition: background 0.2s ease, color 0.2s ease;
}

body.gl-cart-page .return-to-shop .wc-backward:hover,
body.gl-cart-page .return-to-shop a:hover {
	background: var(--hdr-navy, #003b6b) !important;
	color: #fff !important;
}

/* ─── Legacy style.css overrides (quantity, remove, buttons) ─────────────── */
body.gl-cart-page .woocommerce-cart-form button,
body.gl-cart-page .woocommerce-cart-form .button {
	width: auto !important;
	height: auto !important;
}

body.gl-cart-page .product-quantity .quantity {
	display: inline-flex !important;
	justify-content: flex-start !important;
	width: auto !important;
}

body.gl-cart-page .qty_button.minus,
body.gl-cart-page .qty_button.plus {
	border-radius: 0 !important;
	width: 30px !important;
	min-width: 30px !important;
	height: 32px !important;
	font-size: 16px !important;
	background: var(--hdr-gray-bg, #f4f6f9) !important;
	color: var(--hdr-navy, #003b6b) !important;
}

body.gl-cart-page .quantity input.qty {
	border-radius: 0 !important;
	background: var(--hdr-white, #fff) !important;
	color: var(--hdr-navy, #003b6b) !important;
	margin: 0 !important;
	width: 38px !important;
}

body.gl-cart-page .woocommerce a.remove {
	font-size: 0 !important;
	color: transparent !important;
}

body.gl-cart-page .woocommerce a.remove:hover {
	background: #fce4ec !important;
}

body.gl-cart-page .woocommerce table.shop_table th {
	text-align: left !important;
}

body.gl-cart-page .cart_totals td {
	width: auto !important;
}

/* ─── Update cart button — outline style ─────────────────────────────────── */
body.gl-cart-page .woocommerce-cart-form .button[name="update_cart"],
body.gl-cart-page .woocommerce-cart-form button[name="update_cart"] {
	background: transparent !important;
	color: var(--hdr-navy, #003b6b) !important;
	border: 2px solid var(--hdr-navy, #003b6b) !important;
	box-shadow: none !important;
}

body.gl-cart-page .woocommerce-cart-form .button[name="update_cart"]:hover,
body.gl-cart-page .woocommerce-cart-form button[name="update_cart"]:hover {
	background: var(--hdr-navy, #003b6b) !important;
	color: #fff !important;
}
