/**
 * Norddiamant Core – theme-agnostic frontend styles
 * Phone + advice CTA (designmål: no gold-orange accent)
 */

/* Header phone */
.norddiamant-header-phone {
	display: none;
}

@media (min-width: 768px) {
	.norddiamant-header-phone {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		justify-content: center;
		float: right;
		margin: 0 1em 0 0.5em;
		padding: 0.35em 0;
		line-height: 1.25;
		color: #fff;
		text-align: right;
	}

	.norddiamant-header-phone__link {
		color: #fff !important;
		text-decoration: none;
		font-weight: 600;
		font-size: 0.95em;
		white-space: nowrap;
	}

	.norddiamant-header-phone__link:hover,
	.norddiamant-header-phone__link:focus {
		color: #fff !important;
		text-decoration: underline;
		opacity: 0.9;
	}

	.norddiamant-header-phone__hint {
		display: block;
		font-size: 0.75em;
		opacity: 0.85;
		font-weight: 400;
	}

	/* Storefront header layout helpers */
	#masthead .norddiamant-header-phone {
		color: #ffffff;
	}
}

@media (max-width: 767px) {
	.norddiamant-header-phone {
		display: block;
		text-align: center;
		padding: 0.4em 1em 0.6em;
		background: #000;
		color: #fff;
		clear: both;
	}

	.norddiamant-header-phone__link {
		color: #fff !important;
		font-weight: 600;
	}

	.norddiamant-header-phone__hint {
		display: block;
		font-size: 0.8em;
		opacity: 0.85;
	}

	/* Fallback body_open bar under non-Storefront themes */
	.norddiamant-header-phone--fallback,
	body > .norddiamant-header-phone {
		width: 100%;
	}
}

/* Advice CTA band */
.norddiamant-advice-cta {
	margin: 1em 0 1.25em;
	padding: 0.85em 1.1em;
	background: #fff;
	border-left: 4px solid #003954;
	border-radius: 2px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.norddiamant-advice-cta__text {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.45;
	color: #333;
}

.norddiamant-advice-cta__link {
	font-weight: 700;
	white-space: nowrap;
}

.norddiamant-advice-cta--product {
	margin-top: 1.25em;
	clear: both;
}

/* —— Footer (site-wide) —— */
.norddiamant-site-footer {
	background: #111;
	color: #e8e8e8;
	margin-top: 0;
	font-size: 0.95rem;
}

.norddiamant-site-footer,
.norddiamant-site-footer p,
.norddiamant-site-footer li,
.norddiamant-site-footer .norddiamant-site-footer__note,
.norddiamant-site-footer .norddiamant-site-footer__bar,
.norddiamant-site-footer .norddiamant-site-footer__bar p {
	color: #e8e8e8 !important;
}

.norddiamant-site-footer a {
	color: #fff !important;
	text-decoration: none;
}

.norddiamant-site-footer a:hover,
.norddiamant-site-footer a:focus {
	text-decoration: underline;
	color: #fff !important;
}

.norddiamant-site-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 1.5rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 2rem;
}

/* Override Botiga h3 heading color vars on dark footer */
.norddiamant-site-footer h3,
.norddiamant-site-footer .norddiamant-site-footer__heading,
.norddiamant-site-footer h3.norddiamant-site-footer__heading {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff !important;
}

.norddiamant-site-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.norddiamant-site-footer__list li {
	margin: 0 0 0.45rem;
	line-height: 1.4;
}

.norddiamant-site-footer__note {
	margin: 1rem 0 0;
	font-size: 0.85rem;
	opacity: 0.85;
	line-height: 1.4;
}

.norddiamant-site-footer__bar {
	border-top: 1px solid #333;
	padding: 0.85rem 1.25rem;
	text-align: center;
	font-size: 0.85rem;
	opacity: 0.8;
}

.norddiamant-site-footer__bar p {
	margin: 0;
}

/* Hide empty Botiga footer builder chrome when our footer is present */
body.theme-botiga .bhfb-footer,
body.theme-botiga .site-info,
body .bhfb-footer.bhfb-desktop,
body .bhfb-footer.bhfb-mobile {
	display: none !important;
}

/*
 * Mobile phone strip only (desktop phone is .nd-header-phone in header row).
 */
.bhfb-header.bhfb-desktop .norddiamant-header-phone {
	display: none !important;
}

.bhfb-header.bhfb-mobile .norddiamant-header-phone {
	display: flex;
	float: none;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 0.75rem;
	margin: 0;
	padding: 0.45rem 1rem;
	line-height: 1.25;
	color: #fff;
	text-align: center;
	background: #0a0a0a;
	border-top: 1px solid #003954;
	width: 100%;
	box-sizing: border-box;
}

.bhfb-header.bhfb-mobile .norddiamant-header-phone__link {
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95em;
	white-space: nowrap;
}

.bhfb-header.bhfb-mobile .norddiamant-header-phone__hint {
	display: inline;
	font-size: 0.8em;
	opacity: 0.85;
}

/* —— B5: Product single —— */
.norddiamant-product-sku {
	margin: 0.15rem 0 0.75rem;
	font-size: 0.95rem;
	color: #333;
}

.norddiamant-product-sku__label {
	font-weight: 600;
	color: #5c5c5c;
	margin-right: 0.25rem;
}

.norddiamant-product-sku .sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #1a1a1a;
}

/* Hide noisy tags + duplicate SKU in meta (SKU shown under title) */
.single-product .product_meta .tagged_as,
.single-product .product_meta .sku_wrapper {
	display: none !important;
}

.single-product .product_meta {
	font-size: 0.9rem;
	color: #5c5c5c;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e8e8e8;
}

.single-product .summary .price {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
}

.single-product .summary .price .woocommerce-price-suffix,
.single-product .summary .woocommerce-price-suffix {
	display: block;
	font-size: 0.8rem;
	font-weight: 500;
	color: #5c5c5c;
	margin-top: 0.2rem;
}

.norddiamant-price-inquiry {
	display: inline-block;
	font-size: 1rem;
	line-height: 1.4;
}

.norddiamant-price-inquiry__link {
	font-weight: 700;
	color: #003954 !important;
	text-decoration: underline;
}

.norddiamant-price-inquiry__hint {
	display: block;
	font-size: 0.85rem;
	font-weight: 500;
	color: #5c5c5c;
	margin-top: 0.15rem;
}

/* Description in summary column (beside gallery) */
.summary .norddiamant-product-description,
.entry-summary .norddiamant-product-description {
	margin: 0.75rem 0 1.1rem;
	max-width: none;
	clear: none;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid #e8e8e8;
}

.norddiamant-product-description__title {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 0.5rem;
	color: #5c5c5c;
}

.norddiamant-product-description__body {
	line-height: 1.55;
	color: #333;
	font-size: 0.95rem;
}

.norddiamant-product-description__body p {
	margin: 0 0 0.65rem;
}

.norddiamant-product-description__body p:last-child {
	margin-bottom: 0;
}

.norddiamant-product-description__body p:first-child {
	margin-top: 0;
}

.single-product .woocommerce-product-details__short-description {
	line-height: 1.55;
	color: #333;
	margin-bottom: 0.75rem;
}

/* Hide plugin’s duplicate “Alternativ” h2 – we use “Välj variant” */
.norddiamant-variations-wrap #variations > h2 {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Technical data table (before upsells/related) */
.norddiamant-technical-data {
	margin: 1.5rem 0 2rem;
	clear: both;
}

.norddiamant-technical-data__title {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: #1a1a1a;
}

.norddiamant-technical-data .shop_attributes,
.single-product .shop_attributes {
	width: 100%;
	max-width: 52rem;
	margin: 0 0 1rem;
	border-collapse: collapse;
	font-size: 0.95rem;
	border: 1px solid #e5e5e5;
}

.single-product .shop_attributes th,
.single-product .shop_attributes td {
	padding: 0.6rem 0.85rem;
	border-bottom: 1px solid #e8e8e8;
	text-align: left;
	vertical-align: top;
	background: transparent;
}

/* Alternating rows – not gray header column */
.single-product .shop_attributes tr:nth-child(odd) th,
.single-product .shop_attributes tr:nth-child(odd) td {
	background: #ffffff;
}

.single-product .shop_attributes tr:nth-child(even) th,
.single-product .shop_attributes tr:nth-child(even) td {
	background: #f3f5f6;
}

.single-product .shop_attributes th {
	width: 40%;
	font-weight: 600;
	color: #1a1a1a;
}

.single-product .shop_attributes tr:last-child th,
.single-product .shop_attributes tr:last-child td {
	border-bottom: none;
}

.single-product .woocommerce-product-attributes + .up-sells,
.single-product table.shop_attributes ~ .up-sells,
.single-product .up-sells,
.single-product .related {
	margin-top: 2.5rem;
	clear: both;
}

.single-product .up-sells > h2,
.single-product .related > h2 {
	font-size: 1.2rem;
	margin-bottom: 1rem;
}

/* Variation table (woo-variations-table) – first-class B2B look */
.norddiamant-variations-wrap {
	margin: 1.5rem 0 2rem;
	clear: both;
}

.norddiamant-variations-wrap__title {
	margin: 0 0 0.35rem;
	font-size: 1.2rem;
	font-weight: 700;
	color: #1a1a1a;
}

.norddiamant-variations-wrap__lead {
	margin: 0 0 0.85rem;
	font-size: 0.9rem;
	color: #5c5c5c;
}

.norddiamant-variations-wrap__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #e0e0e0;
	border-radius: 3px;
	background: #fff;
}

#variations.variations-table,
.variations-table {
	margin: 0;
}

#variations table.variations {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	margin: 0;
	table-layout: auto;
}

#variations table.variations th {
	background: #003954 !important;
	color: #fff !important;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0.02em;
	padding: 0.65rem 0.75rem !important;
	border: none;
	white-space: nowrap;
}

#variations table.variations td {
	padding: 0.55rem 0.75rem;
	font-size: 0.9rem;
	vertical-align: middle;
	border-bottom: 1px solid #eee;
}

#variations table.variations tbody tr:nth-child(even) {
	background-color: #f7f7f7;
}

#variations table.variations tbody tr:hover {
	background-color: #eef4f7;
}

#variations table.variations td.sku .item,
#variations table.variations .sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 600;
	font-size: 0.85rem;
}

#variations table.variations th.price_html,
#variations table.variations td.price_html {
	white-space: nowrap;
	font-weight: 600;
}

#variations .variation-filters {
	background: #f4f4f4;
	padding: 0.65rem 0.75rem;
	border-bottom: 1px solid #e0e0e0;
	margin: 0;
}

#variations .filter label {
	font-size: 0.8rem;
	font-weight: 600;
	color: #333;
}

#variations .filter input,
#variations .filter select {
	border: 1px solid #ccc !important;
	border-radius: 3px !important;
	font-size: 0.85rem !important;
	height: auto !important;
	min-height: 2.25em;
	padding: 0.35rem 0.5rem !important;
	background: #fff !important;
}

#variations table.variations .button,
#variations table.variations button {
	font-size: 0.85rem !important;
	padding: 0.4rem 0.75rem !important;
	white-space: nowrap;
}

/* “Se alternativ” hidden – scroll to variation table instead */
.available-options-btn {
	display: none !important;
}

/* —— B5: Catalog / category —— */
.norddiamant-loop-sku {
	display: block;
	font-size: 0.78rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: #5c5c5c;
	margin: 0.15rem 0 0.25rem;
	letter-spacing: 0.01em;
}

.norddiamant-product-archive ul.products {
	gap: 0; /* theme grid handles columns */
}

.norddiamant-product-archive ul.products li.product {
	margin-bottom: 1.5rem;
}

.norddiamant-product-archive ul.products li.product .woocommerce-loop-product__title,
.norddiamant-product-archive ul.products li.product .botiga-loop-product__title,
.norddiamant-product-archive ul.products li.product h2 {
	font-size: 0.98rem;
	line-height: 1.3;
	font-weight: 600;
	margin: 0.4rem 0 0.15rem;
}

.norddiamant-product-archive ul.products li.product .price {
	font-size: 0.95rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-top: 0.2rem;
}

.norddiamant-product-archive ul.products li.product .price .woocommerce-price-suffix {
	display: block;
	font-size: 0.72rem;
	font-weight: 500;
	color: #5c5c5c;
}

.norddiamant-product-archive .term-description {
	max-width: 48rem;
	margin-bottom: 1.25rem;
	line-height: 1.55;
	color: #5c5c5c;
	font-size: 0.95rem;
}

.norddiamant-product-archive .woocommerce-products-header__title {
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
}

/* Filter column denser + clearer counts */
.norddiamant-product-archive #secondary .widget {
	margin-bottom: 1.25rem;
	font-size: 0.9rem;
}

.norddiamant-product-archive .woocommerce-widget-layered-nav-list__item {
	margin: 0.2rem 0;
	line-height: 1.35;
}

.norddiamant-product-archive .woocommerce-widget-layered-nav-list__item a {
	color: #1a1a1a;
}

.norddiamant-product-archive .woocommerce-widget-layered-nav-list__item--chosen a {
	font-weight: 700;
	color: #003954;
}

/* Subcategory filter (replaces subcategory cards in the product grid) */
.norddiamant-product-archive .nd-subcategory-filter__list,
body.woocommerce-shop .nd-subcategory-filter__list,
body.tax-product_cat .nd-subcategory-filter__list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 280px;
	overflow-y: auto;
}

.norddiamant-product-archive .nd-subcategory-filter__list .cat-item,
body.woocommerce-shop .nd-subcategory-filter__list .cat-item,
body.tax-product_cat .nd-subcategory-filter__list .cat-item {
	margin: 0.2rem 0;
	padding: 0;
	line-height: 1.35;
	font-size: 0.9rem;
}

.norddiamant-product-archive .nd-subcategory-filter__list .cat-item a,
body.woocommerce-shop .nd-subcategory-filter__list .cat-item a,
body.tax-product_cat .nd-subcategory-filter__list .cat-item a {
	color: #1a1a1a;
	text-decoration: none;
}

.norddiamant-product-archive .nd-subcategory-filter__list .cat-item a:hover,
body.woocommerce-shop .nd-subcategory-filter__list .cat-item a:hover,
body.tax-product_cat .nd-subcategory-filter__list .cat-item a:hover {
	color: #003954;
}

.norddiamant-product-archive .nd-subcategory-filter__list .cat-item .count,
body.woocommerce-shop .nd-subcategory-filter__list .cat-item .count,
body.tax-product_cat .nd-subcategory-filter__list .cat-item .count {
	opacity: 0.55;
	font-size: 0.85em;
}

/* Archive advice CTA slightly tighter */
.norddiamant-product-archive .norddiamant-advice-cta--archive {
	margin-top: 0.5rem;
	margin-bottom: 1rem;
}

/* —— Mobile catalog filters ——
 * Botiga stacks #secondary under products below 991px.
 * Button sits above the grid; panel slides open above products when toggled.
 */
.nd-mobile-filters-bar {
	display: none;
}

@media (max-width: 991px) {
	body.norddiamant-product-archive .content-wrapper .main-row,
	body.woocommerce-shop .content-wrapper .main-row,
	body.tax-product_cat .content-wrapper .main-row,
	body.tax-product_tag .content-wrapper .main-row {
		display: flex;
		flex-direction: column;
	}

	/* Keep products first in flow; filter panel moves above when open via order. */
	body.norddiamant-product-archive .content-wrapper .main-row > #primary,
	body.woocommerce-shop .content-wrapper .main-row > #primary,
	body.tax-product_cat .content-wrapper .main-row > #primary {
		order: 1;
		width: 100%;
	}

	body.norddiamant-product-archive .content-wrapper .main-row > #secondary,
	body.woocommerce-shop .content-wrapper .main-row > #secondary,
	body.tax-product_cat .content-wrapper .main-row > #secondary {
		order: 2;
		width: 100%;
		max-width: 100%;
		margin-top: 0;
		margin-bottom: 0;
		display: none;
	}

	body.nd-filters-open.norddiamant-product-archive .content-wrapper .main-row > #secondary,
	body.nd-filters-open.woocommerce-shop .content-wrapper .main-row > #secondary,
	body.nd-filters-open.tax-product_cat .content-wrapper .main-row > #secondary {
		display: block;
		order: 0; /* above #primary (order 1) */
		margin-bottom: 1rem;
		padding: 1rem;
		background: #fff;
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 3px;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	}

	/* Hide Botiga close control (not used as slide-out). */
	body.norddiamant-product-archive #secondary .close-sidebar {
		display: none !important;
	}

	.nd-mobile-filters-bar {
		display: block;
		margin: 0 0 1rem;
	}

	.nd-mobile-filters-btn {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		width: 100%;
		justify-content: center;
		padding: 0.7rem 1rem;
		font-size: 0.95rem;
		font-weight: 700;
		color: #fff;
		background: #003954;
		border: none;
		border-radius: 3px;
		cursor: pointer;
		line-height: 1.2;
	}

	.nd-mobile-filters-btn:hover,
	.nd-mobile-filters-btn:focus {
		background: #002a3d;
		color: #fff;
		outline: 2px solid #003954;
		outline-offset: 2px;
	}

	body.nd-filters-open .nd-mobile-filters-btn {
		background: #1a1a1a;
	}

	.nd-mobile-filters-btn__icon {
		display: inline-block;
		width: 1.1rem;
		height: 0.85rem;
		border-top: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		box-shadow: 0 -5px 0 currentColor;
		box-sizing: border-box;
		opacity: 0.9;
	}
}

/* Menu: overview links (same destination as parent top-level item) */
.nd-menu-overview > a,
.menu-item.nd-menu-overview > a,
.botiga-dropdown-li.nd-menu-overview > a {
	font-weight: 700 !important;
}

.bhfb-header .main-navigation .sub-menu .nd-menu-overview > a,
.bhfb-header .main-navigation .sub-menu .nd-menu-overview > a.botiga-dropdown-link,
.botiga-offcanvas-menu .nd-menu-overview > a,
.botiga-dropdown .nd-menu-overview > a {
	font-weight: 700 !important;
	border: none !important;
	background: rgba(0, 57, 84, 0.12);
}

.botiga-offcanvas-menu .nd-menu-overview > a,
.bhfb-mobile_offcanvas .nd-menu-overview > a {
	background: #eef2f4 !important;
	color: #003954 !important;
	border: none !important;
	margin-bottom: 0.25rem;
}


/* --------------------------------------------------------------------------
   Horizontal image gallery (swipe / scroll-snap)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Horizontal image gallery (swipe / scroll-snap)
   -------------------------------------------------------------------------- */
.nd-hscroll-gallery {
	margin: 0 0 1.75rem;
	max-width: 100%;
}

/* Stage = image area only (buttons center here, not including dots) */
.nd-hscroll-gallery__viewport {
	position: relative;
}

.nd-hscroll-gallery__track {
	display: flex;
	gap: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	scrollbar-width: none; /* Firefox */
	border-radius: 4px;
	background: #0a0a0a;
}

.nd-hscroll-gallery__track::-webkit-scrollbar {
	display: none;
}

.nd-hscroll-gallery__slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	margin: 0;
	line-height: 0;
}

.nd-hscroll-gallery__slide img {
	display: block;
	width: 100%;
	height: auto;
	max-height: min(70vh, 560px);
	object-fit: contain;
	background: #0a0a0a;
}

.nd-hscroll-gallery__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	border: none;
	border-radius: 50%;
	background: rgba(0, 57, 84, 0.88);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: background 0.15s ease, opacity 0.15s ease;
}

.nd-hscroll-gallery__btn svg {
	display: block;
	width: 1.15rem;
	height: 1.15rem;
	flex-shrink: 0;
}

.nd-hscroll-gallery__btn:hover,
.nd-hscroll-gallery__btn:focus-visible {
	background: #003954;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.nd-hscroll-gallery__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.nd-hscroll-gallery__btn--prev {
	left: 0.6rem;
}

.nd-hscroll-gallery__btn--next {
	right: 0.6rem;
}

.nd-hscroll-gallery__dots {
	display: flex;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 0.65rem;
	flex-wrap: wrap;
}

.nd-hscroll-gallery__dot {
	width: 0.55rem;
	height: 0.55rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #c5c5c5;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.nd-hscroll-gallery__dot.is-active {
	background: #003954;
	transform: scale(1.2);
}

.nd-hscroll-gallery__dot:focus-visible {
	outline: 2px solid #003954;
	outline-offset: 2px;
}

@media (max-width: 568px) {
	.nd-hscroll-gallery__btn {
		width: 2.15rem;
		height: 2.15rem;
	}

	.nd-hscroll-gallery__btn svg {
		width: 1rem;
		height: 1rem;
	}

	.nd-hscroll-gallery__slide img {
		max-height: 55vh;
	}
}
