/**
 * Gastroline — Norwegian price format + legacy typography
 *
 * Measured from old theme (gastroline/style.css + screenshots):
 *   .woocommerce-Price-amount          → 21px / 700 / #b80000
 *   .product-price del .amount         → 14px / 500 / #898989 + line-through
 *   .ext-text (PDP ekskl. mva)         → 15px / 600 / #7e9cb4
 *   .tax-info-cust (card)              → 700 / #7e9cb4
 *   .shop_table .woocommerce-Price-amount.amount → 16px / 600 / #222
 *   .cart_totals / order Totalt amounts          → 18px / 700 / #111
 *   .cart-cust-box .woocommerce-Price-amount → 12px / white
 *
 * Font stack matches old body: 'Open Sans', Lato, sans-serif
 */

:root {
	--gl-price-font: "Open Sans", Lato, sans-serif;
	--gl-price-red: #b80000;
	--gl-price-was: #898989;
	--gl-price-cart: #222;
	--gl-price-cart-total: #111;
	--gl-price-tax: #7e9cb4;
	--gl-price-size: 2.1rem;       /* 21px */
	--gl-price-size-was: 1.4rem;   /* 14px */
	--gl-price-size-cart: 1.6rem;  /* 16px — cart/checkout line amounts */
	--gl-price-size-cart-total: 1.8rem; /* 18px — Totalt */
	--gl-price-size-tax: 1.5rem;   /* 15px */
}

/* ─── Global product-style amounts (cards, search results, related, widgets) ─ */

.woocommerce-Price-amount,
.woocommerce-Price-amount.amount {
	font-family: var(--gl-price-font);
	font-size: var(--gl-price-size);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: normal;
	color: var(--gl-price-red);
	text-decoration: none;
}

.woocommerce-Price-amount bdi,
.woocommerce-Price-amount .woocommerce-Price-currencySymbol {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

/* Suffix `,-` inherits amount type — never shrink / recolor */
.woocommerce-Price-amount > span {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	letter-spacing: inherit;
}

/* ─── Sale: current (ins) + struck (del) ──────────────────────────────────── */

.price ins,
.product-price ins,
.gl-product-card .product-price ins {
	font-family: var(--gl-price-font);
	font-size: var(--gl-price-size);
	font-weight: 700;
	line-height: 1.25;
	color: var(--gl-price-red);
	text-decoration: none;
}

/* Range en-dash inherits current/sale color & size from parent ins/del */
.price ins,
.product-price ins,
.gl-product-card .product-price .price {
	font-family: var(--gl-price-font);
}

/* ─── Product cards (shop / category / search / home / related / upsells) ─── */

.gl-product-card .product-price,
.gl-product-card .product-price.prd-var,
.gl-product-card .product-price.prd-var2,
.gl-product-card .gl-product-card__price,
.gl-product-card .product-price .price,
.gl-product-card .product-price .price .price {
	font-family: var(--gl-price-font) !important;
	font-size: var(--gl-price-size) !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: normal !important;
}

/*
 * Current / regular amounts ONLY — never target del descendants.
 * `.woocommerce-Price-amount.amount` is specificity 0,4,0 and previously
 * overrode struck-price rules (0,3,1), painting del red at 21px.
 */
.gl-product-card .product-price > .woocommerce-Price-amount,
.gl-product-card .product-price > .woocommerce-Price-amount.amount,
.gl-product-card .product-price ins .woocommerce-Price-amount,
.gl-product-card .product-price ins .woocommerce-Price-amount.amount,
.gl-product-card .product-price ins .amount,
.gl-product-card .product-price ins .woocommerce-Price-amount bdi,
.gl-product-card .product-price .price > .woocommerce-Price-amount,
.gl-product-card .product-price .price > .woocommerce-Price-amount.amount,
.gl-product-card .product-price .custom.price > .woocommerce-Price-amount,
.gl-product-card .product-price .custom.price > .woocommerce-Price-amount.amount {
	font-family: var(--gl-price-font) !important;
	font-size: var(--gl-price-size) !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	color: var(--gl-price-red) !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

/*
 * Struck / was — MUST come after current-price rules and MUST include
 * `.woocommerce-Price-amount.amount` so specificity beats the red amount rule.
 * Also kill WooCommerce `ul.products .price del { opacity: 0.7 }`.
 */
.price del,
.product-price del,
.gl-product-card .product-price del,
.woocommerce ul.products li.product .price del,
.woocommerce ul.products li.product .product-price del,
.woocommerce ul.products li.product .gl-product-card .price del {
	font-family: var(--gl-price-font) !important;
	margin-left: 0 !important;
	color: var(--gl-price-was) !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

.price del .woocommerce-Price-amount,
.price del .woocommerce-Price-amount.amount,
.price del .amount,
.product-price del .woocommerce-Price-amount,
.product-price del .woocommerce-Price-amount.amount,
.product-price del .amount,
.gl-product-card .product-price del .woocommerce-Price-amount,
.gl-product-card .product-price del .woocommerce-Price-amount.amount,
.gl-product-card .product-price del .amount,
.gl-product-card .product-price del bdi,
.gl-product-card .product-price del span,
.woocommerce ul.products li.product .price del .woocommerce-Price-amount,
.woocommerce ul.products li.product .price del .woocommerce-Price-amount.amount {
	font-family: var(--gl-price-font) !important;
	font-size: var(--gl-price-size-was) !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	color: var(--gl-price-was) !important;
	text-decoration: line-through !important;
	opacity: 1 !important;
}

/* Card tax label — old .tax-info-cust (#7e9cb4 / 700) */
.gl-product-card__cta-row .gl-product-card__tax,
.gl-product-card__cta-row .tax-info-cust,
.gl-product-card .tax-info-cust {
	font-family: var(--gl-price-font) !important;
	font-size: 1.2rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	color: var(--gl-price-tax) !important;
	background: transparent !important;
	padding: 0 !important;
	border-radius: 0 !important;
}

/* ─── PDP main + variation price ─────────────────────────────────────────── */

body.gl-sp-reference .gl-sp__buy p.price,
body.gl-sp-reference .gl-sp__buy .woocommerce-variation-price .price,
body.gl-sp-reference .gl-sp__buy .price .woocommerce-Price-amount,
body.gl-sp-reference .gl-sp__buy .price bdi,
body.gl-sp-reference .gl-sp__buy .price ins,
body.gl-sp-reference .gl-sp__buy .price ins .woocommerce-Price-amount,
body.gl-sp-reference .gl-sp__buy .price ins bdi,
body.gl-sp-reference .gl-sp__buy .price > .woocommerce-Price-amount,
body.gl-sp-reference .gl-sp__buy .price > span.woocommerce-Price-amount {
	font-family: var(--gl-price-font) !important;
	font-size: var(--gl-price-size) !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	color: var(--gl-price-red) !important;
}

body.gl-sp-reference .gl-sp__buy .price del,
body.gl-sp-reference .gl-sp__buy .price del .woocommerce-Price-amount,
body.gl-sp-reference .gl-sp__buy .price del span,
body.gl-sp-reference .gl-sp__buy .price del bdi {
	font-family: var(--gl-price-font) !important;
	font-size: var(--gl-price-size-was) !important;
	font-weight: 500 !important;
	color: var(--gl-price-was) !important;
	text-decoration: line-through !important;
}

/* PDP ekskl. mva — old .ext-text */
body.gl-sp-reference .gl-sp__price-tax,
body.gl-sp-reference .gl-sp__buy-card .ext-text {
	font-family: var(--gl-price-font) !important;
	font-size: var(--gl-price-size-tax) !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	letter-spacing: normal !important;
	color: var(--gl-price-tax) !important;
}

/* ─── Cart / checkout table amounts (scoped — not shop/PDP red) ───────────── */

body.gl-cart-page .shop_table .woocommerce-Price-amount.amount,
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_totals .woocommerce-Price-amount,
body.gl-checkout-page table.shop_table .woocommerce-Price-amount.amount,
body.gl-checkout-page table.woocommerce-checkout-review-order-table .woocommerce-Price-amount.amount {
	font-family: var(--gl-price-font) !important;
	font-size: var(--gl-price-size-cart) !important; /* 16px */
	font-weight: 600 !important;
	line-height: 1.35 !important;
	color: var(--gl-price-cart) !important; /* #222 */
}

/* Delsum / tfoot subtotals — same family, slightly heavier presence */
body.gl-cart-page .cart_totals tr.cart-subtotal .woocommerce-Price-amount,
body.gl-checkout-page table.woocommerce-checkout-review-order-table tr.cart-subtotal .woocommerce-Price-amount.amount {
	font-size: 1.7rem !important; /* 17px */
	font-weight: 600 !important;
	color: var(--gl-price-cart) !important;
}

/* Totalt — largest / darkest cart+checkout amount */
body.gl-cart-page .cart_totals tr.order-total .woocommerce-Price-amount,
body.gl-checkout-page table.woocommerce-checkout-review-order-table tr.order-total .woocommerce-Price-amount.amount {
	font-size: var(--gl-price-size-cart-total) !important; /* 18px */
	font-weight: 700 !important;
	color: var(--gl-price-cart-total) !important; /* #111 */
}

body.gl-cart-page .cart_item .product-price,
body.gl-cart-page .cart_item .product-subtotal {
	font-family: var(--gl-price-font);
	font-size: var(--gl-price-size-cart);
	font-weight: 600;
	color: var(--gl-price-cart);
}

/* ─── Mini-cart / widget prices ──────────────────────────────────────────── */

.woocommerce-mini-cart .woocommerce-Price-amount,
.widget_shopping_cart .woocommerce-Price-amount,
.product_list_widget .woocommerce-Price-amount {
	font-family: var(--gl-price-font);
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--gl-price-red);
}

.woocommerce-mini-cart__total .woocommerce-Price-amount,
.widget_shopping_cart .total .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--gl-price-cart);
}

/* ─── Header cart total — old .cart-cust-box .woocommerce-Price-amount ───── */

.hdr-action-btn--cart .hdr-cart__total,
.hdr-action-btn--cart .hdr-cart__total .woocommerce-Price-amount,
.cart-cust-box .woocommerce-Price-amount,
.cart-cust-box .amount {
	font-family: var(--gl-price-font) !important;
	font-size: 1.2rem !important; /* 12px — old header cart */
	font-weight: 700 !important;
	color: #fff !important;
}

/* ─── Search suggest plain-text prices (rendered in JS) ──────────────────── */

.hdr-search-form__price,
.hdr-search-suggest__price,
.gl-search-suggest__price,
[data-gl-suggest-price] {
	font-family: var(--gl-price-font);
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--gl-price-red);
}

/* ─── Account / order views ──────────────────────────────────────────────── */

.gl-view-order__meta-value--total .woocommerce-Price-amount,
.woocommerce-order-details .woocommerce-Price-amount,
.woocommerce-MyAccount-content .woocommerce-Price-amount {
	font-family: var(--gl-price-font);
	font-weight: 700;
	color: var(--gl-price-cart);
}

.gl-dashboard__stat-value .woocommerce-Price-amount {
	font-family: var(--gl-price-font);
	color: var(--gl-price-red);
}

/* ─── Mobile: keep legacy sizes readable, avoid shrinking below old floor ── */

@media (max-width: 480px) {
	.gl-product-card .product-price,
	.gl-product-card .gl-product-card__price,
	.gl-product-card .product-price .price,
	.gl-product-card .product-price ins .woocommerce-Price-amount,
	.gl-product-card .product-price ins .woocommerce-Price-amount.amount {
		font-size: 1.8rem !important; /* 18px floor on narrow cards */
	}

	.gl-product-card .product-price del,
	.gl-product-card .product-price del .woocommerce-Price-amount,
	.gl-product-card .product-price del .woocommerce-Price-amount.amount {
		font-size: 1.3rem !important;
	}
}
