/**
 * JG Menu - public styles.
 *
 * Desktop (>= 992px): horizontal bar, CSS-driven hover/focus mega panel
 * (no JS needed to open, so it is instant), image/advert box on the right.
 * Mobile (< 992px): slide-out drawer with accordion, images hidden.
 */

.jgmn-nav,
.jgmn-nav * {
	box-sizing: border-box;
}

.jgmn-nav {
	position: relative;
	z-index: 9990;
	background: #fff;
	border-bottom: 1px solid #e2e2e2;
	font-family: inherit;
}

.jgmn-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jgmn-nav a {
	text-decoration: none;
	color: #1a1a1a;
}

.jgmn-nav .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/* Top bar                                                             */
/* ------------------------------------------------------------------ */

.jgmn-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	max-width: 1280px;
	margin: 0 auto;
}

.jgmn-item-d0 > .jgmn-top-link {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 14px 16px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.jgmn-caret {
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	flex: 0 0 auto;
}

/* ------------------------------------------------------------------ */
/* Mega panel (desktop)                                                */
/* ------------------------------------------------------------------ */

.jgmn-panel {
	display: none;
}

.jgmn-expand,
.jgmn-toggle,
.jgmn-close,
.jgmn-drawer-head {
	display: none;
}

@media (min-width: 992px) {

	.jgmn-item-d0 {
		position: static;
	}

	.jgmn-panel {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background: #fff;
		border-top: 1px solid #e2e2e2;
		box-shadow: 0 14px 24px rgba(0, 0, 0, 0.14);
		z-index: 9991;
	}

	/* CSS-only open: instant, works without JS. JS adds .jgmn-open for
	   keyboard/touch and Escape handling. */
	.jgmn-item-d0:hover > .jgmn-panel,
	.jgmn-item-d0:focus-within > .jgmn-panel,
	.jgmn-item-d0.jgmn-open > .jgmn-panel {
		display: block;
	}

	.jgmn-item-d0:hover > .jgmn-top-link,
	.jgmn-item-d0:focus-within > .jgmn-top-link,
	.jgmn-item-d0.jgmn-open > .jgmn-top-link {
		box-shadow: inset 0 -3px 0 #1a1a1a;
	}

	.jgmn-panel-inner {
		display: flex;
		align-items: stretch;
		max-width: 1280px;
		margin: 0 auto;
		padding: 24px 16px;
		gap: 24px;
	}

	.jgmn-cols {
		flex: 1 1 auto;
		display: flex;
		flex-wrap: wrap;
		align-content: flex-start;
		gap: 24px 32px;
	}

	.jgmn-item-d1 {
		flex: 0 0 auto;
		width: 200px;
	}

	.jgmn-col-heading {
		display: block;
		font-size: 14px;
		font-weight: 700;
		padding-bottom: 8px;
		margin-bottom: 4px;
		border-bottom: 1px solid #eee;
	}

	.jgmn-col-links .jgmn-link {
		display: block;
		font-size: 13px;
		padding: 5px 0;
		color: #444;
	}

	.jgmn-col-links .jgmn-link:hover,
	.jgmn-col-heading:hover {
		text-decoration: underline;
	}

	/* Advert column on the right (holds one or two advert boxes) */
	.jgmn-media-col {
		flex: 0 0 320px;
		max-width: 320px;
		border-left: 1px solid #eee;
		padding-left: 24px;
		align-self: stretch;
		display: flex;
		flex-direction: column;
		gap: 24px;
	}

	.jgmn-media {
		width: 100%;
	}

	.jgmn-media-img {
		display: block;
		width: 100%;
		height: auto;
		max-height: 420px;
		object-fit: cover;
		border-radius: 4px;
	}

	/* Second advert (revealed by JS when the panel is tall enough) */
	.jgmn-media-2 {
		padding-top: 24px;
		border-top: 1px solid #eee;
	}

	/* Caption under the advert image */
	.jgmn-media-caption {
		margin-top: 10px;
		font-size: 13px;
		line-height: 1.45;
	}

	.jgmn-cap {
		display: block;
		color: #1a1a1a;
	}

	a.jgmn-cap:hover .jgmn-cap-name {
		text-decoration: underline;
	}

	.jgmn-cap-name {
		display: block;
		margin-bottom: 2px;
	}

	.jgmn-cap-line {
		display: block;
	}

	/* Short sub-category description */
	.jgmn-cap-desc {
		display: block;
		color: #555;
		margin-bottom: 6px;
	}

	/* Highlighted product block inside a category caption */
	.jgmn-cap-product {
		display: block;
		color: #1a1a1a;
		margin-top: 4px;
		padding-top: 6px;
		border-top: 1px solid #eee;
	}

	.jgmn-cap-product:hover .jgmn-cap-name {
		text-decoration: underline;
	}

	/* "Shop all ..." call to action */
	.jgmn-cap-cta {
		display: block;
		margin-top: 8px;
		font-weight: 700;
		color: #1a1a1a;
	}

	.jgmn-cap-cta:hover {
		text-decoration: underline;
	}

	.jgmn-cap-pop {
		display: block;
		margin-top: 4px;
		color: #b45309;
		font-weight: 600;
	}

	.jgmn-cap-stock {
		display: block;
		margin-top: 2px;
		color: #d40000;
		font-weight: 700;
	}

	.jgmn-cap-sale {
		display: inline-block;
		background: #d40000;
		color: #fff;
		font-size: 11px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		padding: 2px 7px;
		border-radius: 3px;
		margin-right: 6px;
	}

	.jgmn-cap-name {
		font-weight: 600;
	}

	.jgmn-cap-price {
		white-space: nowrap;
	}

	.jgmn-cap-price del {
		color: #888;
		margin-right: 4px;
	}

	.jgmn-cap-price ins {
		text-decoration: none;
		font-weight: 700;
	}

	.jgmn-cap-save {
		color: #d40000;
		font-weight: 600;
		white-space: nowrap;
	}

	/* Image-only panel (top-level item with images but no sub-items) */
	.jgmn-panel-media-only {
		justify-content: flex-end;
	}

	.jgmn-panel-media-only .jgmn-media-col {
		border-left: 0;
		padding-left: 0;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile drawer (< 992px)                                             */
/* ------------------------------------------------------------------ */

@media (max-width: 991px) {

	.jgmn-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		margin: 8px 12px;
		padding: 8px 12px;
		background: none;
		border: 1px solid #ccc;
		border-radius: 4px;
		font-size: 15px;
		font-weight: 600;
		cursor: pointer;
		color: #1a1a1a;
	}

	.jgmn-toggle-icon {
		display: inline-flex;
		flex-direction: column;
		gap: 4px;
	}

	.jgmn-toggle-icon span {
		display: block;
		width: 18px;
		height: 2px;
		background: #1a1a1a;
	}

	.jgmn-bar-wrap {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(320px, 85vw);
		background: #fff;
		z-index: 99999;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		transform: translateX(-105%);
		transition: transform 0.22s ease;
		box-shadow: 2px 0 18px rgba(0, 0, 0, 0.25);
	}

	.jgmn-drawer-open .jgmn-bar-wrap {
		transform: none;
	}

	.jgmn-drawer-head {
		display: flex;
		justify-content: flex-end;
		padding: 6px;
		border-bottom: 1px solid #eee;
	}

	.jgmn-close {
		display: inline-block;
		background: none;
		border: 0;
		font-size: 26px;
		line-height: 1;
		padding: 6px 10px;
		cursor: pointer;
		color: #1a1a1a;
	}

	.jgmn-backdrop {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.45);
		z-index: 99998;
	}

	.jgmn-bar {
		display: block;
	}

	.jgmn-item {
		position: relative;
		border-bottom: 1px solid #f0f0f0;
	}

	.jgmn-item-d0 > .jgmn-top-link,
	.jgmn-col-heading,
	.jgmn-link {
		display: block;
		padding: 12px 44px 12px 16px;
		font-size: 15px;
	}

	.jgmn-col-heading {
		font-weight: 600;
		padding-left: 28px;
	}

	.jgmn-link {
		padding-left: 40px;
		font-size: 14px;
		color: #444;
	}

	.jgmn-caret {
		display: none;
	}

	/* Accordion expander button */
	.jgmn-expand {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		width: 44px;
		height: 44px;
		background: none;
		border: 0;
		cursor: pointer;
	}

	.jgmn-expand::before {
		content: "";
		display: block;
		width: 8px;
		height: 8px;
		margin: 0 auto;
		border-right: 2px solid #1a1a1a;
		border-bottom: 2px solid #1a1a1a;
		transform: rotate(45deg);
		transition: transform 0.15s ease;
	}

	.jgmn-item.jgmn-open > .jgmn-expand::before {
		transform: rotate(225deg);
	}

	/* Accordion: closed by default, opened per item by JS */
	.jgmn-panel,
	.jgmn-col-links {
		display: none;
	}

	.jgmn-item.jgmn-open > .jgmn-panel,
	.jgmn-item.jgmn-open > .jgmn-col-links {
		display: block;
	}

	/* No images on mobile - nothing is downloaded */
	.jgmn-media-col {
		display: none;
	}
}

/* Lock page scroll while the drawer is open */
.jgmn-no-scroll {
	overflow: hidden;
}
