/* ==========================================================================
   Jolines — Homepage Categories
   Shortcode: [jolines_homepage_categories]
   Mobile-first; scroll-layout op mobiel/tablet, grid op desktop.
   ========================================================================== */

.jol-hpcat {
	--hp-bg:        #faf8f5;
	--hp-card:      #ffffff;
	--hp-warm-1:    #f5efe8;
	--hp-warm-2:    #ebe3d8;
	--hp-accent:    #c4916a;
	--hp-accent-h:  #ae7d58;
	--hp-text:      #3b3029;
	--hp-text-mid:  #6d5e53;
	--hp-text-soft: #9c8d82;
	--hp-border:    #ebe3d8;
	--hp-shadow-sm: 0 1px 8px rgba(59,48,41,0.04);
	--hp-shadow-md: 0 4px 20px rgba(59,48,41,0.07);
	--hp-radius:    16px;
	--hp-radius-sm: 12px;

	background: var(--hp-bg);
	color: var(--hp-text);
	font-family: 'Poppins', 'Nunito', system-ui, sans-serif;
	margin: 0 auto;
	padding: 0.5rem 0 1rem;
	box-sizing: border-box;
}

.jol-hpcat *,
.jol-hpcat *::before,
.jol-hpcat *::after { box-sizing: border-box; }

.jol-hpcat img { display: block; max-width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Section wrapper
   -------------------------------------------------------------------------- */
.jol-hpcat__section {
	padding: 1.25rem 0 0.25rem;
}

.jol-hpcat__section + .jol-hpcat__section {
	border-top: 1px solid var(--hp-border);
	margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Section header
   -------------------------------------------------------------------------- */
.jol-hpcat__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0 1.125rem;
	margin-bottom: 0.875rem;
}

.jol-hpcat__head-text {
	min-width: 0;
}

.jol-hpcat__tag {
	display: inline-block;
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.125em;
	color: var(--hp-accent);
	margin-bottom: 0.25rem;
}

.jol-hpcat__title {
	font-family: 'Playfair Display', 'Cormorant Garamond', serif;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--hp-text);
	line-height: 1.1;
	margin: 0;
}

.jol-hpcat__link {
	display: inline-flex;
	align-items: center;
	gap: 0.15rem;
	font-size: 0.785rem;
	color: var(--hp-accent);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	padding-bottom: 2px;
	border-bottom: 1.5px solid transparent;
	transition: border-color 0.2s, color 0.2s;
}

.jol-hpcat__link:hover,
.jol-hpcat__link:focus-visible {
	border-bottom-color: var(--hp-accent);
	color: var(--hp-accent-h);
}

.jol-hpcat__link svg {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   SCROLL ROW (mobile + tablet)
   -------------------------------------------------------------------------- */
.jol-hpcat__scroll {
	display: flex;
	gap: 0.7rem;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.25rem 1.125rem 1.125rem;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.jol-hpcat__scroll::-webkit-scrollbar { display: none; }

/* Scroll card */
.jol-hpcat__scard {
	flex: 0 0 138px;
	scroll-snap-align: start;
	background: var(--hp-card);
	border-radius: var(--hp-radius);
	overflow: hidden;
	box-shadow: var(--hp-shadow-sm);
	border: 1px solid var(--hp-border);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jol-hpcat__scard:hover,
.jol-hpcat__scard:focus-visible {
	transform: translateY(-3px);
	box-shadow: var(--hp-shadow-md);
	color: inherit;
	outline: none;
}

.jol-hpcat__scard-img {
	height: 118px;
	overflow: hidden;
	background: var(--hp-warm-2);
	position: relative;
}

.jol-hpcat__scard-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.jol-hpcat__scard:hover .jol-hpcat__scard-img img {
	transform: scale(1.06);
}

.jol-hpcat__scard-body {
	padding: 0.6rem 0.7rem 0.75rem;
}

.jol-hpcat__scard-name {
	display: block;
	font-size: 0.815rem;
	font-weight: 700;
	color: var(--hp-text);
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* --------------------------------------------------------------------------
   GRID (3 cols mobile, 4 cols desktop)
   -------------------------------------------------------------------------- */
.jol-hpcat__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.625rem;
	padding: 0.25rem 1.125rem 1.125rem;
}

/* Grid card */
.jol-hpcat__gcard {
	background: var(--hp-card);
	border-radius: var(--hp-radius-sm);
	overflow: hidden;
	box-shadow: var(--hp-shadow-sm);
	border: 1px solid var(--hp-border);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}

.jol-hpcat__gcard:hover,
.jol-hpcat__gcard:focus-visible {
	transform: translateY(-3px);
	box-shadow: var(--hp-shadow-md);
	color: inherit;
	outline: none;
}

.jol-hpcat__gcard-img {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--hp-warm-2);
}

.jol-hpcat__gcard-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.jol-hpcat__gcard:hover .jol-hpcat__gcard-img img {
	transform: scale(1.06);
}

.jol-hpcat__gcard-body {
	padding: 0.5rem 0.45rem 0.65rem;
	text-align: center;
}

.jol-hpcat__gcard-name {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--hp-text);
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* --------------------------------------------------------------------------
   TILES SECTION (losse hoofdcategorieën als grote tegels)
   -------------------------------------------------------------------------- */
.jol-hpcat__section--tiles {
	padding: 1.5rem 0 0.5rem;
}

.jol-hpcat__head--tiles {
	margin-bottom: 1rem;
}

.jol-hpcat__head--tiles .jol-hpcat__title {
	font-size: 1.3rem;
}

.jol-hpcat__tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
	padding: 0 1.125rem 1.125rem;
}

/* Bij oneven aantal tegels op mobiel: laatste tegel over volle breedte */
.jol-hpcat__section--tiles[data-count="1"] .jol-hpcat__tiles { grid-template-columns: 1fr; }
.jol-hpcat__section--tiles[data-count="3"] .jol-hpcat__tile:last-child { grid-column: 1 / -1; }

.jol-hpcat__tile {
	background: var(--hp-card);
	border-radius: var(--hp-radius);
	overflow: hidden;
	box-shadow: var(--hp-shadow-sm);
	border: 1px solid var(--hp-border);
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jol-hpcat__tile:hover,
.jol-hpcat__tile:focus-visible {
	transform: translateY(-3px);
	box-shadow: var(--hp-shadow-md);
	color: inherit;
	outline: none;
}

.jol-hpcat__tile-img {
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: var(--hp-warm-2);
}

.jol-hpcat__tile-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.jol-hpcat__tile:hover .jol-hpcat__tile-img img {
	transform: scale(1.05);
}

.jol-hpcat__tile-body {
	padding: 0.75rem 0.85rem 0.95rem;
}

.jol-hpcat__tile-name {
	display: block;
	font-family: 'Playfair Display', 'Cormorant Garamond', serif;
	font-size: 1rem;
	font-weight: 700;
	color: var(--hp-text);
	line-height: 1.2;
}

/* ==========================================================================
   TABLET (≥ 600px)
   ========================================================================== */
@media (min-width: 600px) {
	.jol-hpcat__head     { padding: 0 1.5rem; }
	.jol-hpcat__scroll   { padding-left: 1.5rem; padding-right: 1.5rem; }
	.jol-hpcat__grid     { padding-left: 1.5rem; padding-right: 1.5rem; grid-template-columns: repeat(4, 1fr); }

	.jol-hpcat__title    { font-size: 1.55rem; }
	.jol-hpcat__scard    { flex-basis: 165px; }
	.jol-hpcat__scard-img { height: 142px; }
	.jol-hpcat__scard-name { font-size: 0.87rem; }

	.jol-hpcat__gcard-name { font-size: 0.82rem; }

	/* Tiles: 3 kolommen vanaf tablet — laatste tegel niet meer over volle breedte */
	.jol-hpcat__tiles { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
	.jol-hpcat__section--tiles[data-count="3"] .jol-hpcat__tile:last-child { grid-column: auto; }
	.jol-hpcat__tile-name { font-size: 1.1rem; }
	.jol-hpcat__head--tiles .jol-hpcat__title { font-size: 1.55rem; }
}

/* ==========================================================================
   DESKTOP (≥ 1024px) — centrale 1280px kolom + 4-col grids
   ========================================================================== */
@media (min-width: 1024px) {
	/* Centrale kolom — voorkomt "uitgerekt" gevoel op brede schermen */
	.jol-hpcat {
		max-width: 1280px;
		margin: 0 auto;
	}

	.jol-hpcat__section { padding: 2.25rem 0 0.5rem; }

	.jol-hpcat__head {
		padding: 0 1.5rem;
		margin-bottom: 1.4rem;
	}

	.jol-hpcat__title { font-size: 2.1rem; }
	.jol-hpcat__link  { font-size: 0.9rem; }

	/* Scroll row → 4-koloms flex (8 items = nette 2×4, laatste rij gecentreerd
	   bij oneven aantallen zoals Haaraccessoires met 5 subs) */
	.jol-hpcat__scroll {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 1rem;
		overflow: visible;
		padding: 0.5rem 1.5rem 1.5rem;
		scroll-snap-type: none;
	}

	.jol-hpcat__scard {
		flex: 0 0 calc(25% - 0.75rem);
		scroll-snap-align: none;
	}

	.jol-hpcat__scard-img  { height: 220px; }
	.jol-hpcat__scard-body { padding: 0.95rem 1.1rem 1.1rem; }
	.jol-hpcat__scard-name { font-size: 1rem; }
	/* Grid layout (sokjes etc.) — 4 cols op desktop (van 6) */
	.jol-hpcat__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 1rem;
		padding: 0.5rem 1.5rem 1.5rem;
	}

	.jol-hpcat__gcard-body { padding: 0.85rem 0.7rem 0.95rem; }
	.jol-hpcat__gcard-name { font-size: 0.95rem; }
	/* Tiles op desktop: ruimere padding en grotere tekst */
	.jol-hpcat__tiles {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
		gap: 1.25rem;
	}
	.jol-hpcat__head--tiles { padding: 0 1.5rem; }
	.jol-hpcat__head--tiles .jol-hpcat__title { font-size: 1.75rem; }
	.jol-hpcat__tile-body { padding: 1rem 1.15rem 1.2rem; }
	.jol-hpcat__tile-name { font-size: 1.2rem; }
}

/* ==========================================================================
   DESKTOP XL (≥ 1280px) — iets ruimere container
   ========================================================================== */
@media (min-width: 1280px) {
	.jol-hpcat__head    { padding: 0 2.5rem; }
	.jol-hpcat__scroll,
	.jol-hpcat__grid    { padding-left: 2.5rem; padding-right: 2.5rem; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.jol-hpcat__scard,
	.jol-hpcat__gcard,
	.jol-hpcat__scard-img img,
	.jol-hpcat__gcard-img img {
		transition: none !important;
	}

	.jol-hpcat__scard:hover,
	.jol-hpcat__gcard:hover {
		transform: none;
	}

	.jol-hpcat__scard:hover .jol-hpcat__scard-img img,
	.jol-hpcat__gcard:hover .jol-hpcat__gcard-img img {
		transform: none;
	}
}

/* ==========================================================================
   HIGHLIGHT SECTION — voor seizoensgebonden push (zomer/zwem etc.)
   ========================================================================== */
.jol-hpcat__section--highlight {
	position: relative;
	background: linear-gradient(135deg, #F4EBDD 0%, #E9D8C2 45%, #F1E6D5 100%);
	border-radius: 24px;
	margin: 32px 16px 40px;
	padding: 32px 24px;
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(111, 90, 79, 0.12);
}

.jol-hpcat__section--highlight::before {
	content: "☀";
	position: absolute;
	top: -48px;
	right: -16px;
	font-size: 220px;
	line-height: 1;
	color: #E4C79A;
	opacity: .5;
	pointer-events: none;
	transform: rotate(8deg);
}

.jol-hpcat__section--highlight .jol-hpcat__head {
	position: relative;
	z-index: 1;
}

.jol-hpcat__section--highlight .jol-hpcat__tag {
	background: linear-gradient(135deg, #9C7C64, #6F5A4F);
	color: #fff;
	border: none;
	font-weight: 700;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 8px rgba(111, 90, 79, 0.28);
}

.jol-hpcat__section--highlight .jol-hpcat__title {
	color: #3b3029;
}

.jol-hpcat__section--highlight .jol-hpcat__link {
	color: #3b3029;
}

.jol-hpcat__section--highlight .jol-hpcat__scard,
.jol-hpcat__section--highlight .jol-hpcat__gcard {
	background: #fff;
	box-shadow: 0 4px 12px rgba(111, 90, 79, 0.10);
}

@media (max-width: 600px) {
	.jol-hpcat__section--highlight {
		margin: 24px 12px 32px;
		padding: 24px 16px;
		border-radius: 18px;
	}
	.jol-hpcat__section--highlight::before {
		font-size: 140px;
		top: -28px;
		right: -8px;
	}
}
