/**
 * Tablet layout — 768px to 1180px
 * Targets: iPad Air (820px), iPad Pro (1024px), Surface, landscape/portrait tablets
 *
 * Mobile: max-width 767px (header-responsive.css, mobile-responsive.css)
 * Desktop: min-width 1181px (unchanged)
 */

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL — full-width containers, override legacy style.css ≤1110px rules
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1180px) {
	html {
		-webkit-text-size-adjust: 100%;
	}

	body {
		overflow-x: clip;
	}

	.wrapper,
	body.gl-sp-reference .gl-sp-wrap .wrapper,
	body.gl-sp-reference.single-product .bread-bg .wrapper {
		width: 100% !important;
		max-width: 1280px !important;
		padding-left: max(20px, env(safe-area-inset-left, 0px)) !important;
		padding-right: max(20px, env(safe-area-inset-right, 0px)) !important;
		box-sizing: border-box;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	/* Legacy style.css — do not stack product / shrink gallery on tablet */
	body.gl-sp-reference .slick-initialized .slick-slide img {
		max-height: none !important;
		width: auto !important;
		margin-top: 0 !important;
	}

	body.gl-sp-reference .product .wpgs--with-images,
	body.gl-sp-reference .product .summary.entry-summary,
	body.gl-sp-reference .gl-sp__gallery,
	body.gl-sp-reference .gl-sp__buy {
		width: auto !important;
		max-width: none !important;
	}

	.logo-box-cust,
	.logo-box-cust.hdr-main__inner {
		flex-wrap: nowrap !important;
	}

	.logo-box-cust .logo-left {
		width: auto !important;
		margin: 0 !important;
		text-align: left !important;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER — desktop-like row (768–1180); tuned for iPad Air + iPad Pro
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1180px) {
	.hdr-contact-bar--in-header {
		display: none !important;
	}

	.hdr-contact-bar--below-header {
		display: block !important;
	}

	.hdr-contact-bar--below-header .under-slider-box-cust,
	.hdr-contact-bar--below-header .hdr-contact-bar__grid {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: stretch !important;
		justify-content: stretch !important;
		width: 100% !important;
		padding: 0 !important;
	}

	.hdr-contact-bar--below-header .under-slider-item,
	.hdr-contact-bar--below-header .hdr-contact-bar__cell {
		flex: 1 1 25% !important;
		width: auto !important;
		min-width: 0;
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
		gap: 10px !important;
		padding: 14px clamp(10px, 1.5vw, 18px) !important;
		border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
		border-bottom: none !important;
	}

	.hdr-contact-bar--below-header .under-slider-item:last-child {
		border-right: none !important;
	}

	.hdr-contact-bar--below-header .under-slider-box-cst {
		flex-direction: column !important;
	}

	.hdr-topbar {
		display: flex !important;
	}

	.hdr-topbar .wrapper,
	.site-header .wrapper {
		padding-left: max(20px, env(safe-area-inset-left, 0px));
		padding-right: max(20px, env(safe-area-inset-right, 0px));
		box-sizing: border-box;
	}

	.hdr-main__inner,
	.logo-box-cust.hdr-main__inner,
	.logo-box-cust {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: clamp(12px, 2vw, 18px) !important;
		/* Keep side gutters — shorthand `padding: 14px 0` was wiping wrapper L/R */
		padding-top: 14px !important;
		padding-bottom: 14px !important;
		padding-left: max(20px, env(safe-area-inset-left, 0px)) !important;
		padding-right: max(20px, env(safe-area-inset-right, 0px)) !important;
		grid-template-columns: unset !important;
		grid-template-areas: unset !important;
		width: 100%;
		box-sizing: border-box;
	}

	.hdr-main__row--brand,
	.hdr-logo-link {
		flex: 0 0 auto;
		width: auto !important;
		max-width: none;
		justify-content: flex-start !important;
	}

	.hdr-logo-link .logo-img {
		max-width: clamp(160px, 22vw, 220px);
		max-height: 54px;
		width: auto;
		height: auto;
	}

	.hdr-main__row--search,
	.hdr-search-wrap {
		flex: 1 1 auto !important;
		width: auto !important;
		min-width: 120px;
		max-width: none !important;
	}

	.hdr-search-wrap .hdr-search-form__input,
	.hdr-search-wrap input[type="search"] {
		min-height: 44px;
		height: 44px;
		font-size: 16px;
		line-height: 1.35;
		color: var(--hdr-navy, #003b6b);
	}

	.hdr-search-wrap .hdr-search-form__input::placeholder,
	.hdr-search-wrap input[type="search"]::placeholder {
		color: #6b7785;
		opacity: 1;
	}

	.hdr-main__row--actions,
	.hdr-actions {
		display: flex !important;
		flex: 0 0 auto !important;
		width: auto !important;
		grid-template-columns: unset !important;
		gap: 10px !important;
		justify-content: flex-end !important;
		align-items: center !important;
	}

	.hdr-action-btn--account,
	.hdr-user-menu__trigger,
	.hdr-action-btn--cart {
		width: auto !important;
		min-width: 0 !important;
		min-height: 44px;
		height: 44px;
	}

	.hdr-cart__meta {
		display: flex !important;
	}

	#toggle.toggle2 {
		display: none !important;
	}

	.header-nav-bg nav.nav > ul,
	.header-nav-bg nav.nav > div > ul {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: wrap;
		position: static !important;
		width: auto;
		background: transparent;
		box-shadow: none;
		padding: 0;
		visibility: visible !important;
		opacity: 1 !important;
	}

	.header-nav-bg.is-nav-open nav.nav > ul,
	.header-nav-bg.is-nav-open nav.nav > div > ul {
		position: static !important;
	}

	.header-nav-bg nav.nav > ul > li > a,
	.header-nav-bg nav.nav > div > ul > li > a {
		height: 48px;
		padding: 0 clamp(10px, 1.2vw, 16px);
		font-size: clamp(12px, 1.4vw, 14px);
		white-space: nowrap;
	}

	.small-search {
		display: none !important;
	}
}

/* ── Compact header ≤1024 (tablet / small laptop) ───────────────────────────
   Mobile ≤767 already balanced; >1024 keeps roomier desktop header.
   Fixes: tall 80px topbar, edge-flush logo/search/cart, cart meta crowding. */
@media (min-width: 768px) and (max-width: 1024px) {
	.hdr-topbar__inner {
		min-height: 0;
		height: auto;
		padding-top: 8px;
		padding-bottom: 8px;
		padding-left: max(20px, env(safe-area-inset-left, 0px));
		padding-right: max(20px, env(safe-area-inset-right, 0px));
		gap: 12px;
		align-items: center;
	}

	.hdr-topbar__contact {
		gap: clamp(12px, 2vw, 28px);
	}

	.hdr-topbar__item {
		gap: 8px;
	}

	/* Drop hours/secondary lines — same idea as mobile, frees vertical space */
	.hdr-topbar__line--secondary {
		display: none !important;
	}

	.hdr-topbar__icon img {
		width: 24px;
		max-width: 24px;
		height: auto;
	}

	.hdr-topbar__line--primary {
		font-size: 1.35rem;
		line-height: 1.3;
	}

	.hdr-topbar__links a,
	.hdr-topbar__link-btn {
		padding: 4px 8px;
		font-size: 1.2rem;
	}

	.hdr-topbar__sep {
		font-size: 10px;
	}

	.hdr-main__inner,
	.logo-box-cust.hdr-main__inner,
	.logo-box-cust {
		gap: clamp(10px, 1.6vw, 16px) !important;
		padding-top: 12px !important;
		padding-bottom: 12px !important;
	}

	.hdr-logo-link .logo-img,
	.hdr-logo-link img {
		max-width: clamp(132px, 18vw, 168px);
		max-height: 48px;
		height: auto;
	}

	.hdr-main__row--search,
	.hdr-search-wrap {
		min-width: 0;
	}

	.hdr-search-wrap .hdr-search-form__input,
	.hdr-search-wrap input[type="search"],
	.hdr-search-wrap .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		min-height: 42px;
		height: 42px;
	}

	.hdr-actions {
		gap: 8px !important;
	}

	.hdr-action-btn--account,
	.hdr-user-menu__trigger,
	.hdr-action-btn--cart {
		min-height: 42px;
		height: 42px;
		padding: 8px 12px;
	}

	/* Drop “Handlevogn” label; keep total when there is room */
	.hdr-cart__label {
		display: none !important;
	}

	.hdr-cart__total {
		font-size: 13px;
	}

	.hdr-action-btn--cart {
		min-width: 0 !important;
		gap: 6px;
	}

	.header-nav-bg nav.nav > ul > li > a,
	.header-nav-bg nav.nav > div > ul > li > a {
		height: 46px;
		padding: 0 clamp(8px, 1.1vw, 14px);
		font-size: clamp(12px, 1.35vw, 13.5px);
	}

	.header-custom-nav {
		min-height: 48px;
		gap: 8px;
	}
}

/* Narrow tablet 768–900: icon+badge cart only (frees search breathing room) */
@media (min-width: 768px) and (max-width: 900px) {
	.hdr-cart__meta {
		display: none !important;
	}

	.hdr-action-btn--cart {
		padding: 8px 10px;
		justify-content: center;
	}

	.hdr-action-btn--account,
	.hdr-user-menu__trigger {
		padding: 8px 10px;
	}
}

/* iPad Air (~820px) — slightly tighter header */
@media (min-width: 768px) and (max-width: 879px) {
	.hdr-contact-bar--below-header .under-slider-text:not(:last-child) {
		font-size: 1.4rem !important; /* was 12px — primary title line */
	}

	.hdr-contact-bar--below-header .under-slider-box-cust .under-slider-text:last-child,
	.hdr-contact-bar--below-header .under-slider-text:last-child {
		font-size: 11px;
	}
}

/* iPad Pro (~1024px) — roomier header contact cells */
@media (min-width: 880px) and (max-width: 1180px) {
	.hdr-contact-bar--below-header .under-slider-item,
	.hdr-contact-bar--below-header .hdr-contact-bar__cell {
		padding: 16px 20px !important;
	}

	.hdr-contact-bar--below-header .under-slider-text:not(:last-child) {
		font-size: 1.5rem !important; /* was 13px — primary title line */
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 879px) {
	.ftr-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 28px 36px !important;
	}

	.ftr-bottom__inner {
		grid-template-columns: 1fr auto;
		gap: 12px 16px;
	}
}

@media (min-width: 880px) and (max-width: 1180px) {
	.ftr-grid {
		grid-template-columns: 1.35fr 1fr 1fr 1.15fr !important;
		gap: 28px 32px !important;
	}

	.ftr-col__heading {
		font-size: 14px;
	}

	.ftr-bottom__inner {
		grid-template-columns: 1fr auto;
		gap: 12px 24px;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE PRODUCT — reference layout (gl-sp-reference)
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1180px) {
	body.gl-sp-reference {
		--gl-sp-fs-body: 1.6rem;
		--gl-sp-fs-sm: 1.4rem;
		--gl-sp-fs-product-title: clamp(2.2rem, 2rem + 0.6vw, 2.6rem);
		--gl-sp-fs-price: clamp(1.9rem, 1.7rem + 0.5vw, 2.1rem);
	}

	body.gl-sp-reference .gl-sp__hero {
		padding: clamp(16px, 2vw, 24px) 0;
	}

	body.gl-sp-reference.single-product #breadcrumbs {
		white-space: normal;
		font-size: 1.35rem;
		line-height: 1.45;
		overflow-wrap: anywhere;
	}

	/* Gallery + buy: 40/60 of main = 30/45 of page width */
	body.gl-sp-reference .gl-sp__hero-inner {
		display: grid !important;
		grid-template-columns: minmax(0, var(--gl-sp-col-gallery)) minmax(0, var(--gl-sp-col-buy)) !important;
		gap: clamp(24px, 3.5vw, 40px) !important;
		align-items: start;
	}

	body.gl-sp-reference .gl-sp__gallery {
		min-width: 0;
		width: 100% !important;
	}

	body.gl-sp-reference .gl-sp__gallery {
		--gl-sp-gallery-height: clamp(185px, 28vw, 265px);
	}

	body.gl-sp-reference .gl-sp__gallery .wpgs-nav .slick-slide img {
		height: clamp(52px, 7vw, 62px) !important;
	}

	body.gl-sp-reference .gl-sp__buy {
		margin-top: 0 !important;
		padding-left: 0 !important;
		min-width: 0;
	}

	body.gl-sp-reference .gl-sp__extras {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
		gap: 14px;
		align-items: stretch;
	}

	body.gl-sp-reference .gl-sp__financing {
		padding: 12px 14px;
	}

	body.gl-sp-reference .gl-sp__trust-mini {
		flex-direction: column;
		gap: 12px;
	}

	body.gl-sp-reference .gl-sp__actions {
		display: flex !important;
		flex-direction: row !important;
		justify-content: flex-end;
		gap: 10px;
		width: auto;
	}

	body.gl-sp-reference .gl-sp form.cart:not(.variations_form) {
		flex-wrap: nowrap;
		gap: 8px;
	}

	body.gl-sp-reference .gl-sp form.cart .quantity {
		flex: 0 0 auto;
	}

	body.gl-sp-reference .gl-sp .single_add_to_cart_button {
		flex: 1 1 auto !important;
		width: auto !important;
		min-width: 0;
		min-height: 42px;
	}

	/* Features: 2×2 on narrow tablet, 4-across on iPad Pro width */
	body.gl-sp-reference .gl-sp__features-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 20px;
	}

	/* Tabs — horizontal bar (matches reference mockup) */
	body.gl-sp-reference .gl-sp__details {
		display: flex !important;
		flex-direction: column !important;
		grid-template-columns: none !important;
		overflow: hidden;
	}

	body.gl-sp-reference .gl-sp__tabs {
		flex-direction: row;
		border-right: none;
		border-bottom: 1px solid var(--gl-sp-border);
		padding: 0;
		overflow-x: auto;
	}

	body.gl-sp-reference .gl-sp__tab {
		width: auto;
		min-width: 120px;
		margin: 0;
		border-left: none !important;
		border-bottom: 3px solid transparent;
		white-space: nowrap;
		text-align: center;
		padding: 12px 20px;
		font-size: clamp(1.0625rem, 1.25vw, 1.1875rem);
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	body.gl-sp-reference .gl-sp__tab[aria-selected="true"] {
		color: #fff;
		background: var(--gl-sp-navy);
		border-bottom-color: var(--gl-sp-navy);
		border-left-color: transparent !important;
	}

	body.gl-sp-reference .gl-sp__details-body {
		display: block;
		width: 100%;
	}

	body.gl-sp-reference .gl-sp__panels {
		border-right: none;
		border-bottom: none;
		padding: clamp(20px, 2.5vw, 32px);
		/* Keep tab panel body readable when page-scale body is 16px */
		--gl-sp-fs-body: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
		--gl-sp-fs-sm: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
		--gl-sp-fs-h2: clamp(1.4375rem, 1.3rem + 0.5vw, 1.625rem);
		--gl-sp-fs-h3: clamp(1.1875rem, 1.1rem + 0.35vw, 1.3125rem);
		--gl-sp-fs-spec-label: 1.0625rem;
		--gl-sp-fs-spec-value: 1.125rem;
	}

	body.gl-sp-reference .gl-sp__trust-bar-inner {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 18px;
	}

	body.gl-sp-reference .gl-sp__sticky-bar {
		padding-left: clamp(16px, 3vw, 24px);
		padding-right: clamp(16px, 3vw, 24px);
	}

	body.gl-sp-reference .gl-sp__sticky-inner {
		max-width: min(100%, 1180px);
		margin: 0 auto;
		gap: 16px;
	}
}

/* iPad Air (768–879px) — 2-col related, larger gallery emphasis */
@media (min-width: 768px) and (max-width: 879px) {
	body.gl-sp-reference .gl-sp__hero-inner {
		grid-template-columns: minmax(0, var(--gl-sp-col-gallery)) minmax(0, var(--gl-sp-col-buy)) !important;
	}

	body.gl-sp-reference .gl-sp__gallery {
		--gl-sp-gallery-height: clamp(185px, 32vw, 265px);
	}

	body.gl-sp-reference.single-product .product > section.gl-sp-related.products ul.products,
	body.gl-sp-reference .gl-sp-related ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 20px !important;
	}

	body.gl-sp-reference .gl-sp-related__head {
		margin-left: 0;
		margin-right: 0;
		padding-left: 0;
		padding-right: 0;
	}

}

/* iPad Pro / large tablet (880–1180px) — 3-col related, 4 feature pills */
@media (min-width: 880px) and (max-width: 1180px) {
	body.gl-sp-reference .gl-sp__hero-inner {
		grid-template-columns: minmax(0, var(--gl-sp-col-gallery)) minmax(0, var(--gl-sp-col-buy)) !important;
		gap: clamp(28px, 4vw, 44px) !important;
	}

	body.gl-sp-reference .gl-sp__gallery {
		--gl-sp-gallery-height: clamp(190px, 24vw, 270px);
	}

	body.gl-sp-reference .gl-sp__features-list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	body.gl-sp-reference .gl-sp__details {
		grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) !important;
	}

	body.gl-sp-reference .gl-sp__details-body {
		grid-template-columns: minmax(0, 1fr) minmax(200px, 36%) !important;
	}

	body.gl-sp-reference.single-product .product > section.gl-sp-related.products ul.products,
	body.gl-sp-reference .gl-sp-related ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: clamp(18px, 2.5vw, 24px) !important;
	}

}

/* ═══════════════════════════════════════════════════════════════════════════
   SHOP ARCHIVE
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1180px) {
	body.gl-shop-archive .woo-shop-layout .wrapper,
	body.gl-product-search .woo-shop-layout .wrapper {
		padding-left: max(20px, env(safe-area-inset-left, 0px));
		padding-right: max(20px, env(safe-area-inset-right, 0px));
		box-sizing: border-box;
	}
}

@media (min-width: 768px) and (max-width: 1100px) {
	.woo-shop-layout .product-category-cst-content ul.products.product-list-box {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 880px) and (max-width: 1100px) {
	.woo-shop-layout .product-category-cst-content ul.products.product-list-box {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}
