/*
 * kurv.css — kurv-siden i KOOKAÏs opbygning.
 *
 * Hver vare er én række: billede, titel med variant og stykpris, antal med
 * − og +, linjetotal og "Remove". Ingen kolonneoverskrifter, ingen streger
 * mellem varerne — kun én linje over subtotalen.
 *
 * Markuppen er stadig WooCommerces tabel. Den skal blive, fordi cart.js
 * finder felterne, fjern-linkene og opdateringsknappen i den. Tabellen gøres
 * til blokke, og hver række til et grid.
 *
 * Specificitet: tre lag regler på tabellen skal slås — WooCommerces
 * .woocommerce table.shop_table td (0,2,2), Hellos
 * table tbody > tr:nth-child(odd) > td (0,1,4) og Elementor-kittets links
 * og overskrifter (0,1,1). Alle regler herunder starter derfor med
 * .woocommerce-cart .woocommerce og lander på mindst (0,4,1).
 */

.woocommerce-cart .site-main {
	max-width: 1040px;
	margin: 0 auto;
	padding: 56px var(--fst-gutter) 96px;
}

/* Kittets Urbanist, fed og understregning på links — her arver de sidens Jost. */
body.woocommerce-cart .woocommerce a {
	font-family: inherit;
	font-weight: inherit;
	text-decoration: none;
}

/* --------------------------------------------------------------- Hoved --- */

.woocommerce-cart .fst-kurv__hoved {
	text-align: center;
	margin: 0 0 16px;
}

/*
 * To klasser. Med én klasse tabte størrelsen til kittets .elementor-kit-XXX h1
 * på 70px, og "SHOPPING BAG" fyldte halvdelen af skærmen.
 */
.woocommerce-cart .fst-kurv__hoved .fst-kurv__titel {
	margin: 0 0 8px;
	font-family: var(--fst-font-ui);
	font-size: 20px;
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: var(--fst-track);
	text-transform: uppercase;
	color: var(--fst-ink);
}

.woocommerce-cart .fst-kurv__hoved .fst-kurv__antal {
	margin: 0;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: var(--fst-track);
	text-transform: uppercase;
	color: var(--fst-ink);
}

.woocommerce-cart .woocommerce-cart-form .fst-fragtmaaler {
	max-width: 720px;
	margin: 0 auto 40px;
}

/* ------------------------------------------------------------ Varerne --- */

.woocommerce-cart .woocommerce table.shop_table.cart,
.woocommerce-cart .woocommerce table.shop_table.cart tbody {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.woocommerce-cart .woocommerce table.shop_table.cart thead {
	display: none;
}

/*
 * Rækken som grid.
 *
 * Antal, total og "Remove" står på linje med stykprisen, ikke med titlen —
 * præcis som hos KOOKAÏ. Billedet spænder over hele rækkens højde.
 */
.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr) auto 110px 90px;
	grid-template-rows: auto auto 1fr;
	grid-template-areas:
		'billede navn  .     .     .'
		'billede pris  antal total fjern'
		'billede .     .     .     .';
	column-gap: 32px;
	padding: 0 0 32px;
	border: 0;
	background: none;
}

.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	vertical-align: top;
}

.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td::before {
	display: none;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-thumbnail {
	grid-area: billede;
	width: auto;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-thumbnail a {
	display: block;
	line-height: 0;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-thumbnail img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	background: var(--fst-bone);
	border-radius: 0;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-name {
	grid-area: navn;
	padding-top: 28px;
}

.woocommerce-cart .woocommerce table.shop_table.cart .fst-kurv__navn {
	display: block;
	margin: 0 0 6px;
	font-family: var(--fst-font-ui);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: var(--fst-track);
	text-transform: uppercase;
	color: var(--fst-ink);
}

.woocommerce-cart .woocommerce table.shop_table.cart .fst-kurv__variant {
	display: block;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: var(--fst-track);
	text-transform: uppercase;
	color: var(--fst-ink);
}

/*
 * WooCommerces egen variantliste ("Længde: xs") skjules — varianterne står
 * allerede på én linje under titlen, se fst_kurv_navn().
 */
.woocommerce-cart .woocommerce table.shop_table.cart td.product-name dl.variation {
	display: none;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-name .backorder_notification {
	margin: 6px 0 0;
	font-size: 11px;
	color: var(--fst-stone);
}

/* Stykprisen under varianten. */
.woocommerce-cart .woocommerce table.shop_table.cart td.product-price {
	grid-area: pris;
	align-self: center;
	margin-top: 18px;
	font-size: 12px;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-quantity {
	grid-area: antal;
	align-self: center;
	margin-top: 18px;
	width: auto;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-subtotal {
	grid-area: total;
	align-self: center;
	margin-top: 18px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-align: right;
	white-space: nowrap;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-remove {
	grid-area: fjern;
	align-self: center;
	margin-top: 18px;
	width: auto;
	text-align: right;
}

.woocommerce-cart .woocommerce table.shop_table.cart .price del,
.woocommerce-cart .woocommerce table.shop_table.cart td del {
	margin-right: 6px;
	color: var(--fst-stone);
}

.woocommerce-cart .woocommerce table.shop_table.cart ins {
	background: none;
	color: var(--fst-signal);
	text-decoration: none;
}

/*
 * "Remove".
 *
 * WooCommerces .remove er en rund rød knap med et × og farve og baggrund sat
 * med høj specificitet. Ordet er nu selve indholdet (fst_kurv_fjern_link),
 * så her er det kun formen der skal væk.
 */
.woocommerce-cart .woocommerce table.shop_table.cart td.product-remove a.remove,
.woocommerce-cart .woocommerce table.shop_table.cart td.product-remove a.remove:hover {
	display: inline;
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	border-radius: 0;
	font-family: var(--fst-font-ui);
	font-size: 10px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: var(--fst-track);
	text-transform: uppercase;

	/*
	 * !important på farve og baggrund — og kun her.
	 *
	 * WooCommerce sætter .woocommerce a.remove { color: rød !important } og
	 * en rød baggrund med hvid tekst på hover, også med !important. En
	 * !important-regel kan kun slås af en anden, uanset specificitet —
	 * "Remove" stod rød, selv med fem klasser i selektoren.
	 */
	color: var(--fst-stone) !important;
	background: none !important;
}

.woocommerce-cart .woocommerce table.shop_table.cart td.product-remove a.remove:hover {
	color: var(--fst-ink) !important;
	opacity: 1;
}

/* ------------------------------------------- Antal: − 1 +, som i skuffen */

.woocommerce-cart .woocommerce table.shop_table.cart .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--fst-ash);
}

/* Talfeltet: ingen ramme og ingen browser-pile — knapperne klarer det. */
.woocommerce-cart .woocommerce table.shop_table.cart .quantity input.qty {
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-family: var(--fst-font-ui);
	font-size: 13px;
	font-weight: 400;
	text-align: center;
	color: var(--fst-ink);
	-moz-appearance: textfield;
	appearance: textfield;
}

.woocommerce-cart .woocommerce table.shop_table.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart .woocommerce table.shop_table.cart .quantity input.qty::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.woocommerce-cart .woocommerce table.shop_table.cart .quantity input.qty:focus {
	outline: none;
	box-shadow: inset 0 -1px 0 var(--fst-ink);
}

/*
 * Plus og minus. Tre klasser og alle tilstande gentaget — kittet gør ellers
 * alle knapper sorte med padding og afrundede hjørner.
 */
.woocommerce-cart .woocommerce .quantity .fst-antal__knap,
.woocommerce-cart .woocommerce .quantity .fst-antal__knap:hover,
.woocommerce-cart .woocommerce .quantity .fst-antal__knap:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	background-color: transparent;
	box-shadow: none;
	font-family: var(--fst-font-ui);
	font-size: 15px;
	font-weight: 300;
	line-height: 1;
	color: var(--fst-ink);
	cursor: pointer;
}

.woocommerce-cart .woocommerce .quantity .fst-antal__knap:hover {
	opacity: 0.55;
}

/*
 * Opdater-knappen og rabatkoden.
 *
 * Rabatkoden hører til i kassen, ikke her. Opdater-knappen skal stadig
 * findes — kurv.js trykker på den for kunden — men kunden skal aldrig se
 * den. Rækken skjules hel; knappen virker fint selv om den ikke vises
 * (afprøvet på sitet: kurven opdateres via AJAX uden genindlæsning).
 */
.woocommerce-cart .woocommerce table.shop_table.cart td.actions,
.woocommerce-cart .woocommerce table.shop_table.cart tr:has(> td.actions) {
	display: none;
}

/* ------------------------------------------------------------ Totaler --- */

/* Én linje over subtotalen — den eneste i kurven. */
.woocommerce-cart .woocommerce .cart-collaterals {
	width: 100%;
	margin: 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--fst-ash);
}

.woocommerce-cart .woocommerce .cart-collaterals::before,
.woocommerce-cart .woocommerce .cart-collaterals::after {
	display: none;
}

.woocommerce-cart .woocommerce .cart-collaterals .cart_totals {
	float: none;
	width: 100%;
	max-width: 480px;
	margin: 0 0 0 auto;
}

.woocommerce-cart .woocommerce .cart-collaterals .cart_totals > h2 {
	display: none;
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	border-radius: 0;
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table th,
.woocommerce-cart .woocommerce .cart_totals table.shop_table td {
	padding: 8px 0;
	border: 0;
	background: none;
	vertical-align: top;
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table th {
	width: 40%;
	font-family: var(--fst-font-ui);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: var(--fst-track);
	text-transform: uppercase;
	text-align: left;
	color: var(--fst-ink);
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table td {
	font-size: 13px;
	text-align: right;
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table td::before {
	display: none;
}

.woocommerce-cart .woocommerce .cart_totals .order-total th,
.woocommerce-cart .woocommerce .cart_totals .order-total td {
	padding-top: 16px;
	font-size: 15px;
}

.woocommerce-cart .woocommerce .cart_totals .order-total td strong {
	font-weight: 500;
}

.woocommerce-cart .woocommerce .cart_totals .includes_tax {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	font-weight: 300;
	color: var(--fst-stone);
}

/* Fragtlinjen: metoden i én linje, forklaringen lille og grå. */
.woocommerce-cart .woocommerce .cart_totals #shipping_method {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-cart .woocommerce .cart_totals #shipping_method li,
.woocommerce-cart .woocommerce .cart_totals #shipping_method label {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

.woocommerce-cart .woocommerce .cart_totals .woocommerce-shipping-destination,
.woocommerce-cart .woocommerce .cart_totals .woocommerce-shipping-totals p {
	margin: 4px 0 0;
	font-size: 11px;
	font-weight: 300;
	line-height: 1.5;
	color: var(--fst-stone);
}

.woocommerce-cart .woocommerce .wc-proceed-to-checkout {
	padding: 20px 0 0;
}

.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button,
.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
	display: block;
	width: 100%;
	margin: 0 0 12px;
	padding: 20px 32px;
	border-radius: 0;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
}

/* --------------------------------------------------------------- Mobil --- */

/*
 * WooCommerces mobil-stylesheet gør kurven til en liste med etiketter
 * ("Price: 99,00 €") og skjuler billederne. Etiketterne er skjult ovenfor;
 * billedet og venstrestillingen skal tilbage her.
 *
 * !important på text-align: woocommerce-smallscreen.css sætter
 * text-align: right !important på alle celler, og en !important-regel
 * kan kun slås af en anden.
 */
@media (max-width: 767px) {
	.woocommerce-cart .site-main {
		padding: 40px var(--fst-gutter) 64px;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item {
		grid-template-columns: 96px minmax(0, 1fr) auto;
		grid-template-rows: auto auto auto 1fr;
		grid-template-areas:
			'billede navn  fjern'
			'billede pris  pris'
			'billede antal total'
			'billede .     .';
		column-gap: 16px;
		padding-bottom: 24px;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td {
		text-align: left !important;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart td.product-thumbnail {
		display: block;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart td.product-name {
		padding-top: 0;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart td.product-remove {
		align-self: start;
		margin-top: 2px;
		text-align: right !important;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart td.product-price {
		margin-top: 8px;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart td.product-quantity {
		margin-top: 16px;
	}

	.woocommerce-cart .woocommerce table.shop_table.cart td.product-subtotal {
		margin-top: 16px;
		text-align: right !important;
	}

	.woocommerce-cart .woocommerce .cart-collaterals .cart_totals {
		max-width: none;
	}
}
