/* Mobile-only quality layer. Desktop composition is intentionally untouched. */
.mobile-nav-toggle { display: none; }
.mobile-nav-panel[hidden] { display: none !important; }

@media (max-width: 820px) {
	:root { scroll-padding-top: 86px; overflow-x: hidden; }
	html { -webkit-text-size-adjust: 100%; }
	body { overflow-x: hidden; overscroll-behavior-x: none; }
	body.g7-menu-open { overflow: hidden; }

	/* Shared navigation */
	.studio-header {
		display: flex !important;
		position: sticky !important;
		top: 0;
		height: 74px !important;
		min-height: 74px !important;
		padding-inline: 20px !important;
		z-index: 110;
		background: rgba(7, 25, 21, .96) !important;
		backdrop-filter: saturate(135%) blur(18px);
		-webkit-backdrop-filter: saturate(135%) blur(18px);
		border-bottom: 1px solid rgba(174, 235, 221, .2) !important;
	}
	body.admin-bar .studio-header { top: 46px !important; }
	.studio-header .logo img { width: 102px !important; }
	.studio-header > nav { display: none !important; }
	.studio-header .cart { display: none !important; }
	.studio-header .header-account { display: none !important; }
	.mobile-nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 9px;
		min-width: 44px;
		height: 44px;
		padding: 0;
		border: 1px solid rgba(174, 235, 221, .26);
		border-radius: 50%;
		background: transparent;
		color: #f9fffd;
		font: 500 8px var(--studio-mono, "DM Mono", monospace);
		letter-spacing: .1em;
		text-transform: uppercase;
		cursor: pointer;
		margin-left: auto;
	}
	.mobile-nav-toggle__label { display: none; }
	.mobile-nav-toggle__icon { display: grid; gap: 5px; width: 16px; }
	.mobile-nav-toggle__icon i { display: block; width: 16px; height: 1px; background: var(--studio-mint, #63e4cb); transition: transform .2s ease; }
	.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle__icon i:first-child { transform: translateY(3px) rotate(45deg); }
	.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle__icon i:last-child { transform: translateY(-3px) rotate(-45deg); }
	.mobile-nav-panel {
		display: block;
		position: fixed;
		z-index: 109;
		top: 74px;
		inset-inline: 0;
		min-height: calc(100dvh - 74px);
		padding: 34px 22px calc(28px + env(safe-area-inset-bottom));
		background: #071915;
		background-image: linear-gradient(rgba(99,228,203,.05) 1px, transparent 1px), linear-gradient(90deg,rgba(99,228,203,.05) 1px,transparent 1px), radial-gradient(circle at 80% 8%, rgba(43,154,133,.22), transparent 26%);
		background-size: 72px 72px, 72px 72px, auto;
		overflow-y: auto;
	}
	body.admin-bar .mobile-nav-panel { top: 120px; min-height: calc(100dvh - 120px); }
	.mobile-nav-panel nav { display: grid; border-top: 1px solid rgba(174,235,221,.2); }
	.mobile-nav-panel nav a {
		display: grid;
		grid-template-columns: 35px 1fr auto;
		align-items: center;
		min-height: 68px;
		border-bottom: 1px solid rgba(174,235,221,.2);
		color: #f9fffd;
		font: 600 clamp(20px, 6vw, 28px)/1 var(--sans, Manrope, sans-serif);
		letter-spacing: -.035em;
	}
	.mobile-nav-panel nav a span,
	.mobile-nav-panel nav a b { font: 500 9px var(--studio-mono, "DM Mono", monospace); letter-spacing: .1em; color: var(--studio-mint, #63e4cb); }
	.mobile-nav-panel nav a b { font-size: 17px; }
	.mobile-nav-panel > p { margin: 30px 0 0; color: rgba(255,255,255,.48); font: 9px/1.6 var(--studio-mono, "DM Mono", monospace); letter-spacing: .08em; text-transform: uppercase; }

	/* Generous touch targets and visible keyboard focus site-wide. */
	a, button, input, select, summary { -webkit-tap-highlight-color: rgba(99,228,203,.2); }
	a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--studio-mint, #63e4cb) !important; outline-offset: 3px; }
	.button, .btn, .single_add_to_cart_button, .g7-load-more__button { min-height: 48px; }

	/* Commerce controls: make horizontal sets intentionally scrollable, never clipped. */
	body.woocommerce.archive .filter-chips,
	.product-content-shell .product-tabs ul.tabs.wc-tabs { scrollbar-width: none; overscroll-behavior-inline: contain; }
	body.woocommerce.archive .filter-chips::-webkit-scrollbar,
	.product-content-shell .product-tabs ul.tabs.wc-tabs::-webkit-scrollbar { display: none; }
	body.woocommerce.archive .shop-toolbar { align-items: stretch; }
	body.woocommerce.archive .shop-toolbar .woocommerce-ordering,
	body.woocommerce.archive .shop-toolbar select { width: 100%; }
	body.woocommerce.archive .shop-toolbar select { min-height: 48px; }
	body.woocommerce.archive .g7-shop .card__title { overflow-wrap: anywhere; }

	/* Easier-to-read product record on small screens. */
	body.single-product .product-stage { min-height: 0; }
	body.single-product .product-stage .product__summary { padding-bottom: 0; }
	body.single-product .product-content-shell .product-tabs .panel { overflow-wrap: anywhere; }
	body.single-product .product-content-shell .product-tabs .panel table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

	/* Homepage: recompose the editorial hero for the narrow, vertical canvas. */
	.g7-studio-home .hero {
		display: block;
		height: auto;
		min-height: 0;
		padding: 88px 22px 48px;
	}
	/* Keep decorative full-bleed elements inside the page on iOS Safari. */
	.g7-studio-home { width: 100%; max-width: 100%; overflow-x: hidden; }
	.g7-studio-home .ticker {
		width: 100%;
		max-width: 100%;
		overflow: hidden;
		transform: translateY(14px) rotate(-.75deg) !important;
	}
	.g7-studio-home .review-marquee {
		width: 100%;
		max-width: 100%;
		margin-inline: 0;
		padding-inline: 0;
		overflow: hidden;
	}
	.g7-studio-home .review-row {
		touch-action: pan-x;
		overscroll-behavior-x: contain;
	}
	.g7-studio-home .hero-copy { width: calc(100vw - 44px); max-width: calc(100vw - 44px); min-width: 0; }
	.g7-studio-home .hero .faithful-hero-title {
		max-width: calc(100vw - 44px);
		font-size: clamp(42px, 12vw, 60px);
		line-height: .88;
		letter-spacing: -.07em;
		overflow-wrap: anywhere;
	}
	.g7-studio-home .hero .faithful-hero-title em { line-height: .85; }
	.g7-studio-home .hero .intro { width: calc(100vw - 44px); max-width: 34ch; margin-top: 26px; line-height: 1.62; }
	.g7-studio-home .hero .hero-actions { margin-top: 28px; gap: 8px; }
	.g7-studio-home .hero .button { width: min(100%, 250px); }
	.g7-studio-home .hero .hero-product { height: min(78vw, 360px); margin: 12px 0 -18px; }
	.g7-studio-home .hero .hero-product img { width: min(86vw, 390px); }
	.g7-studio-home .hero .hero-trustline { margin-top: 22px; max-width: 31ch; line-height: 1.6; }
	.g7-studio-home .live-difference,
	.g7-studio-home .live-coa,
	.g7-studio-home .bestsellers,
	.g7-studio-home .live-statement,
	.g7-studio-home .live-compare,
	.g7-studio-home .live-reviews,
	.g7-studio-home .live-resources,
	.g7-studio-home .live-wholesale,
	.g7-studio-home .live-faq { padding-inline: 22px; }
	.g7-studio-home .difference-cards,
	.g7-studio-home .review-row,
	.g7-studio-home .resource-row { margin-top: 42px; }
	.g7-studio-home .live-section-head h2 { font-size: clamp(46px, 14vw, 64px); line-height: .9; }
	.g7-studio-home .difference-cards,
	.g7-studio-home .resource-row { grid-template-columns: 1fr; }
	.g7-studio-home .difference-card { height: 470px; }
	.g7-studio-home .difference-card > div { inset: auto 22px 22px; }
	.g7-studio-home .compare-grid { overflow-x: auto; }
	.g7-studio-home .compare-row { min-width: 620px; }
	.g7-studio-home .review-marquee { width: 100%; }
	.g7-studio-home .review-row { display: flex; width: max-content; gap: 14px; animation: none; overflow-x: auto; padding: 0 22px 14px 0; scroll-snap-type: x mandatory; }
	.g7-studio-home .written-review { width: min(82vw, 320px); min-height: 320px; scroll-snap-align: start; }
	.g7-studio-home .resource-row { padding: 0; }
	.g7-studio-home .resource-row > a { min-height: 0; transform: none; top: auto; }
	.g7-studio-home .resource-row > a:hover { transform: translateY(-4px); }
	.g7-studio-home .live-statement { grid-template-columns: 1fr; gap: 38px; min-height: 0; padding-block: 72px; }
	.g7-studio-home .live-statement h2 { font-size: clamp(54px, 16vw, 72px); }
	.g7-studio-home .live-statement .statement-media { max-height: 420px; border-radius: 18px; }
	.g7-studio-home .live-wholesale { grid-template-columns: 1fr; min-height: 0; padding: 78px 22px; }
	.g7-studio-home .live-wholesale > img { width: 100%; height: 340px; margin-top: 6px; }

	/* Footer reads as an intentional mobile close, rather than a compressed desktop grid. */
	.rich-footer .footer-main { gap: 38px; }
	.rich-footer .footer-main nav { gap: 28px 20px; }
	.rich-footer .footer-main nav a { display: inline-flex; min-height: 32px; align-items: center; }
	.rich-footer .footer-bottom { gap: 15px; }

	/* Utility pages retain the editorial system while becoming genuinely thumb-friendly. */
	body:not(.home):not(.single-product):not(.woocommerce.archive) .site-content,
	body:not(.home):not(.single-product):not(.woocommerce.archive) #content > .col-full { padding-inline: 20px; }
	body:not(.home):not(.single-product):not(.woocommerce.archive) .site-main { padding-block: 42px; }
	body:not(.home):not(.single-product):not(.woocommerce.archive) .entry-title { font-size: clamp(42px, 13vw, 60px); line-height: .92; overflow-wrap: anywhere; }
	body.woocommerce-cart .woocommerce-cart-form,
	body.woocommerce-checkout form.checkout,
	body.woocommerce-account .woocommerce-MyAccount-content { min-width: 0; }
	body.woocommerce-cart .woocommerce-cart-form table.shop_table,
	body.woocommerce-checkout table.shop_table { border: 0; border-radius: 0; }
	body.woocommerce-cart .woocommerce-cart-form table.shop_table td,
	body.woocommerce-checkout table.shop_table td { padding: 14px 0; }
	body.woocommerce-cart .woocommerce-cart-form .actions { display: grid; gap: 12px; }
	body.woocommerce-cart .woocommerce-cart-form .coupon { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; }
	body.woocommerce-cart .woocommerce-cart-form .coupon input,
	body.woocommerce-cart .woocommerce-cart-form .coupon button,
	body.woocommerce-cart .woocommerce-cart-form button[name="update_cart"] { width: 100%; min-height: 48px; }
	body.woocommerce-cart .cart-collaterals .cart_totals,
	body.woocommerce-checkout #order_review,
	body.woocommerce-checkout .woocommerce-billing-fields,
	body.woocommerce-checkout .woocommerce-shipping-fields,
	body.woocommerce-checkout .woocommerce-checkout-payment { padding: 22px 18px; border-radius: 10px; }
	body.woocommerce-checkout form .form-row { width: 100%; margin-bottom: 16px; }
	body.woocommerce-checkout form input.input-text,
	body.woocommerce-checkout form select { min-height: 48px; font-size: 16px; }
	body.woocommerce-account .woocommerce-MyAccount-navigation { float: none; width: 100%; margin: 0 0 28px; }
	body.woocommerce-account .woocommerce-MyAccount-navigation ul { display: flex; gap: 0; overflow-x: auto; white-space: nowrap; }
	body.woocommerce-account .woocommerce-MyAccount-navigation li { flex: 0 0 auto; border-bottom: 0; border-right: 1px solid var(--studio-line, rgba(7,25,21,.14)); }
	body.woocommerce-account .woocommerce-MyAccount-navigation a { display: flex; min-height: 46px; align-items: center; padding-inline: 16px; }
	body.woocommerce-account .woocommerce-MyAccount-content { float: none; width: 100%; }
}

/* Home Studio hides its desktop navigation while recomposing below 900px.
   Restore it immediately above the shared mobile-menu breakpoint so the
   821–900px range never lands without either navigation treatment. */
@media (min-width: 821px) and (max-width: 900px) {
	body.home .studio-header > nav { display: flex !important; }
}

@media (max-width: 480px) {
	.studio-header { height: 70px !important; min-height: 70px !important; padding-inline: 16px !important; }
	.studio-header .cart { gap: 7px; margin-right: 10px; }
	.mobile-nav-panel { top: 70px; padding-inline: 18px; min-height: calc(100dvh - 70px); }
	body.admin-bar .mobile-nav-panel { top: 116px; min-height: calc(100dvh - 116px); }
	body.woocommerce.archive .g7-shop ul.products { gap: 12px; }
	body.woocommerce.archive .g7-shop .card__body { min-height: 258px; }
	body.woocommerce.archive .g7-shop .card__title { font-size: 15px; line-height: 1.2; }
	.product-content-shell .product-tabs ul.tabs.wc-tabs li { min-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.mobile-nav-toggle__icon i { transition: none; }
}

/* Full-site mobile audit: thumb targets and comparison readability. */
@media (max-width: 820px) {
	body.woocommerce.archive .filter-chips .chip {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 10px 14px;
	}

	.rich-footer .footer-main nav a {
		min-height: 40px;
		padding-block: 7px;
	}
}

@media (max-width: 560px) {
	.g7-studio-home .live-difference > .live-section-head h2 {
		max-width: 100%;
		font-size: clamp(40px, 11.4vw, 52px);
		line-height: .94;
		letter-spacing: -.055em;
	}

	.g7-studio-home .live-difference > .live-section-head h2 em {
		display: block;
		margin-top: 6px;
	}

	.g7-studio-home .compare-grid {
		display: grid;
		gap: 11px;
		border: 0;
		overflow: visible;
	}

	.g7-studio-home .compare-row.compare-title {
		display: none;
	}

	.g7-studio-home .compare-row:not(.compare-title) {
		grid-template-columns: 1fr 1fr;
		min-width: 0;
		min-height: 0;
		border: 1px solid rgba(7,25,21,.14);
		border-radius: 8px;
		background: #fff;
		overflow: hidden;
	}

	.g7-studio-home .compare-row:not(.compare-title) > strong {
		grid-column: 1 / -1;
		padding: 15px 14px;
		border-bottom: 1px solid rgba(7,25,21,.12);
		font-size: 14px;
	}

	.g7-studio-home .compare-row:not(.compare-title) > b,
	.g7-studio-home .compare-row:not(.compare-title) > span {
		display: block;
		align-self: stretch;
		padding: 13px 12px;
		font-size: 11px;
		line-height: 1.45;
	}

	.g7-studio-home .compare-row:not(.compare-title) > b::before,
	.g7-studio-home .compare-row:not(.compare-title) > span::before {
		display: block;
		margin-bottom: 6px;
		font: 700 7px/1 var(--mono);
		letter-spacing: .12em;
		text-transform: uppercase;
	}

	.g7-studio-home .compare-row:not(.compare-title) > b::before { content: "G7 Peptides"; }
	.g7-studio-home .compare-row:not(.compare-title) > span::before { content: "Others"; }
}

/* Keep the angled trust ribbon self-contained on narrow viewports. */
@media (max-width: 820px) {
	.g7-studio-home .ticker { transform: translateY(12px) !important; overflow: hidden; }
	.g7-studio-home .ticker-track { transform-origin: 50vw 29px; }
}

/* Static customer-review layout: every approved review is readable at rest. */
.g7-studio-home .review-marquee { width: auto !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
.g7-studio-home .review-row { display: grid !important; width: 100% !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 18px !important; animation: none !important; transform: none !important; overflow: visible !important; padding: 0 !important; scroll-snap-type: none !important; }
.g7-studio-home .review-row .written-review { width: auto !important; min-width: 0 !important; min-height: 360px; }
@media (max-width: 760px) {
	.g7-studio-home .review-row { grid-template-columns: 1fr !important; gap: 14px !important; }
	.g7-studio-home .review-row .written-review { min-height: 0; }
}

/* Mobile homepage conversion flow. Desktop layout remains unchanged. */
@media (max-width: 820px) {
	.g7-studio-home .hero {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		padding-top: 68px;
		text-align: center;
	}

	.g7-studio-home .hero-copy { display: contents; }
	.g7-studio-home .hero-copy > .kicker { order: 1; }
	.g7-studio-home .hero-copy > .faithful-hero-title { order: 2; }
	.g7-studio-home .hero-product { order: 3; }
	.g7-studio-home .hero-copy > .intro { order: 4; }
	.g7-studio-home .hero-copy > .hero-actions { order: 5; }
	.g7-studio-home .hero-copy > .hero-trustline { order: 6; }

	.g7-studio-home .hero .kicker,
	.g7-studio-home .live-section-head .kicker,
	.g7-studio-home .coa-copy .kicker,
	.g7-studio-home .bestsellers-head .kicker,
	.g7-studio-home .live-wholesale .kicker {
		justify-content: center;
		width: fit-content;
		max-width: 100%;
		margin-inline: auto;
	}

	.g7-studio-home .hero .faithful-hero-title,
	.g7-studio-home .hero .intro,
	.g7-studio-home .hero .hero-trustline {
		margin-inline: auto;
	}

	.g7-studio-home .hero .hero-product {
		width: 100%;
		height: min(72vw, 320px);
		margin: 17px 0 0;
	}

	.g7-studio-home .hero .hero-actions {
		align-items: center;
		justify-content: center;
		width: 100%;
	}

	.g7-studio-home .live-section-head,
	.g7-studio-home .coa-copy,
	.g7-studio-home .bestsellers-head,
	.g7-studio-home .live-statement > div:first-child,
	.g7-studio-home .live-wholesale > div,
	.g7-studio-home .live-faq > .live-section-head {
		text-align: center;
	}

	.g7-studio-home .live-section-head > p:not(.kicker),
	.g7-studio-home .coa-copy .coa-lead,
	.g7-studio-home .coa-copy small,
	.g7-studio-home .bestsellers-sub,
	.g7-studio-home .live-statement > div:first-child > p,
	.g7-studio-home .live-compare > .live-section-head > p,
	.g7-studio-home .live-faq > .live-section-head > p {
		margin-inline: auto;
	}

	.g7-studio-home .bestsellers-head {
		align-items: center;
		flex-direction: column;
		gap: 22px;
	}

	.g7-studio-home .coa-copy .button,
	.g7-studio-home .live-statement .button {
		display: inline-flex;
	}

	.g7-studio-home .live-wholesale ul {
		display: inline-grid;
		text-align: left;
	}

	.g7-studio-home .live-wholesale > div > div {
		align-items: center;
		justify-content: center;
	}

	.g7-studio-home .resource-row > a {
		text-align: center;
	}

	/* Desktop grid children can otherwise preserve their intrinsic width after
	   stacking, producing a subtle rightward shift on 320–430px screens. */
	.g7-studio-home .live-coa,
	.g7-studio-home .live-statement,
	.g7-studio-home .live-wholesale {
		grid-template-columns: minmax(0, 1fr);
	}

	.g7-studio-home .live-coa > *,
	.g7-studio-home .live-statement > *,
	.g7-studio-home .live-wholesale > * {
		min-width: 0;
		max-width: 100%;
	}
}
