/*
Theme Name: Leuven
Description: Minimal, category-first storefront for zmedical Leuven training kits.
Author: Medi Stitch
Version: 0.1.23
Text Domain: leuven
*/

:root {
	--lv-bg: #ffffff;
	--lv-fg: #1d1d1f;
	--lv-fg-muted: #6e6e73;
	--lv-border: #e5e5e7;
	--lv-accent: #0071e3;
	--lv-navy: #244e93;
	--lv-radius: 18px;
	--lv-max-width: 1120px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--lv-bg);
	color: var(--lv-fg);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
}

.lv-wrap {
	max-width: var(--lv-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

/* Utility bar (matches the old site's navy top bar) */
.lv-topbar {
	background: var(--lv-navy);
	color: #fff;
}

.lv-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 34px;
	font-size: 12px;
}

.lv-topbar-tagline {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.lv-topbar-inner a {
	color: rgba(255, 255, 255, 0.9);
}

.lv-topbar-inner a:hover {
	color: #fff;
}

/* Header */
.lv-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--lv-border);
}

.lv-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 96px;
}

.lv-logo img {
	display: block;
	height: 64px;
	width: auto;
}

.lv-header-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.lv-login-link {
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--lv-fg-muted);
}

.lv-login-link:hover {
	color: var(--lv-fg);
}

.lv-cart-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 999px;
	background: var(--lv-navy);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.lv-cart-icon {
	width: 15px;
	height: 15px;
	margin-left: 2px;
}

.lv-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #fff;
	color: var(--lv-navy);
	font-size: 10px;
	font-weight: 700;
}

/* Hero */
.lv-hero {
	text-align: center;
	padding: 88px 24px 56px;
}

.lv-hero h1 {
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 12px;
}

.lv-hero p {
	font-size: clamp(16px, 2vw, 21px);
	color: var(--lv-fg-muted);
	margin: 0;
}

/* Banner slider: slides stacked in one grid cell, so the height is that of the tallest */
.lv-banners {
	position: relative;
	padding: 0;
}

.lv-banner-track {
	display: grid;
}

.lv-banner {
	grid-area: 1 / 1;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 88px 24px 56px;
	background-size: cover;
	background-position: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0.6s;
}

.lv-banner.is-active {
	opacity: 1;
	visibility: visible;
}

.lv-banner-inner {
	position: relative;
	max-width: var(--lv-max-width);
	margin: 0 auto;
}

.lv-banner h1,
.lv-banner h2 {
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 12px;
}

.lv-banner p {
	font-size: clamp(16px, 2vw, 21px);
	color: var(--lv-fg-muted);
	margin: 0;
}

.lv-banner.has-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.42);
}

.lv-banner.has-image h1,
.lv-banner.has-image h2,
.lv-banner.has-image p {
	color: #fff;
}

.lv-banner-btn {
	display: inline-block;
	margin-top: 20px;
	padding: 12px 24px;
	border-radius: 980px;
	background: var(--lv-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.lv-banner--picture {
	padding: 0 0 28px;
	display: block;
}

.lv-banner--picture a,
.lv-banner--picture picture,
.lv-banner--picture img {
	display: block;
	width: 100%;
}

.lv-banner--picture img {
	height: auto;
	aspect-ratio: 3 / 1;
	object-fit: cover;
}

@media (max-width: 700px) {
	/* With a mobile version the ratio is 4:3; without one the desktop image is shown whole. */
	.lv-banner--picture.has-mobile img {
		aspect-ratio: 4 / 3;
	}

	.lv-banner--picture:not(.has-mobile) img {
		aspect-ratio: auto;
	}
}

.lv-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lv-banner-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.lv-banner-dots {
	width: max-content;
	margin: 0 auto;
	padding: 5px 9px;
	border-radius: 980px;
	background: rgba(255, 255, 255, 0.75);
}

.lv-banner-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(120, 120, 128, 0.4);
	cursor: pointer;
}

.lv-banner-dot.is-active {
	background: var(--lv-accent);
}

@media (prefers-reduced-motion: reduce) {
	.lv-banner {
		transition: none;
	}
}

/* Category grid */
.lv-category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	padding: 0 0 96px;
	list-style: none;
	margin: 0;
}

.lv-category-tile {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--lv-radius);
	overflow: hidden;
	background: #f5f5f7 center/cover no-repeat;
	transition: transform 0.25s ease;
}

.lv-category-tile:hover {
	transform: translateY(-2px);
}

.lv-category-tile-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 20px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}

.lv-category-tile-name {
	color: #fff;
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.lv-category-tile-count {
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	margin-top: 2px;
}

/* Category archive / product loop */
.lv-archive-header {
	padding: 56px 0 32px;
	text-align: center;
}

.lv-archive-header h1 {
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0;
}

ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0 0 96px;
	padding: 0;
}

ul.products li.product {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--lv-border);
	border-radius: var(--lv-radius);
	padding: 20px;
	text-align: center;
	background: #fff;
}

/* A fixed height (not aspect-ratio, which WordPress's srcset/sizes attributes
   fight with on these <img> tags) keeps every card's image slot identical
   regardless of the source photo's own proportions. */
ul.products li.product img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: contain;
	margin-bottom: 12px;
}

ul.products li.product h2 {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 6px;
}

ul.products li.product .price {
	color: var(--lv-fg-muted);
	font-size: 14px;
	margin-bottom: 14px;
	display: block;
}

/* Pinned to the bottom of the flex column so it lines up across a row no
   matter how many lines the title/price above it take up. */
ul.products li.product .button {
	margin-top: auto;
	display: inline-block;
	width: 100%;
	padding: 10px 16px;
	border-radius: 980px;
	background: var(--lv-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
}

ul.products li.product .added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: var(--lv-accent);
}

/* Single product page. WooCommerce stamps the class "product" on both the
   single-product wrapper (a <div>) AND every <li> in any product grid
   (archives, related products) — scope to div + .single-product body class
   so this doesn't leak into loop cards elsewhere. */
.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 56px;
	padding: 48px 0 64px;
	align-items: start;
}

.woocommerce-product-gallery__wrapper {
	margin: 0;
}

.woocommerce-product-gallery img {
	width: 100%;
	border-radius: var(--lv-radius);
	background: #f5f5f7;
}

.lv-gallery-main {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--lv-radius);
	background: #e9eef8;
	overflow: hidden;
}

.lv-gallery-main img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 0;
	background: transparent;
}

.single-product div.product > .woocommerce-product-gallery {
	grid-column: 1;
	grid-row: 1;
}

.single-product div.product > .summary {
	grid-column: 2;
	grid-row: 1 / span 2;
}

.lv-extra-image {
	grid-column: 1;
	grid-row: 2;
	min-width: 0;
}

.lv-extra-image img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--lv-radius);
}

.lv-product-desc {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--lv-border, #e5e5ea);
	font-size: 16px;
	line-height: 1.6;
}

.lv-product-desc h2,
.lv-product-desc h3 {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 24px 0 10px;
}

.lv-product-desc p {
	margin: 0 0 14px;
}

.lv-product-desc img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--lv-radius);
}

.lv-product-desc ul {
	margin: 0 0 14px;
	padding-left: 20px;
}

.lv-product-desc li {
	margin-bottom: 6px;
}

.summary table.variations {
	width: 100%;
	margin: 0 0 16px;
	border-collapse: collapse;
}

.summary table.variations th,
.summary table.variations td {
	display: block;
	padding: 0;
	text-align: left;
}

.summary table.variations label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	color: var(--lv-fg-muted);
}

.summary table.variations select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #d2d2d7;
	border-radius: 12px;
	background: #fff;
	font-size: 16px;
}

.summary .reset_variations {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
}

.summary .woocommerce-variation-price {
	margin-bottom: 16px;
	font-size: 20px;
}

.lv-addon {
	flex: 0 0 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #e5e5ea;
	border-radius: 12px;
	font-size: 15px;
	cursor: pointer;
}

.lv-addon-thumb {
	width: 44px;
	height: 44px;
	margin-left: auto;
	border-radius: 8px;
	object-fit: cover;
	flex: none;
}

.lv-addon-text {
	flex: 0 0 100%;
	margin: -6px 0 16px;
	padding: 10px 14px;
	border: 1px solid #d2d2d7;
	border-radius: 12px;
	font-size: 15px;
}

.lv-addon-text[hidden] {
	display: none;
}

.lv-addon input {
	width: 18px;
	height: 18px;
	flex: none;
}

.lv-gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--lv-fg);
	font-size: 26px;
	line-height: 1;
	padding: 0 0 3px;
	cursor: pointer;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.lv-gallery-arrow:hover {
	background: #fff;
}

.lv-gallery-prev { left: 12px; }
.lv-gallery-next { right: 12px; }

.woocommerce-product-details__short-description {
	margin-top: 24px;
}

.woocommerce-product-details__short-description img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #ececf0;
	border-radius: 12px;
}

.woocommerce-product-details__short-description small {
	color: var(--lv-fg-muted);
}

.lv-size-chart-link {
	flex: 0 0 100%;
	margin: -4px 0 4px;
	font-size: 14px;
	color: var(--lv-accent);
	text-decoration: underline;
}

.lv-swatches {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding: 2px 2px 6px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}

.lv-swatch {
	flex: 0 0 68px;
	width: 68px;
	height: 68px;
	padding: 4px;
	border: 2px solid #e5e5ea;
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	scroll-snap-align: center;
	font-size: 11px;
	line-height: 1.1;
}

.lv-swatch img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.lv-swatch:hover {
	border-color: #b8b8c0;
}

.lv-swatch.is-active {
	border-color: var(--lv-accent);
}

.lv-swatch-name {
	color: var(--lv-fg);
	font-weight: 600;
}

.lv-gallery--square .lv-gallery-main {
	aspect-ratio: 1 / 1;
	background: #fff;
	border: 1px solid #ececf0;
}

.lv-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.lv-gallery-thumb {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	background: none;
	cursor: pointer;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.lv-gallery-thumb img {
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.lv-gallery-thumb.is-active {
	border-color: var(--lv-accent);
}

.summary.entry-summary {
	padding-top: 8px;
}

.summary .product_title {
	font-size: clamp(26px, 3vw, 34px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 12px;
}

.summary .price {
	display: block;
	font-size: 22px;
	color: var(--lv-fg);
	margin-bottom: 24px;
}

.summary .price del {
	color: var(--lv-fg-muted);
	margin-right: 8px;
}

.summary form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.summary .quantity {
	margin: 0;
}

.summary .quantity .qty {
	width: 72px;
	max-width: none;
	margin: 0;
	padding: 12px 14px;
	text-align: center;
}

.summary .single_add_to_cart_button {
	border: 0;
	border-radius: 980px;
	padding: 13px 32px;
	background: var(--lv-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}

.summary .product_meta {
	font-size: 13px;
	color: var(--lv-fg-muted);
}

.summary .product_meta a {
	color: var(--lv-fg-muted);
	text-decoration: underline;
}

/* Description / reviews tabs */
.woocommerce-tabs {
	grid-column: 1 / -1;
	border-top: 1px solid var(--lv-border);
	padding-top: 40px;
}

.woocommerce-tabs ul.tabs {
	display: flex;
	gap: 28px;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.woocommerce-tabs ul.tabs li a {
	font-size: 15px;
	font-weight: 500;
	color: var(--lv-fg-muted);
	padding-bottom: 8px;
	display: inline-block;
	border-bottom: 2px solid transparent;
}

.woocommerce-tabs ul.tabs li.active a {
	color: var(--lv-fg);
	border-bottom-color: var(--lv-fg);
}

.woocommerce-tabs .panel {
	max-width: 640px;
	color: var(--lv-fg);
	line-height: 1.6;
}

.related.products {
	grid-column: 1 / -1;
	border-top: 1px solid var(--lv-border);
	padding-top: 40px;
	margin-top: 40px;
}

.related.products > h2 {
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 24px;
}

@media (max-width: 780px) {
	.single-product div.product {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.single-product div.product > .woocommerce-product-gallery,
	.single-product div.product > .summary,
	.lv-extra-image {
		grid-column: 1;
		grid-row: auto;
	}

	.single-product div.product > .summary {
		order: 1;
	}

	.lv-extra-image {
		order: 2;
	}
}

/* Generic WooCommerce forms (order tracking, login/account) */
main {
	padding-bottom: 48px;
}

main input[type="text"],
main input[type="email"],
main input[type="password"],
main input[type="tel"],
main input[type="number"],
.lv-modal input[type="text"],
.lv-modal input[type="email"],
.lv-modal input[type="password"] {
	display: block;
	width: 100%;
	max-width: 360px;
	padding: 10px 14px;
	margin: 6px 0 20px;
	border: 1px solid var(--lv-border);
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
}

main label,
.lv-modal label {
	font-weight: 500;
	font-size: 14px;
}

/* Icon-only toggle whose icon came from the WooCommerce stylesheet we don't load. */
main .show-password-input,
.lv-modal .show-password-input {
	display: none;
}

main .button,
main button[type="submit"],
main input[type="submit"],
.lv-modal .button,
.lv-modal button[type="submit"] {
	display: inline-block;
	padding: 10px 24px;
	border: 0;
	border-radius: 980px;
	background: var(--lv-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

/* Login popup (Inloggen) */
.lv-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lv-modal[hidden] {
	display: none;
}

.lv-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

.lv-modal-panel {
	position: relative;
	width: 90%;
	max-width: 380px;
	max-height: 85vh;
	overflow-y: auto;
	background: #fff;
	border-radius: var(--lv-radius);
	padding: 32px;
}

.lv-modal-panel h3 {
	margin: 0 0 20px;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.lv-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 28px;
	height: 28px;
	border: 0;
	background: none;
	font-size: 20px;
	line-height: 1;
	color: var(--lv-fg-muted);
	cursor: pointer;
}

.lv-modal-close:hover {
	color: var(--lv-fg);
}

/* Footer */
.lv-footer {
	border-top: 1px solid var(--lv-border);
	padding: 32px 0;
	text-align: center;
	color: var(--lv-fg-muted);
	font-size: 12px;
}

.lv-footer-links {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-bottom: 12px;
	font-size: 13px;
}

.lv-footer-links a {
	color: var(--lv-fg-muted);
}

.lv-footer-links a:hover {
	color: var(--lv-fg);
}

/* Checkout address autocomplete dropdown (BE: Geopunt, NL: PDOK). */
.lv-addr-suggest {
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 0;
	right: 0;
	margin: 4px 0 0;
	padding: 4px 0;
	list-style: none;
	background: var(--lv-bg, #fff);
	border: 1px solid var(--lv-border);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 240px;
	overflow-y: auto;
}

.lv-addr-suggest li {
	padding: 9px 14px;
	font-size: 14px;
	cursor: pointer;
}

.lv-addr-suggest li:hover,
.lv-addr-suggest li:focus {
	background: var(--lv-bg-muted, #f5f5f7);
}
