/* DoD Handlekurv 1.0.1 – dekkogdeler.com */
body.dod-cart {
	--dod-yellow: #fed23b;
	--dod-yellow-h: #e8b917;
	--dod-dark: #181b20;
	--dod-text: #2b2f36;
	--dod-muted: #6b7079;
	--dod-line: #e6e7ea;
	--dod-bg: #f5f6f7;
	--dod-gold: #8a6500;
	--dod-radius: 12px;
}

/* ---------- Full bredde, uten tom sidekolonne ---------- */
body.dod-cart #main-content { background: var(--dod-bg); }
body.dod-cart #sidebar { display: none !important; }
body.dod-cart #main-content .container:before { display: none !important; }
body.dod-cart #left-area { width: 100% !important; padding: 0 !important; float: none !important; }
body.dod-cart #main-content .container { max-width: 1200px; padding-top: 40px; padding-bottom: 64px; }
body.dod-cart .entry-title.main_title,
body.dod-cart article > h1.entry-title { display: none; }
body.dod-cart article.page { margin-bottom: 0; }

/* ---------- Oppsett i to kolonner ---------- */
body.dod-cart .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 28px;
	align-items: start;
	color: var(--dod-text);
}
body.dod-cart .woocommerce > * { grid-column: 1 / -1; min-width: 0; }
body.dod-cart .woocommerce > .woocommerce-cart-form { grid-column: 1; }
body.dod-cart .woocommerce > .cart-collaterals { grid-column: 2; position: sticky; top: 110px; }
body.dod-cart .woocommerce > .woocommerce-notices-wrapper:empty { display: none; }

/* ---------- Topp: tittel + steg ---------- */
.dod-cart-head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px 24px;
}
.dod-cart-head__title { display: flex; align-items: baseline; gap: 12px; }
.dod-cart-head h1 {
	margin: 0; padding: 0; font-size: 34px; line-height: 1.15; font-weight: 800;
	color: var(--dod-dark); letter-spacing: -.01em;
}
.dod-cart-head__count { color: var(--dod-muted); font-size: 15px; }
.dod-steps { display: flex; gap: 6px; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.dod-steps li {
	display: flex; align-items: center; gap: 8px; padding: 0 !important;
	font-size: 14px; color: var(--dod-muted); white-space: nowrap;
}
.dod-steps li + li:before { content: ""; width: 28px; height: 2px; background: var(--dod-line); margin-right: 4px; }
.dod-steps span {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; border-radius: 50%;
	background: #fff; border: 2px solid var(--dod-line); font-weight: 700; font-size: 13px;
}
.dod-steps li.is-active { color: var(--dod-dark); font-weight: 700; }
.dod-steps li.is-active span { background: var(--dod-yellow); border-color: var(--dod-yellow); color: var(--dod-dark); }

/* ---------- Meldinger (grønn = ok, rød = feil) ---------- */
body.dod-cart .woocommerce-message,
body.dod-cart .woocommerce-info,
body.dod-cart .woocommerce-error {
	background: #fff !important; color: var(--dod-text) !important;
	border: 1px solid var(--dod-line) !important; border-left: 4px solid #2e9e5b !important;
	border-radius: 10px !important; padding: 14px 18px !important; margin: 0 0 12px !important;
	font-size: 15px !important; box-shadow: none !important; list-style: none;
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
body.dod-cart .woocommerce-error { border-left-color: #d63638 !important; display: block; }
body.dod-cart .woocommerce-info { border-left-color: var(--dod-yellow) !important; }
body.dod-cart .woocommerce-message:before,
body.dod-cart .woocommerce-info:before,
body.dod-cart .woocommerce-error:before { display: none !important; }
body.dod-cart .woocommerce-message .button {
	order: 2; background: transparent !important; color: var(--dod-gold) !important;
	border: 0 !important; padding: 0 !important; font-size: 14px !important; font-weight: 600;
}
body.dod-cart .woocommerce-message .button:after { display: none !important; }

/* ---------- Info om montering ---------- */
.dod-cart-info {
	display: flex; gap: 12px; align-items: flex-start;
	background: #fff8dc; border: 1px solid #f5e3a1; border-radius: 10px;
	padding: 14px 16px; margin-bottom: 16px;
}
.dod-cart-info svg { flex: 0 0 22px; width: 22px; height: 22px; fill: var(--dod-gold); margin-top: 1px; }
.dod-cart-info p { margin: 0; padding: 0; font-size: 15px; line-height: 1.5; color: var(--dod-text); }

/* ---------- Varelisten ---------- */
body.dod-cart table.shop_table.cart {
	background: #fff; border: 1px solid var(--dod-line) !important; border-radius: var(--dod-radius);
	border-collapse: separate; border-spacing: 0; margin: 0; overflow: hidden; width: 100%;
}
body.dod-cart table.shop_table.cart th,
body.dod-cart table.shop_table.cart td { border: 0 !important; padding: 18px 16px !important; vertical-align: middle; }
body.dod-cart table.shop_table.cart thead th {
	background: #fafafa; font-size: 12px !important; font-weight: 700; text-transform: uppercase;
	letter-spacing: .06em; color: var(--dod-muted); padding-top: 12px !important; padding-bottom: 12px !important;
	border-bottom: 1px solid var(--dod-line) !important;
}
body.dod-cart table.shop_table.cart tr.cart_item td { border-bottom: 1px solid var(--dod-line) !important; }

body.dod-cart td.product-remove { width: 44px; padding-right: 0 !important; }
body.dod-cart td.product-remove a.remove {
	display: inline-flex !important; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%; font-size: 20px !important; line-height: 1;
	color: var(--dod-muted) !important; background: var(--dod-bg); font-weight: 400;
}
body.dod-cart td.product-remove a.remove:hover { background: #fde8e8; color: #d63638 !important; }

body.dod-cart td.product-thumbnail { width: 96px; }
body.dod-cart td.product-thumbnail img {
	width: 72px !important; height: 72px !important; object-fit: contain;
	background: var(--dod-bg); border-radius: 10px; padding: 6px; box-sizing: border-box;
}
body.dod-cart td.product-name { font-size: 16px; line-height: 1.4; }
body.dod-cart td.product-name > a { color: var(--dod-dark) !important; font-weight: 700; text-decoration: none; }
body.dod-cart td.product-name > a:hover { color: var(--dod-gold) !important; }
body.dod-cart td.product-name dl.variation,
body.dod-cart td.product-name .wcpa_cart_meta,
body.dod-cart td.product-name dl { margin: 6px 0 0 !important; font-size: 13px; color: var(--dod-muted); }
body.dod-cart td.product-name dl dt,
body.dod-cart td.product-name dl dd,
body.dod-cart td.product-name dl p { display: inline; margin: 0 !important; padding: 0 !important; }
body.dod-cart td.product-name .backorder_notification { font-size: 13px; color: var(--dod-gold); margin: 6px 0 0; }

body.dod-cart td.product-price { color: var(--dod-muted); white-space: nowrap; }
body.dod-cart td.product-subtotal { font-weight: 700; color: var(--dod-dark); white-space: nowrap; text-align: right; }
body.dod-cart th.product-subtotal { text-align: right; }

body.dod-cart .quantity input.qty {
	width: 64px !important; height: 42px; border: 1px solid var(--dod-line) !important; border-radius: 8px !important;
	background: #fff !important; color: var(--dod-dark) !important; font-weight: 700; font-size: 15px !important;
	text-align: center; padding: 0 4px !important;
}

/* Handlinger (rabattkode / oppdater) */
body.dod-cart table.shop_table.cart td.actions { background: #fafafa; padding: 14px 16px !important; }
body.dod-cart td.actions .coupon { display: flex; gap: 8px; align-items: center; float: none !important; }
body.dod-cart td.actions .coupon input#coupon_code {
	width: 200px !important; height: 42px; border: 1px solid var(--dod-line) !important; border-radius: 8px !important;
	background: #fff !important; padding: 0 12px !important; font-size: 14px !important; color: var(--dod-dark) !important;
}
body.dod-cart td.actions .button,
body.dod-cart .dod-coupon-toggle {
	height: 42px; padding: 0 16px !important; border-radius: 8px !important; font-size: 14px !important; font-weight: 600 !important;
	background: #fff !important; color: var(--dod-dark) !important; border: 1px solid #c9ccd1 !important; line-height: 40px !important;
}
body.dod-cart td.actions .button:after { display: none !important; }
body.dod-cart td.actions .button:hover { border-color: var(--dod-dark) !important; }
body.dod-cart td.actions button[name="update_cart"] { float: right; }
body.dod-cart .dod-coupon-toggle {
	background: none !important; border: 0 !important; padding: 0 !important; color: var(--dod-gold) !important;
	cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
/* Med JS: rabattkode skjult bak lenke, og antall oppdateres automatisk */
body.dod-cart.dod-js td.actions .coupon:not(.is-open) > :not(.dod-coupon-toggle) { display: none !important; }
body.dod-cart.dod-js td.actions .coupon.is-open .dod-coupon-toggle { display: none; }
body.dod-cart.dod-js td.actions button[name="update_cart"] { display: none !important; }
body.dod-cart .woocommerce-cart-form.processing { opacity: .6; transition: opacity .2s; }

/* ---------- Ordresammendrag ---------- */
body.dod-cart .cart-collaterals { width: 100%; }
body.dod-cart .cart-collaterals .cart_totals {
	float: none !important; width: 100% !important;
	background: #fff; border: 1px solid var(--dod-line); border-radius: var(--dod-radius);
	padding: 24px; box-shadow: 0 8px 24px rgba(24, 27, 32, .06);
}
body.dod-cart .cart_totals h2 {
	font-size: 20px !important; font-weight: 800; color: var(--dod-dark); margin: 0 0 12px; padding: 0;
}
body.dod-cart .cart_totals table.shop_table { border: 0 !important; margin: 0 0 4px; width: 100%; }
body.dod-cart .cart_totals table.shop_table tr th,
body.dod-cart .cart_totals table.shop_table tr td {
	border: 0 !important; border-top: 1px solid var(--dod-line) !important;
	padding: 14px 0 !important; background: none !important; font-size: 15px; vertical-align: top;
}
body.dod-cart .cart_totals table.shop_table tr:first-child th,
body.dod-cart .cart_totals table.shop_table tr:first-child td { border-top: 0 !important; }
body.dod-cart .cart_totals th { font-weight: 600; color: var(--dod-muted); width: 40%; }
body.dod-cart .cart_totals td { text-align: right; color: var(--dod-dark); }
body.dod-cart .cart_totals ul#shipping_method { margin: 0 !important; padding: 0 !important; list-style: none; }
body.dod-cart .cart_totals ul#shipping_method li { margin: 0 0 4px !important; padding: 0 !important; text-indent: 0 !important; }
body.dod-cart .cart_totals ul#shipping_method label { font-weight: 600; }
/* Adressen hører hjemme i kassen, ikke i handlekurven */
body.dod-cart .cart_totals .woocommerce-shipping-destination,
body.dod-cart .cart_totals .woocommerce-shipping-calculator { display: none !important; }
body.dod-cart .cart_totals tr.dfc-ship-note td {
	text-align: left; font-size: 13px !important; line-height: 1.5; color: var(--dod-text);
	background: #fff8dc !important; border-radius: 8px; padding: 10px 12px !important; border-top: 0 !important;
}
body.dod-cart .cart_totals tr.order-total th { color: var(--dod-dark); font-size: 17px; font-weight: 800; padding-top: 18px !important; }
body.dod-cart .cart_totals tr.order-total td { padding-top: 16px !important; }
body.dod-cart .cart_totals tr.order-total td strong { font-size: 26px; font-weight: 800; color: var(--dod-dark); }
body.dod-cart .cart_totals tr.order-total small.includes_tax {
	display: block; font-size: 13px; color: var(--dod-muted); font-weight: 400; margin-top: 2px;
}
body.dod-cart .cart_totals tr.order-total small.includes_tax .amount { font-weight: 400; }

/* Knapp: Gå til kassen */
body.dod-cart .wc-proceed-to-checkout { padding: 8px 0 0 !important; }
body.dod-cart .wc-proceed-to-checkout a.checkout-button {
	display: flex !important; align-items: center; justify-content: center; gap: 10px;
	width: 100%; margin: 0 0 16px !important; padding: 18px 20px !important;
	background: var(--dod-yellow) !important; color: var(--dod-dark) !important;
	border: 0 !important; border-radius: 10px !important;
	font-size: 18px !important; font-weight: 800 !important; letter-spacing: .01em; line-height: 1.2 !important;
	box-shadow: 0 2px 0 rgba(0, 0, 0, .08); transition: background .15s, transform .15s;
}
body.dod-cart .wc-proceed-to-checkout a.checkout-button:hover { background: var(--dod-yellow-h) !important; transform: translateY(-1px); }
body.dod-cart .wc-proceed-to-checkout a.checkout-button:after {
	content: "→" !important; font-family: inherit !important; position: static !important;
	opacity: 1 !important; margin: 0 !important; font-size: 20px !important; line-height: 1 !important;
}

/* Trygghetspunkter */
.dod-trust { list-style: none !important; margin: 0 !important; padding: 16px 0 0 !important; border-top: 1px solid var(--dod-line); }
.dod-trust li { display: flex; gap: 10px; align-items: flex-start; padding: 0 !important; margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--dod-text); }
.dod-trust li:last-child { margin-bottom: 0; }
.dod-trust svg { flex: 0 0 18px; width: 18px; height: 18px; fill: var(--dod-gold); margin-top: 1px; }
.dod-trust strong { color: var(--dod-dark); }
.dod-trust a { color: var(--dod-gold); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Tom handlekurv ---------- */
body.dod-cart .woocommerce > .return-to-shop,
body.dod-cart .woocommerce .cart-empty { display: none !important; }
.dod-empty {
	max-width: 620px; margin: 24px auto 0; text-align: center;
	background: #fff; border: 1px solid var(--dod-line); border-radius: 16px; padding: 48px 32px;
}
.dod-empty__icon {
	width: 72px; height: 72px; border-radius: 50%; background: #fff8dc;
	display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.dod-empty__icon svg { width: 34px; height: 34px; fill: var(--dod-gold); }
.dod-empty h1 { font-size: 28px; font-weight: 800; color: var(--dod-dark); margin: 0 0 8px; padding: 0; }
.dod-empty p { font-size: 16px; color: var(--dod-muted); margin: 0 0 24px; padding: 0; }
.dod-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.dod-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 13px 20px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none;
	border: 1px solid #c9ccd1; color: var(--dod-dark) !important; background: #fff;
}
.dod-btn:hover { border-color: var(--dod-dark); }
.dod-btn--primary { background: var(--dod-yellow); border-color: var(--dod-yellow); }
.dod-btn--primary:hover { background: var(--dod-yellow-h); border-color: var(--dod-yellow-h); }

/* ---------- Nettbrett ---------- */
@media (max-width: 1024px) {
	body.dod-cart .woocommerce { grid-template-columns: 1fr; }
	body.dod-cart .woocommerce > .woocommerce-cart-form,
	body.dod-cart .woocommerce > .cart-collaterals { grid-column: 1; position: static; }
	body.dod-cart .cart-collaterals .cart_totals { max-width: 560px; margin-left: auto; }
}

/* ---------- Mobil ---------- */
@media (max-width: 768px) {
	body.dod-cart #main-content .container { padding-top: 20px; width: 92%; }
	.dod-cart-head h1 { font-size: 26px; }
	.dod-steps li { font-size: 12px; }
	.dod-steps li + li:before { width: 12px; }
	.dod-steps span { width: 22px; height: 22px; font-size: 12px; }

	body.dod-cart table.shop_table.cart thead { display: none; }
	body.dod-cart table.shop_table.cart tr.cart_item {
		display: grid !important; grid-template-columns: 72px 1fr auto; grid-template-areas:
			"thumb name remove"
			"thumb qty sub";
		gap: 6px 14px; padding: 16px; border-bottom: 1px solid var(--dod-line); position: relative;
	}
	body.dod-cart table.shop_table.cart tr.cart_item td {
		display: block !important; padding: 0 !important; border: 0 !important; text-align: left !important; background: none !important;
	}
	body.dod-cart table.shop_table.cart tr.cart_item td:before { display: none !important; }
	body.dod-cart td.product-thumbnail { grid-area: thumb; width: auto; display: block !important; }
	body.dod-cart td.product-thumbnail img { width: 72px !important; height: 72px !important; }
	body.dod-cart td.product-name { grid-area: name; font-size: 15px; }
	body.dod-cart td.product-remove { grid-area: remove; width: auto; }
	body.dod-cart td.product-price { display: none !important; }
	body.dod-cart td.product-quantity { grid-area: qty; }
	body.dod-cart td.product-subtotal { grid-area: sub; align-self: center; text-align: right !important; font-size: 16px; }
	body.dod-cart td.actions .coupon { flex-wrap: wrap; }
	body.dod-cart td.actions .coupon input#coupon_code { width: 100% !important; flex: 1; }
	body.dod-cart td.actions button[name="update_cart"] { float: none; width: 100%; margin-top: 8px; }
	body.dod-cart .cart-collaterals .cart_totals { padding: 20px; max-width: none; }
	.dod-empty { padding: 36px 20px; }
	.dod-empty__actions .dod-btn { width: 100%; }
}
