﻿/*Topp med kategoriinfo*/
.category-info-contaioner { width: 100%; margin-bottom: 40px; }
	.category-info-contaioner .category-title { text-align: center; padding-top: 60px; }
	.category-info-contaioner .category-description { text-align: center; padding-bottom: 60px; max-width: 600px; margin: 0 auto; font-size: 1.5rem; }

.category-info .product-list-control .label, .product-list .inner-product-item .product-title, .we-ai-footer-brand__brand, .product-information h3 { font-weight: 500 !important; }

/* Tvåkolumnslayout */
.products-layout { padding-bottom: 40px; display: flex; align-items: flex-start; gap: 30px; /* avstånd mellan spalter */ }

/* Vänster meny */
.category-sidebar .item-link img { display: none; }

.category-sidebar { background-color: #f8f8f8; border: 1px solid #ddd; padding: 15px; border-radius: 4px; width: 250px; }

.products-layout {
	display: flex;
	align-items: flex-start;
	gap: 30px;
	padding-bottom: 40px;
}

	.category-sidebar h2 { margin: 0; font-size: 1.2rem; margin-bottom: 0.8rem; }

/* Höger innehåll */
.product-content { flex: 1; min-width: 0; }

.root-category-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.root-category-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.root-category-card img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	background: #f8f8f8;
	border-radius: 4px;
}

.root-category-card h2 {
	margin: 12px 0 0;
	font-size: 1.1rem;
	line-height: 1.4;
	text-align: center;
}

.root-category-card:hover h2 { text-decoration: underline; }
.root-category-card:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }

/* Nivå 1 - huvudkategori */
.category-menu .lvl-1 > a { font-weight: bold; padding: 8px 10px; color: var(--c-accent); }

.item.lvl-0 { position: absolute; /* anchor inside its parent */ top: 0; /* stick to the top of parent */ left: 50%; /* center horizontally */ transform: translateX(-50%); /* optional, keeps it readable */ z-index: 1000; /* ensures it sits above siblings */ /*justify-self: anchor-center; */ }

/* Nivå 2 - underkategori */
.category-menu .lvl-2 { grid-row: 2; margin-left: 15px; /* indrag för barnkategorier */ padding-left: 2rem; padding-top: 3rem; margin-top: 25px; }

	.category-menu .lvl-2 a { font-size: 0.9em; color: #555; }

/* Hover-effekt för båda */
.category-menu a:hover { background-color: transparent; }

/* Gör huvudkategorierna lite separerade */
.category-menu .lvl-1 { margin-bottom: 8px; }

/* Gör toppmenyn horisontell – korrekt för CategoryTopMenu */
/* --- TOPPMENY DESKTOP --- */
.category-topmenu-container .category-menu { /*  display: grid;
    grid-template-rows: auto 1fr; */ display: flex; flex-wrap: wrap; /* Bryt rad på desktop */ gap: 12px; margin-bottom: 2rem !important; justify-content: center; }

	.category-topmenu-container .category-menu.overflow { justify-content: flex-start; }

.category-menu .text:hover {
	text-decoration: underline;
}

.category-menu-icon {
	width: 110px;
	height: 110px;
	margin-bottom: 10px;
	border: 3px solid #0c6564;
	border-radius: 50%;
	object-fit: cover;
	place-self: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-menu .item:hover .category-menu-icon {
	transform: scale(1.08);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

/* --- SIDEMENU --- */
.category-sidebar .category-menu .item { text-align: left; align-items: start; margin: 0px; }

.category-sidebar .category-menu .text { font-size: 14px; font-weight: normal; }

.current-category-title { font-weight: 600; font-size: 15px; color: var(--c-accent); margin-top: 0.8rem; margin-bottom: 0.8rem; }

.category-sidebar .category-menu .lvl-2 { padding: 0px; padding-left: 0.5rem; }

	.category-sidebar .category-menu .lvl-1 > a, .category-sidebar .category-menu .lvl-2 > a, .category-sidebar .category-menu .lvl-3 > a { padding: 5px 0px; }

.category-sidebar .category-menu .text { margin-top: 0px; }

.category-sidebar .item.lvl-0 { position: relative; justify-self: left; }

.category-topmenu-container .category-menu.overflow {
	justify-content: flex-start;
}

/* --- ITEMS --- */
.category-menu .item { display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; }

/* Ikonbild */
.category-menu-icon { width: 110px; height: 110px; object-fit: cover; border-radius: 50%; border: 3px solid var(--c-accent); margin-bottom: 10px; transition: transform 0.2s ease, box-shadow 0.2s ease; place-self: center; }

/* Hover-effekt */
.category-menu .item:hover .category-menu-icon { transform: scale(1.08); box-shadow: 0 6px 14px rgba(0,0,0,0.1); }

/* Länk-text */
.category-menu .text { font-size: 15px; font-weight: 600; color: var(--c-accent); text-decoration: none; display: block; margin-top: 5px; line-height: 1.3; margin-bottom: 0.5rem; }

	.category-menu .text:hover { text-decoration: underline; }

/* Back-knapp och current category ska INTE visa bild */
.category-menu .back-link + .category-menu-icon,
.category-menu .current-link + .category-menu-icon { display: none !important; }

.category-sidebar h2 {
	margin: 0;
	font-size: 1.2rem;
	margin-bottom: 0.8rem;
}

.category-sidebar .item-link img {
	display: none;
}

.category-topmenu-container { overflow-x: auto; overflow-y: hidden; white-space: nowrap; -webkit-overflow-scrolling: touch; position: relative; }

	.category-topmenu-container .category-menu { flex-wrap: nowrap; /* ❗ Ingen radbrytning */ overflow-x: auto; white-space: nowrap; display: flex; -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%); -webkit-mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-image: linear-gradient(to right, black 90%, transparent 100%); mask-repeat: no-repeat; mask-size: 100% 100%; }

		.category-topmenu-container .category-menu .item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; grid-row: 2; margin-left: 15px; padding-top: 3rem; margin-top: 25px; }

			.category-topmenu-container .category-menu .item:last-child { padding-right: 4rem; }

			.category-topmenu-container .category-menu .item:has(a.back-link) span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1000; margin: 0 !important; padding: 0 !important; }

.current-link { display: none; }

.topmenuclass {
	display: none;
}


@media (max-width: 1200px) {
	.category-topmenu-container .category-menu { flex-wrap: nowrap; justify-content: flex-start; }
}

.product-property-filter h2 {
	margin: 0 0 12px;
}

/* --- MOBIL: SCROLLA SIDLEDES --- */
@media (max-width: 768px) {
	.category-topmenu-container { overflow-x: auto; overflow-y: hidden; white-space: nowrap; -webkit-overflow-scrolling: touch; }

		.category-topmenu-container .category-menu { flex-wrap: nowrap; /* ❗ Ingen radbrytning */ }

			.category-topmenu-container .category-menu .item { flex: 0 0 auto; /* ❗ Viktigt för att scroll ska fungera */ }

	.category-menu-icon { margin: auto; }

	.category-menu .text { font-size: 14px; }
}

.product-property-filter-group h3 {
	margin: 0 0 8px;
	font-size: 16px;
}

.product-property-filter .filter-option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0;
	color: inherit;
	text-decoration: none;
}

.product-property-filter .filter-option.selected {
	font-weight: 700;
}

.product-property-filter .filter-checkbox {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: 1px solid currentColor;
	font-size: 12px;
	line-height: 1;
}

.category-info { padding-left: 15px; }

	.category-info .image { overflow: hidden; }

	.category-info .category-image { max-width: 100%; }

	.category-info .sub-categories-wrapper { margin: 20px 0; }

	.category-info .sub-category-links-toggle { display: none; }

	.category-info .sub-category-link { border: 1px solid #ddd; display: inline-block; margin: 5px 10px 5px 0; padding: 5px 10px; text-decoration: none; text-transform: uppercase; font-size: 12px; }

	.category-info .product-list-controls { padding: 10px 0px 20px; overflow: hidden; font-size: 15px; border-bottom: 1px solid #ddd; }

		.category-info .product-list-controls .label { font-weight: 700; }

	.category-info .product-list-control { float: left; margin-right: 1rem; display: flex; gap: 0.5rem; align-items: center; }

		.category-info .product-list-control .label { font-weight: 700; display: block; }

		.category-info .product-list-control .dropdown-control { margin: 0 5px 0 0; padding: 8px; border: none; padding-right: 20px; -webkit-appearance: none; -moz-appearance: none; background-image: url("/gfx/arrow-down-16.png"); background-repeat: no-repeat; background-position: right 5px center; background-size: 10px; border: 1px solid #ddd; border-radius: 4px; }

	.category-info .sorting-control { float: left; }

		.category-info .sorting-control .sotring-dropdown { margin: 0 5px; padding: 8px; border: none; padding-right: 20px; -webkit-appearance: none; -moz-appearance: none; background-image: url("/gfx/arrow-down-16.png"); background-repeat: no-repeat; background-position: right 5px center; background-size: 10px; border: 1px solid #ddd; border-radius: 4px; }

	.category-info .number-of-products-control { float: right; padding: 23px 4px 0; }

		.category-info .number-of-products-control .view-button { display: inline-block; padding: 5px 6px; vertical-align: middle; }

			.category-info .number-of-products-control .view-button.active { }

.product-list { overflow: hidden; margin: 10px 0px; padding: 2px; }

	.product-list .product-item { float: left; }

/* Bredden ska styras av kolumnerna, inte av produktnamn eller bildstorlek.
   Panelen och listan inuti den har bada klassen product-list. */
.product-content .product-list { display: flex; flex-wrap: wrap; }
.product-content .product-list > .product-list { width: 100%; margin: 0; padding: 0; }
.product-content .product-list .product-item { flex: 0 0 auto; min-width: 0; }
.product-content .product-list .product-item.cols-3 { width: 33.333333%; }
.product-content .product-list .product-item.cols-4 { width: 25%; }
.product-content .product-list.list-view { flex-direction: column; }
.product-content .product-list.list-view .product-item { width: 100%; float: none; }

	.product-list.list-view .product-item { float: none; width: auto; }

	.product-list .inner-product-item { display: block; margin: 10px; text-align: left; text-decoration: none; border-radius: 4px; background-color: #ffffff; }

		/* Bilden ligger absolut positionerad inuti rutan, så rutan får ingen höjd
		   av sitt innehåll. Utan ett eget höjdförhållande blir den 0 pixlar hög
		   och bilderna syns inte alls i rutnätsvyn. Listvyn har redan 1:1. */
		.product-list .inner-product-item .image { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; position: relative; }

.category-info .pager .current {
	border-color: #353535;
	background-color: #353535;
	color: #fff;
}

			.product-list .inner-product-item .image img { position: absolute; left: 50%; top: 50%; -webkit-transform: translateY(-50%) translateX(-50%); -ms-transform: translateY(-50%) translateX(-50%); transform: translateY(-50%) translateX(-50%); max-width: 110%; max-height: 110%; display: block; }

		.product-list .inner-product-item .product-title { margin: 8px 0px 0; font-size: 1rem; line-height: 1.25; font-weight: 600; color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.75em; }
.product-list .inner-product-item .product-sku { font-size: 0.8rem; color: var(--c-text); }

		.product-list .inner-product-item .product-description { display: none; }

.product-list .inner-product-item .product-price { color: #ec6600; font-size: .98rem; font-weight: 700; position: relative; padding-bottom: 10px; }

		.product-list .inner-product-item .original-price { display: none; }

	.product-list .campaign .inner-product-item .product-price { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; color: #166534; font-size: 1.2rem; font-weight: 700; line-height: 1.3; padding-bottom: 0; }

	.product-list .campaign .inner-product-item .original-price { display: block; position: static; margin: 0; color: #64748b; font-size: .85rem; font-weight: 400; line-height: 1.4; text-decoration: line-through; }

	/* Listvyn beskrivs i Css/shared.css, som galler bade den har mallen och
	   drag-and-drop-sidornas produktwidget. Reglerna som lag har overskred
	   dem - den har filen laddas efter shared.css - och holl bland annat
	   bilden kvar pa 15 procent av radbredden. */

.category-info .pager { clear: both; text-align: right; font-size: 18px; margin: 10px 0 20px; }

	.category-info .pager a { text-decoration: none; margin: 2px 0; display: inline-block; width: 30px; text-align: center; background-color: #dedede; color: #a0a0a0; vertical-align: middle; padding: 8px 5px 4px; border-radius: 4px; border: 1px solid #bbb; }

	.category-info .pager .current { background-color: #353535; border-color: #353535; color: #fff; }

.topmenuclass { display: none; }

.product-property-filter { margin-top: 24px; }

	.product-property-filter h2 { margin: 0 0 12px; }

.product-property-filter-group { margin-bottom: 18px; }

	.product-property-filter-group h3 { margin: 0 0 8px; font-size: 16px; }

.product-property-filter .filter-option { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: inherit; text-decoration: none; }

.product-property-filter .filter-checkbox { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid currentColor; font-size: 12px; line-height: 1; }

.product-property-filter .filter-option.selected { font-weight: 700; }

.product-property-filter-group.filter-collapsed .filter-option-extra { display: none; }

.product-property-filter .filter-show-more { display: none; margin: 4px 0 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

.product-property-filter .filter-show-more:hover { text-decoration: none; }

.product-property-filter-group.filter-has-more.filter-collapsed .filter-show-more { display: inline-block; }

@media (max-width: 768px) {
	.category-topmenu-container {
		overflow-x: auto;
		overflow-y: hidden;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}
}

@media only screen and (max-width: 1200px) {
	.category-info { padding: 0; }

	.product-list { margin: 10px 0; }

	.category-sidebar { display: none; }

	.topmenuclass { display: block; }
}

@media only screen and (max-width: 768px) {
	.category-info .sub-categories-wrapper { border: 1px solid #ddd; border-radius: 5px; padding: 4px; }

	.category-info .sub-category-links-toggle { display: block; margin: 0; padding: 8px 10px 4px; text-transform: uppercase; background-image: url(/gfx/arrow-down-16.png); background-position: right 10px center; background-repeat: no-repeat; cursor: pointer; }

	.category-info .sub-category-links { display: none; }

		.category-info .sub-category-links.expand { display: block; }

	.category-info .sub-category-link { border: none; border-radius: 0; display: block; margin: 5px 10px; padding: 8px 0 4px; }
}

@media only screen and (max-width: 900px) {
	.product-content .product-list:not(.list-view) .product-item { width: 50%; }
}

@media only screen and (max-width: 680px) {

	.product-list .inner-product-item .product-title { font-size: 16px; }

	.product-list .inner-product-item .product-price { font-size: 20px; }

	.product-list.list-view .inner-product-item .product-price { bottom: 10px; padding: 0; }

	.product-list.list-view .inner-product-item .product-title { padding-left: 5px; font-size: 16px; }

	.product-list.list-view .inner-product-item .product-description { padding-left: 5px; font-size: 14px; }

	.category-info .product-list-control { margin: 0; }

		.category-info .product-list-control .label { font-size: 12px; }

		.category-info .product-list-control .dropdown-control { font-size: 12px; padding: 4px; padding-right: 20px; }

	.category-info .number-of-products-control { padding: 16px 0 0; }
}

@media only screen and (max-width: 400px) {
	.product-content .product-list:not(.list-view) .product-item { float: none; width: 100%; margin: 10px 0; }

	.product-list.list-view .inner-product-item .product-title { font-size: 14px; }

	.product-list.list-view .inner-product-item .product-description { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 80%; box-sizing: border-box; }
}

@media only screen and (min-width: 769px) {
	.category-info .category-image { display: none; }

	.category-info .sub-category-link:hover { border: 1px solid #666; background-color: #666; color: #fff; }
}
