/* ==========================================================================
   Global responsive — Formal Peptides
   Mobile: ≤767px | Tablet: 768–1024px | Desktop: ≥1025px
   WooCommerce blocks cart/checkout: 781px in wc-blocks.css
   ========================================================================== */

html {
	overflow-x: clip;
}

body {
	overflow-x: clip;
	min-width: 0;
}

img,
video,
svg {
	max-width: 100%;
	height: auto;
}

table {
	max-width: 100%;
}

/* Prevent flex/grid children from forcing horizontal scroll */
.container,
.container--wc,
.site-main,
.shop-layout,
.hero__grid,
.category-carousel,
.category-carousel__viewport,
.content-page,
.fp-page-hero__inner {
	min-width: 0;
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   Mobile — ≤767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	/* Header */
	.header__inner {
		padding-inline: clamp(12px, 3vw, 16px);
		gap: 8px;
	}

	.header__actions {
		gap: 4px;
	}

	.header__icon-btn,
	.header__menu-toggle {
		min-width: 44px;
		min-height: 44px;
	}

	.fp-site-logo--header .fp-site-logo__img {
		max-height: 44px;
		max-width: min(200px, 38vw);
	}

	.announcement-bar {
		font-size: 0.75rem;
		padding: 8px 12px;
	}

	/* Product grids */
	.product-grid,
	.woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: clamp(12px, 3vw, 20px);
	}

	/* Footer */
	.footer__grid {
		grid-template-columns: 1fr;
		gap: var(--fp-space-8);
	}

	.footer__bottom {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: var(--fp-space-4);
	}

	.footer__newsletter-form {
		flex-direction: column;
	}

	.footer__newsletter-input,
	.footer__newsletter-btn {
		width: 100%;
	}

	/* Section headers & buttons */
	.section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--fp-space-3);
	}

	.btn {
		white-space: normal;
		text-align: center;
	}

	/* Shop toolbar */
	.shop-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.shop-toolbar__left {
		width: 100%;
	}

	.shop-toolbar__search {
		flex: 1 1 100%;
		min-width: 0;
		max-width: none;
		width: 100%;
	}

	/* Auth pages */
	.auth-page {
		padding: var(--fp-space-8) 0 var(--fp-space-12);
	}

	.auth-card {
		padding: var(--fp-space-6);
	}

	.auth-form__row--2col {
		grid-template-columns: 1fr;
	}

	/* Content pages */
	.content-page__body,
	.fp-page-hero {
		padding-inline: 0;
	}

	.content-page__body img,
	.content-page__body iframe,
	.content-page__body table {
		max-width: 100%;
		height: auto;
	}

	.content-page__body table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Reviews panel — stack nav above content */
	.reviews-panel {
		grid-template-columns: 1fr;
	}

	.reviews-panel__nav {
		border-right: none;
		border-bottom: 1px solid var(--fp-gray-200);
		padding: 24px 20px;
	}

	.reviews-panel__list {
		flex-direction: row;
		overflow-x: auto;
		max-height: none;
		gap: 8px;
		padding-bottom: 8px;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
	}

	.reviews-panel__list::before {
		display: none;
	}

	.reviews-panel__tab {
		flex: 0 0 auto;
		width: auto;
		min-width: 140px;
		scroll-snap-align: start;
	}

	.reviews-panel__content {
		min-height: clamp(220px, 55vw, 320px);
		padding: 28px 20px;
	}

	.reviews-panel__slide {
		inset: 28px 20px;
	}

	.reviews-panel__date {
		margin-left: 0;
		width: 100%;
	}

	.blog-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 480px) {
	.product-grid,
	.woocommerce ul.products {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --------------------------------------------------------------------------
   Tablet — 768–1024px
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
	.footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--fp-space-8);
	}

	.footer__brand {
		grid-column: 1 / -1;
	}

	.footer__col--newsletter {
		grid-column: 1 / -1;
	}

	.product-grid,
	.woocommerce ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(16px, 2.5vw, 24px);
	}

	.shop-toolbar__search {
		min-width: 0;
		flex: 1 1 180px;
		max-width: 240px;
	}
}

/* --------------------------------------------------------------------------
   Layout stacks — tablet and below
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.shop-layout {
		grid-template-columns: 1fr;
	}

	.shop-sidebar,
	.fp-sidebar {
		position: static;
		width: 100%;
		max-width: none;
	}

	.faq-page__layout,
	.coa-page__layout {
		grid-template-columns: 1fr;
	}

	.faq-page__sidebar,
	.coa-page__sidebar {
		position: static;
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   Single product — mobile
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.product-layout {
		grid-template-columns: 1fr;
		gap: clamp(20px, 4vw, 28px);
	}

	.product-gallery,
	.product-summary {
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.product-gallery {
		min-height: auto;
		padding: clamp(16px, 4vw, 24px);
	}

	.product-summary__actions,
	.product-summary .cart {
		flex-direction: column;
		align-items: stretch;
	}

	.product-summary .single_add_to_cart_button,
	.product-summary .btn {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   WooCommerce cart / checkout — blocks container (781px WC convention)
   -------------------------------------------------------------------------- */
@media (max-width: 781px) {
	.container--wc {
		width: var(--fp-content-width, 90%);
		max-width: none;
		margin-inline: var(--fp-content-gutter, 5%);
		padding-inline: 0;
		box-sizing: border-box;
	}

	.fp-wc-page__body--cart,
	.fp-wc-page__body--checkout {
		padding-inline: 0;
	}

	.cart-summary,
	.checkout-summary {
		position: static;
		width: 100%;
		max-width: 100%;
	}

	.cart-item {
		padding: 16px;
	}

	.cart-coupon {
		flex-direction: column;
		min-width: 0;
		width: 100%;
	}

	.checkout-layout,
	.cart-layout {
		gap: 24px;
	}

	.checkout-fields {
		padding: clamp(16px, 4vw, 24px);
	}
}
