/* ==========================================================================
   Galvenā izvēlne ar mega paneļiem (Uldis 21.11.2026)
   Marķējums: inc/mega-menu.php. Uzvedība: assets/js/theme.js («Galvenā izvēlne»).
   Dators ≥1025px: paneļi zem galvenes. Telefons ≤1024px: atvilknis + akordeons.
   Robeža 1024/1025 ir tā pati, kas style.css (.gk-nav-toggle) un theme.js cenu joslai.
   ========================================================================== */

.gk-nav { gap: 0; }
/* Tēmā nav globāla border-box — bez šī min-height + padding sasummējas (telefonā rindas 60–84px). */
.gk-mm,
.gk-mm *,
.gk-mm-mobile,
.gk-mm-mobile * { box-sizing: border-box; }
.gk-mm,
.gk-mm ul { list-style: none; margin: 0; padding: 0; }
.gk-mm { display: flex; align-items: center; gap: 2px; }
.gk-mm__item { position: relative; }

.gk-nav .gk-mm__top {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 12px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--gk-primary);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.gk-nav .gk-mm__top:hover,
.gk-mm__item.is-open > .gk-mm__top { background: rgba(17, 24, 39, .05); color: var(--gk-dark); }
.gk-nav .gk-mm__top[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gk-gold); border-radius: 6px 6px 0 0; }
.gk-mm__chev { flex: none; opacity: .55; transition: transform .2s ease; }
.gk-mm__item.is-open .gk-mm__chev { transform: rotate(180deg); opacity: .9; }
.gk-nav .gk-mm__top:focus-visible,
.gk-mm-panel a:focus-visible { outline: 2px solid var(--gk-gold); outline-offset: 2px; }

/* ---------- Paneļi (kopīgi) ---------- */
.gk-mm-panel a { color: var(--gk-primary); text-decoration: none; }
.gk-mm-col__h {
	margin: 0 0 10px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gk-gray);
}
.gk-mm-col ul a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	margin: 0 -8px;
	border-radius: 6px;
	font-size: 0.9375rem;
	line-height: 1.3;
	transition: background-color .12s ease, color .12s ease;
}
.gk-mm-col ul a:hover { background: #f6f4ee; color: var(--gk-dark); }
.gk-mm-panel a[aria-current="page"] { font-weight: 600; color: var(--gk-dark); box-shadow: inset 3px 0 0 var(--gk-gold); }

/* Materiālu paraugi — lai izvēlnē redz, kā materiāls izskatās */
.gk-mm-sw {
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 5px;
	border: 1px solid rgba(17, 24, 39, .14);
	background: #f3f4f6;
}
.gk-mm-sw--clear  { background: repeating-conic-gradient(#dfe3e8 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.gk-mm-sw--holo   { background: linear-gradient(135deg, #9be7ff, #f7a8ff 35%, #fff59b 65%, #9bffc8); }
.gk-mm-sw--pe     { background: linear-gradient(160deg, #e0f0ff, #8fc1ea); }
.gk-mm-sw--eco    { background: linear-gradient(160deg, #ddcfb0, #b0966a); }
.gk-mm-sw--frost  { background: linear-gradient(160deg, #f4fbff, #bfe0f3); }
.gk-mm-sw--wine   { background: linear-gradient(160deg, #f3eddf, #d6c8aa); }
.gk-mm-sw--thermo { background: #fff linear-gradient(90deg, #111827 0 2px, transparent 2px 5px, #111827 5px 6px, transparent 6px 8px, #111827 8px 11px, transparent 11px 13px, #111827 13px 14px, transparent 14px) 3px 4px / 15px 12px no-repeat; }
.gk-mm-sw--gold   { background: conic-gradient(from 210deg, #f7d774, #c98a0c, #f5e2a0, #b37400, #f7d774); }
.gk-mm-sw--gift   { background: linear-gradient(90deg, transparent 9px, #f0b429 9px 12px, transparent 12px), linear-gradient(0deg, transparent 9px, #f0b429 9px 12px, transparent 12px), #c2410c; }
.gk-mm-sw--promo  { background: linear-gradient(135deg, #f0b429 0 50%, #ef4444 50%); }

/* Tumšā karte ar galveno darbību */
.gk-mm-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
	border-radius: 8px;
	background: #111827;
	color: #f9fafb;
}
.gk-mm-card p { margin: 0; }
.gk-mm-card__eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #f0b429; }
.gk-mm-card__title { font-size: 1.125rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.gk-mm-card__text { font-size: 0.875rem; line-height: 1.5; color: #cbd5e1; }
.gk-mm-panel .gk-mm-card__cta {
	align-self: flex-start;
	margin-top: auto;
	padding: 10px 16px;
	border-radius: 6px;
	background: #f0b429;
	color: #111827;
	font-size: 0.9375rem;
	font-weight: 700;
}
.gk-mm-panel .gk-mm-card__cta:hover { background: #f5c451; color: #111827; }

.gk-mm-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid #eceae4;
}
.gk-mm-panel .gk-mm-foot a { font-size: 0.9375rem; font-weight: 600; color: #a35d00; }
.gk-mm-panel .gk-mm-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Kompaktais saraksts ar aprakstiem («Cenas», «Par mums») */
.gk-mm-list a { display: block; padding: 10px 12px; border-radius: 6px; transition: background-color .12s ease; }
.gk-mm-list a:hover { background: #f6f4ee; }
.gk-mm-list strong { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--gk-dark); }
.gk-mm-list small { display: block; margin-top: 2px; font-size: 0.8125rem; line-height: 1.4; color: var(--gk-gray); }

.gk-mm-mobile { display: none; }
.gk-mm__short { display: none; }

/* ==========================================================================
   Dators
   ========================================================================== */
@media (min-width: 1025px) {
	.gk-mm-panel {
		visibility: hidden;
		opacity: 0;
		transform: translateY(-6px);
		transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
	}
	.gk-mm__item.is-open > .gk-mm-panel {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition: opacity .16s ease, transform .16s ease, visibility 0s;
	}

	/* Mega: pilnā platumā zem galvenes. .gk-header ir backdrop-filter → fixed skaitās pret galveni. */
	.gk-mm-panel--mega {
		position: fixed;
		top: 72px;
		left: 0;
		right: 0;
		background: #fff;
		border-top: 1px solid rgba(0, 0, 0, .06);
		/* Pelēks plīvurs tikai ZEM paneļa (lapa fonā aptumšojas), galvene paliek gaiša */
		box-shadow: 0 24px 40px -24px rgba(15, 23, 42, .25), 0 0 0 100vmax rgba(15, 23, 42, .18);
		clip-path: inset(0 -100vmax -100vmax -100vmax);
		max-height: calc(100vh - 72px);
		overflow-y: auto;
	}
	.gk-mm-panel--mega .gk-mm-panel__inner {
		max-width: var(--container);
		margin: 0 auto;
		padding: 28px clamp(1rem, 4vw, 2rem) 24px;
	}
	.gk-mm-grid {
		display: grid;
		grid-template-columns: repeat(var(--gk-mm-cols, 3), minmax(0, 1fr)) 280px;
		gap: 32px;
		align-items: start;
	}
	.gk-mm-col--split { grid-column: span 2; }
	.gk-mm-col--split ul { columns: 2; column-gap: 32px; }
	.gk-mm-col--split li { break-inside: avoid; }
	.gk-mm-card { align-self: start; }
	.gk-mm-panel .gk-mm-card__cta { margin-top: 10px; }

	/* Kompaktais: zem paša punkta; ::before tilts, lai pele nepazaudē paneli spraugā */
	.gk-mm-panel--list {
		position: absolute;
		top: calc(100% + 17px);
		left: 50%;
		width: 330px;
		margin-left: -165px;
		padding: 8px;
		background: #fff;
		border: 1px solid rgba(0, 0, 0, .07);
		border-radius: 8px;
		box-shadow: 0 18px 40px -14px rgba(15, 23, 42, .28);
	}
	.gk-mm-panel--list::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
}
@media (min-width: 1025px) and (max-width: 1199px) {
	.gk-mm-grid { grid-template-columns: repeat(var(--gk-mm-cols, 3), minmax(0, 1fr)) 220px; gap: 24px; }
	.gk-mm-col--split ul { column-gap: 24px; }
}
/* Vietas budžets galvenē (mērīts Playwright 21.11.2026): logo 93 + izvēlne ~615 + darbības.
   Datorā groza vārds paliek tikai ikona ar skaitu; 1025–1279px arī tālrunis ikona un īsais punkta nosaukums.
   Platums virs ~1380px vairs neaug (--container 1200px), tāpēc 1440px mērījums der visiem lielajiem ekrāniem. */
@media (min-width: 1025px) {
	.gk-nav .gk-mm__top { padding: 9px 10px; }
	.gk-cart-link-txt { display: none; }
	.gk-header-actions .gk-lang-switch { margin-right: 4px; }
}
@media (min-width: 1025px) and (max-width: 1279px) {
	.gk-nav .gk-mm__top { padding: 9px 8px; }
	.gk-phone-link__num { display: none; }
	.gk-mm__long { display: none; }
	.gk-mm__short { display: inline; }
}

/* ==========================================================================
   Telefons / planšete: atvilknis + akordeons
   ========================================================================== */
@media (max-width: 1024px) {
	html.gk-nav-open { overflow: hidden; }
	.gk-nav.is-open {
		display: block;
		/* bottom:0 nestrādātu — fixed skaitās pret galveni (backdrop-filter), tāpēc augstums tieši */
		height: calc(100vh - 72px);
		height: calc(100dvh - 72px);
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 4px clamp(1rem, 4vw, 2rem) calc(24px + env(safe-area-inset-bottom, 0px));
	}
	.gk-mm { display: block; }
	.gk-mm__item { border-bottom: 1px solid #eceae4; }
	.gk-nav .gk-mm__top {
		display: flex;
		justify-content: space-between;
		width: 100%;
		min-height: 56px;
		padding: 14px 4px;
		border-radius: 0;
		font-size: 1.0625rem;
		font-weight: 600;
		color: var(--gk-dark);
	}
	.gk-nav .gk-mm__top:hover,
	.gk-mm__item.is-open > .gk-mm__top { background: none; }
	.gk-mm__chev { width: 16px; height: 16px; }

	.gk-mm-panel { display: none; padding: 0 0 18px; }
	.gk-mm__item.is-open > .gk-mm-panel { display: block; }

	.gk-mm-grid { display: block; }
	.gk-mm-col + .gk-mm-col { margin-top: 18px; }
	.gk-mm-col ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
	.gk-mm-col ul a { min-height: 44px; padding: 8px; margin: 0; font-size: 0.9375rem; }

	/* Karte telefonā = viena teksta saite (kalkulatora poga jau ir atvilkņa apakšā) */
	.gk-mm-card { margin-top: 14px; padding: 0; background: none; color: inherit; }
	.gk-mm-card__eyebrow,
	.gk-mm-card__title,
	.gk-mm-card__text { display: none; }
	.gk-mm-panel .gk-mm-card__cta { padding: 8px 0; background: none; color: #a35d00; font-weight: 600; }
	.gk-mm-panel .gk-mm-card__cta::after { content: " →"; }
	#gk-mm-products .gk-mm-card { display: none; }
	.gk-mm-foot { margin-top: 12px; padding-top: 10px; flex-direction: column; gap: 4px; }
	.gk-mm-foot a { padding: 8px 0; }

	.gk-mm-list a { padding: 12px 8px; }

	.gk-mm-mobile { display: block; margin-top: 24px; }
	.gk-nav .gk-mm-mobile__cta {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 52px;
		border-radius: 6px;
		background: #f0b429;
		color: #111827;
		font-size: 1.0625rem;
		font-weight: 700;
	}
	.gk-mm-mobile__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 16px 0 0; }
	.gk-nav .gk-mm-mobile__contact a { padding: 8px 0; color: var(--gk-gray); font-size: 0.9375rem; font-weight: 500; }
}
@media (max-width: 359px) {
	.gk-mm-col ul { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.gk-mm-panel,
	.gk-mm__chev,
	.gk-nav .gk-mm__top { transition: none !important; }
}
