/**
 * DanGoods Sales – kundeportal (3.3-inspireret)
 */
:root {
	--dg-blue: #1f6feb;
	--dg-cyan: #2bb7ff;
	--dg-nav: #0d1b2a;
	--dg-text: #102033;
	--dg-muted: #667085;
	--dg-line: #d8e4ef;
}

.dg-portal {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	color: var(--dg-text);
	max-width: 1320px;
	margin: 0 auto;
	padding: 20px 16px 40px;
}

.dg-portal-hero {
	background: linear-gradient(135deg, #0d1b2a, #1f6feb 60%, #2bb7ff);
	color: #fff;
	border-radius: 24px;
	padding: 28px;
	margin-bottom: 22px;
	box-shadow: 0 16px 40px rgba(31, 111, 235, 0.22);
}
.dg-portal-hero h1 { margin: 0 0 6px; font-size: 28px; color: #fff; }
.dg-portal-hero p { margin: 0; color: #eaf6ff; }

.dg-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
	margin: 20px 0;
}
.dg-catalog-heading,
.dg-catalog-controls,
.dg-catalog-view-switch,
.dg-portal-order-layout {
	display: flex;
}
.dg-catalog-heading {
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 18px;
}
.dg-catalog-heading h2 { margin-bottom: 4px; }
.dg-catalog-heading .dg-muted { margin: 0; }
.dg-catalog-cart-summary {
	background: #eef6ff;
	border: 1px solid #c6e0ff;
	border-radius: 999px;
	color: #0b559c !important;
	font-size: 13px;
	font-weight: 800;
	padding: 9px 13px;
	text-decoration: none;
	white-space: nowrap;
}
.dg-catalog-cart-summary.has-items { background: #dceeff; border-color: #86bfff; }
.dg-catalog-controls {
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
}
.dg-catalog-search-wrap { flex: 1 1 260px; }
.dg-catalog-search,
.dg-catalog-category {
	box-sizing: border-box;
	border: 1px solid var(--dg-line);
	border-radius: 10px;
	color: var(--dg-text);
	font: inherit;
	min-height: 42px;
	padding: 9px 12px;
	width: 100%;
}
.dg-catalog-category-wrap { flex: 0 1 210px; }
.dg-catalog-view-switch {
	background: #f3f7fb;
	border: 1px solid var(--dg-line);
	border-radius: 10px;
	overflow: hidden;
}
.dg-catalog-view {
	background: transparent;
	border: 0;
	color: var(--dg-muted);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	padding: 11px 12px;
}
.dg-catalog-view.is-active { background: var(--dg-blue); color: #fff; }
.dg-catalog-toast {
	color: #0c6c39;
	font-size: 13px;
	font-weight: 800;
	margin: 10px 0 0;
	min-height: 0;
	opacity: 0;
	transition: opacity 160ms ease;
}
.dg-catalog-toast.is-visible { opacity: 1; }
.dg-catalog-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin-top: 18px;
}
.dg-catalog-page {
	background: #fff;
	border: 1px solid var(--dg-line);
	border-radius: 8px;
	color: var(--dg-text);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	min-width: 36px;
	padding: 8px 10px;
}
.dg-catalog-page.is-active { background: var(--dg-blue); border-color: var(--dg-blue); color: #fff; }
.dg-catalog-no-results { color: var(--dg-muted); margin: 22px 0 0; text-align: center; }
.dg-product-card {
	background: #fff;
	border: 1px solid var(--dg-line);
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
	display: flex;
	flex-direction: column;
}
.dg-product-card.is-in-order { border-color: #75b9ff; box-shadow: 0 10px 24px rgba(31, 111, 235, 0.16); }
.dg-product-card img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 12px;
	margin-bottom: 10px;
}
.dg-product-card h3 { margin: 0 0 6px; font-size: 16px; }
.dg-product-card .dg-price {
	font-weight: 800;
	font-size: 18px;
	color: var(--dg-blue);
	margin: 6px 0;
}
.dg-product-discount { color: #16733d; font-size: 13px; font-weight: 800; margin: 5px 0; }
.dg-product-categories { color: #0b559c; font-size: 12px; font-weight: 800; margin: 1px 0 6px; }
.dg-product-card .dg-stock { font-size: 13px; color: var(--dg-muted); flex: 1; }
.dg-product-card button,
.dg-portal .button,
.dg-portal button.dg-btn-primary {
	margin-top: 10px;
	background: var(--dg-blue);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 10px 14px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
}
.dg-product-card button:hover { filter: brightness(0.95); }
.dg-product-card.is-in-order button { background: #0c8b4d; }

.dg-product-grid.dg-product-list { display: block; margin-top: 20px; }
.dg-product-grid.dg-product-list .dg-product-card {
	align-items: center;
	border-radius: 12px;
	column-gap: 16px;
	display: grid;
	grid-template-columns: minmax(170px, 1.6fr) minmax(90px, .7fr) minmax(115px, .8fr) minmax(130px, 1fr) minmax(135px, 1fr) 150px;
	margin: 8px 0;
	padding: 13px 16px;
}
.dg-product-grid.dg-product-list .dg-product-card img { display: none; }
.dg-product-grid.dg-product-list .dg-product-card h3,
.dg-product-grid.dg-product-list .dg-product-card p { margin: 0; }
.dg-product-grid.dg-product-list .dg-product-card .dg-price { font-size: 16px; }
.dg-product-grid.dg-product-list .dg-product-card .dg-stock,
.dg-product-grid.dg-product-list .dg-product-card .dg-product-discount,
.dg-product-grid.dg-product-list .dg-product-card .dg-muted { display: none; }
.dg-product-grid.dg-product-list .dg-product-card button { margin: 0; }

.dg-order-form, .dg-my-orders, .dg-catalog {
	background: #fff;
	border: 1px solid var(--dg-line);
	border-radius: 20px;
	padding: 20px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
	margin-bottom: 20px;
}
.dg-portal-order-layout {
	align-items: flex-start;
	gap: 22px;
}
.dg-portal-catalog-column { flex: 1 1 auto; min-width: 0; }
.dg-portal-order-column { flex: 0 0 380px; min-width: 0; }
.dg-portal-order-column .dg-order-form { margin-bottom: 0; position: sticky; top: 22px; }
.dg-order-item-count { color: var(--dg-muted); font-size: 14px; font-weight: 700; white-space: nowrap; }
.dg-order-form h2, .dg-my-orders h2, .dg-catalog h2 {
	margin: 0 0 14px;
	font-size: 22px;
}
.dg-table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0;
}
.dg-table th, .dg-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--dg-line);
	text-align: left;
	font-size: 14px;
}
.dg-table th { color: var(--dg-muted); }
.dg-pallet-visual { margin: 12px 0; }
.dg-portal-login {
	text-align: center;
	padding: 40px 20px;
	background: #f1f7ff;
	border-radius: 16px;
	border: 1px solid #cfe3ff;
}
.dg-portal-login a {
	display: inline-block;
	margin-top: 12px;
	background: var(--dg-blue);
	color: #fff !important;
	text-decoration: none;
	padding: 12px 20px;
	border-radius: 12px;
	font-weight: 800;
}
#dg-order-lines ul { list-style: none; padding: 0; margin: 0; }
#dg-order-lines li {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--dg-line);
}
.dg-order-line-product { margin-right: auto; }
.dg-order-line-product span { display: block; color: var(--dg-muted); font-size: 13px; margin-top: 3px; }
.dg-order-line-qty { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.dg-line-qty { width: 64px; padding: 6px 8px; border: 1px solid var(--dg-line); border-radius: 8px; font: inherit; }
.dg-order-total { font-size: 18px; color: var(--dg-text); }
.dg-order-error { color: #b42318; font-weight: 700; }
.dg-remove-line {
	background: #fff1f1 !important;
	color: #dc2626 !important;
	width: auto !important;
	padding: 6px 10px !important;
	font-size: 12px !important;
}
.dg-cancel-order { background: #fff1f1 !important; color: #b42318 !important; border: 1px solid #f2b8b5 !important; border-radius: 8px !important; padding: 6px 10px !important; font-weight: 700; cursor: pointer; }
#dg-submit-order {
	background: var(--dg-blue);
	color: #fff;
	border: 0;
	border-radius: 12px;
	padding: 12px 18px;
	font-weight: 800;
	cursor: pointer;
}
#dg-submit-order:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 960px) {
	.dg-portal-order-layout { display: block; }
	.dg-portal-order-column { margin-top: 20px; }
	.dg-portal-order-column .dg-order-form { position: static; }
	.dg-product-grid.dg-product-list .dg-product-card { grid-template-columns: minmax(170px, 1fr) minmax(100px, .7fr) 130px; }
	.dg-product-grid.dg-product-list .dg-product-card .dg-sku,
	.dg-product-grid.dg-product-list .dg-product-card .dg-product-categories { display: none; }
}

@media (max-width: 560px) {
	.dg-catalog-heading,
	.dg-catalog-controls { align-items: stretch; flex-direction: column; }
	.dg-catalog-cart-summary { text-align: center; }
	.dg-catalog-category-wrap { flex-basis: auto; }
	.dg-catalog-view-switch { align-self: stretch; }
	.dg-catalog-view { flex: 1; }
	.dg-product-grid.dg-product-list .dg-product-card { display: flex; align-items: stretch; gap: 7px; }
	.dg-product-grid.dg-product-list .dg-product-card .dg-sku,
	.dg-product-grid.dg-product-list .dg-product-card .dg-product-categories { display: block; }
	#dg-order-lines li { align-items: flex-start; flex-wrap: wrap; }
	.dg-order-line-product { width: 100%; }
}

.dg-portal-hero-brand {
	margin-bottom: 12px;
}
.dg-portal-hero-brand .dg-site-logo {
	max-height: 56px;
	width: auto;
	background: #fff;
	border-radius: 12px;
	padding: 6px 10px;
}
.dg-portal-hero-brand .dg-logo {
	width: 48px;
	height: 48px;
	background: #fff;
	color: #0d1b2a;
	border-radius: 14px;
	display: grid;
	place-items: center;
	font-weight: 900;
}
