/**
 * Portfix Infosenter - frontend-stil.
 * Matcher Portfix: Inter, oransje #E35F21, avrundet, sort/oransje.
 */

.pi-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 40px 20px 64px;
	font-family: "Inter", sans-serif;
	color: #1a1a1a;
}
/* infosenter-forsiden bruker full sidebredde som resten av nettstedet */
.pi-wrap--wide {
	max-width: 1240px;
}
@media (min-width: 1280px) {
	.pi-wrap--wide { max-width: 1400px; }
}

/* ---- header ---- */
.pi-header { text-align: center; margin-bottom: 40px; }
.pi-title { font-size: 34px; font-weight: 800; margin: 0 0 12px; }
.pi-intro { font-size: 16px; color: #555; line-height: 1.6; max-width: 640px; margin: 0 auto 24px; }

.pi-breadcrumb { font-size: 14px; color: #888; margin-bottom: 14px; }
.pi-breadcrumb a { color: #E35F21; text-decoration: none; }
.pi-breadcrumb a:hover { text-decoration: underline; }
.pi-breadcrumb span { margin: 0 6px; }

/* ---- soek ---- */
.pi-search { max-width: 480px; margin: 0 auto; }
.pi-search input {
	width: 100%;
	border: 1.5px solid #ddd;
	border-radius: 999px;
	padding: 14px 22px;
	font-size: 15px;
	font-family: inherit;
	transition: border-color .15s;
}
.pi-search input:focus { outline: none; border-color: #E35F21; }

/* ---- kategori-seksjoner ---- */
.pi-cat-section { margin-bottom: 44px; }
.pi-cat-head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 16px; margin-bottom: 18px;
	border-bottom: 2px solid #f0f0f0; padding-bottom: 10px;
}
.pi-cat-title { font-size: 22px; font-weight: 800; margin: 0; }
.pi-cat-title a { color: #1a1a1a; text-decoration: none; }
.pi-cat-title a:hover { color: #E35F21; }
.pi-cat-all { font-size: 14px; font-weight: 600; color: #E35F21; text-decoration: none; white-space: nowrap; }
.pi-cat-all:hover { text-decoration: underline; }

/* ---- rutenett + kort ---- */
.pi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}
.pi-card {
	display: flex; flex-direction: column;
	border: 1px solid #eee; border-radius: 14px;
	overflow: hidden; text-decoration: none; color: inherit;
	background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pi-card:hover {
	border-color: #E35F21;
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(0,0,0,.10);
}
.pi-card-img {
	display: block; width: 100%; aspect-ratio: 16/10;
	background-size: cover; background-position: center; background-color: #f3f3f3;
}
.pi-card-img--placeholder {
	background: linear-gradient(135deg, #f7f7f7, #ececec);
	position: relative;
}
.pi-card-img--placeholder::after {
	content: "Portfix";
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	color: #ccc; font-weight: 800; font-size: 20px; letter-spacing: 1px;
}
.pi-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
/* kort uten bilde: litt mer luft oeverst */
.pi-card--noimg .pi-card-body { padding: 22px; }
.pi-card-title {
	font-size: 17px; font-weight: 700; line-height: 1.3; color: #1a1a1a;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pi-card-desc {
	font-size: 14px; color: #666; line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pi-card-link { margin-top: auto; font-size: 14px; font-weight: 600; color: #E35F21; }

.pi-empty { color: #888; font-size: 15px; text-align: center; padding: 30px 0; }

/* ---- paginering ---- */
.pi-pagination { margin-top: 36px; text-align: center; }
.pi-pagination .page-numbers {
	display: inline-block; padding: 8px 14px; margin: 0 3px;
	border: 1.5px solid #ddd; border-radius: 8px; text-decoration: none;
	color: #1a1a1a; font-weight: 600; transition: all .15s;
}
.pi-pagination .page-numbers.current { background: #E35F21; border-color: #E35F21; color: #fff; }
.pi-pagination .page-numbers:hover:not(.current) { border-color: #E35F21; color: #E35F21; }

/* ---- enkeltartikkel ---- */
.pi-single { max-width: 760px; }
.pi-single-title { font-size: 32px; font-weight: 800; line-height: 1.2; margin: 8px 0 10px; }
.pi-single-meta { font-size: 14px; color: #999; margin-bottom: 24px; }
.pi-single-hero { margin: 0 0 28px; border-radius: 14px; overflow: hidden; }
.pi-single-hero img { display: block; width: 100%; height: auto; }

.pi-single-content { font-size: 17px; line-height: 1.75; color: #2a2a2a; }
.pi-single-content h2 { font-size: 24px; font-weight: 800; margin: 36px 0 14px; }
.pi-single-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.pi-single-content p { margin: 0 0 18px; }
.pi-single-content a { color: #E35F21; }
.pi-single-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }
.pi-single-content ul, .pi-single-content ol { margin: 0 0 18px; padding-left: 22px; }
.pi-single-content li { margin-bottom: 8px; }
.pi-single-content blockquote {
	border-left: 4px solid #E35F21; margin: 24px 0; padding: 6px 0 6px 20px;
	color: #555; font-style: italic;
}
.pi-single-content iframe { max-width: 100%; border-radius: 10px; margin: 20px 0; }

.pi-related { margin-top: 56px; border-top: 2px solid #f0f0f0; padding-top: 32px; }
.pi-related-title { font-size: 22px; font-weight: 800; margin: 0 0 20px; }

.pi-single-back { margin-top: 40px; }
.pi-single-back a { color: #E35F21; text-decoration: none; font-weight: 600; }
.pi-single-back a:hover { text-decoration: underline; }

/* ---- responsiv ---- */
@media (max-width: 600px) {
	.pi-title { font-size: 27px; }
	.pi-single-title { font-size: 25px; }
	.pi-grid { grid-template-columns: 1fr; }
	.pi-cat-head { flex-direction: column; gap: 4px; align-items: flex-start; }
}

/* ---- relaterte produkter (scroll-rad, hvit bakgrunn) ---- */
.pi-products { margin-top: 56px; border-top: 2px solid #f0f0f0; padding-top: 32px; }
.pi-products-title { font-size: 22px; font-weight: 800; margin: 0 0 20px; }
.pi-products-row {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 14px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}
.pi-product-card {
	position: relative;
	flex: 0 0 240px;
	max-width: 240px;
	scroll-snap-align: start;
	display: flex; flex-direction: column;
	border: 1px solid #eee; border-radius: 14px;
	background: #fff; text-decoration: none; color: inherit;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pi-product-card:hover {
	border-color: #E35F21;
	box-shadow: 0 14px 34px rgba(0,0,0,.10);
}
.pi-product-badge {
	position: absolute; top: 12px; left: 12px; z-index: 2;
	background: #E35F21; color: #fff;
	font-size: 11px; font-weight: 800; letter-spacing: .4px;
	padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.pi-product-img {
	display: block; width: 100%; aspect-ratio: 1/1;
	background: #fff; padding: 18px; box-sizing: border-box;
}
.pi-product-img img {
	width: 100%; height: 100%; object-fit: contain; display: block;
}
.pi-product-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pi-product-name {
	font-size: 16px; font-weight: 700; line-height: 1.3; color: #1a1a1a;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pi-product-desc {
	font-size: 13px; color: #777; line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pi-product-divider { height: 1px; background: #eee; margin: 6px 0 2px; }
.pi-product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.pi-product-price { font-size: 20px; font-weight: 800; color: #1a1a1a; }
.pi-product-price del { color: #999; font-weight: 500; font-size: 14px; margin-right: 5px; }
.pi-product-price ins { text-decoration: none; }
.pi-product-arrow { font-size: 24px; color: #1a1a1a; line-height: 1; font-weight: 700; }

/* pen scrollbar under (graa paa hvit bakgrunn) */
.pi-products-row::-webkit-scrollbar { height: 8px; }
.pi-products-row::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 99px; }
.pi-products-row::-webkit-scrollbar-thumb { background: #ccc; border-radius: 99px; }
.pi-products-row::-webkit-scrollbar-thumb:hover { background: #E35F21; }
.pi-products-row { scrollbar-width: thin; scrollbar-color: #ccc #f0f0f0; }

@media (max-width: 600px) {
	.pi-product-card { flex-basis: 70%; max-width: 70%; }
}
