/* MET Mobile Repair Batch M1 v1.0 — approved hosts */
/* Accordion controls are mobile-only; desktop/tablet retain the existing
 * fully visible footer link columns. */
footer.site-footer .met-m1-footer-toggle { display: none; }
/* SKU/category/tag implementation metadata is not customer content on any
 * device. Product copy and SEO metadata remain in WordPress unchanged. */
body.single-product .product_meta { display: none !important; }

@media (max-width: 900px) and (min-width: 721px) {
	body.woocommerce.archive ul.products,
	body.post-type-archive-product ul.products,
	body.tax-product_cat ul.products,
	.met-launch-home ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 18px !important;
	}
	body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
	.met-launch-home ul.products li.product .woocommerce-loop-product__title {
		font-size: 17px !important;
		line-height: 1.35 !important;
	}
	body.woocommerce.archive ul.products li.product .button,
	body.post-type-archive-product ul.products li.product .button,
	body.tax-product_cat ul.products li.product .button,
	.met-launch-home ul.products li.product .button,
	.met-managed-card .button,
	.met-pj-card .button {
		min-height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
}

@media (max-width: 720px) {
	:root { --met-m1-gutter: 12px; }
	html { -webkit-text-size-adjust: 100%; }
	body { font-size: 16px !important; line-height: 1.55 !important; }

	/* Compact, readable two-row mobile header. */
	.met-store-header {
		height: auto !important;
		min-height: 0 !important;
		padding: 0 !important;
	}
	.met-store-header-row {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto !important;
		grid-template-areas: "brand actions" "search search" !important;
		gap: 6px 8px !important;
		width: calc(100% - (2 * var(--met-m1-gutter))) !important;
		max-width: none !important;
		min-height: 0 !important;
		padding: 8px 0 !important;
		margin-inline: var(--met-m1-gutter) !important;
	}
	.met-store-brand {
		grid-area: brand !important;
		min-width: 0 !important;
		width: auto !important;
		max-width: 170px !important;
		gap: 7px !important;
		font-size: 15px !important;
		line-height: 1.15 !important;
		white-space: nowrap !important;
		overflow: hidden !important;
	}
	.met-store-brand img,
	.met-store-brand svg {
		flex: 0 0 auto !important;
		width: 160px !important;
		height: auto !important;
		max-width: 160px !important;
		max-height: 32px !important;
	}
	.met-store-actions {
		grid-area: actions !important;
		justify-self: end !important;
		align-self: center !important;
		gap: 6px !important;
		width: auto !important;
	}
	.met-store-actions a,
	.met-store-actions button {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 40px !important;
		padding: 6px 10px !important;
		font-size: 14px !important;
		line-height: 1.1 !important;
		white-space: nowrap !important;
	}
	.met-store-search {
		grid-area: search !important;
		display: flex !important;
		width: 100% !important;
		height: 42px !important;
		min-height: 42px !important;
		margin: 0 !important;
		overflow: hidden !important;
	}
	.met-store-search input[type="search"],
	.met-store-search input[name="s"] {
		min-width: 0 !important;
		height: 42px !important;
		padding: 0 12px !important;
		font-size: 15px !important;
		line-height: 42px !important;
	}
	.met-store-search button {
		flex: 0 0 auto !important;
		min-width: 92px !important;
		height: 42px !important;
		min-height: 42px !important;
		padding: 0 12px !important;
		font-size: 15px !important;
		line-height: 1.1 !important;
	}

	/* Both catalogue filters remain independent and become swipeable chip rows. */
	.met-store-menu-band,
	.met-family-band {
		height: auto !important;
		min-height: 0 !important;
		padding: 0 !important;
	}
	.met-store-scroll {
		display: flex !important;
		align-items: center !important;
		gap: 6px !important;
		width: 100% !important;
		max-width: none !important;
		min-height: 50px !important;
		padding: 4px var(--met-m1-gutter) !important;
		margin: 0 !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		overscroll-behavior-x: contain !important;
		scroll-snap-type: x proximity !important;
		scroll-padding-inline: var(--met-m1-gutter) !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
	}
	.met-store-scroll::-webkit-scrollbar { display: none !important; }
	.met-store-scroll > a {
		flex: 0 0 auto !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 42px !important;
		padding: 7px 13px !important;
		font-size: 15px !important;
		line-height: 1.15 !important;
		white-space: nowrap !important;
		scroll-snap-align: start !important;
	}

	/* Compact page chrome and preserve readable text. */
	main h1,
	.entry-content h1,
	.product_title,
	.woocommerce-products-header__title {
		font-size: clamp(23px, 6.4vw, 28px) !important;
		line-height: 1.2 !important;
		letter-spacing: 0 !important;
		margin-block: 0 12px !important;
	}
	main h2,
	.entry-content h2,
	.woocommerce-tabs h2 {
		font-size: clamp(20px, 5.4vw, 24px) !important;
		line-height: 1.25 !important;
		margin-block: 14px 8px !important;
	}
	main p,
	.entry-content p,
	.woocommerce-tabs p,
	.woocommerce-account .woocommerce {
		font-size: 16px !important;
		line-height: 1.55 !important;
	}
	.woocommerce-breadcrumb,
	.kadence-breadcrumbs,
	.met-shop-breadcrumbs,
	.met-account-breadcrumbs,
	.met-breadcrumbs {
		font-size: 13px !important;
		line-height: 1.4 !important;
		padding-block: 7px !important;
		margin-block: 0 8px !important;
	}

	/* Recover the width lost to boxed-theme padding on catalogue pages. */
	body.woocommerce.archive .content-container.site-container,
	body.post-type-archive-product .content-container.site-container,
	body.tax-product_cat .content-container.site-container,
	.met-launch-home .content-container.site-container {
		width: 100% !important;
		max-width: none !important;
		padding: 12px !important;
		margin: 0 !important;
	}
	/* Homepage catalogue sections carry Kadence grid utility classes with
	 * later !important rules. Use an intentionally stronger selector so the
	 * approved one-row mobile card remains consistent with the shop. */
	body.home .met-launch-home .woocommerce ul.products.products {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 10px !important;
		width: 100% !important;
	}
	body.woocommerce.archive #main.site-main,
	body.post-type-archive-product #main.site-main,
	body.tax-product_cat #main.site-main,
	.met-launch-home #main.site-main {
		width: 100% !important;
		max-width: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}
	.woocommerce .woocommerce-result-count,
	.woocommerce .woocommerce-ordering {
		float: none !important;
		width: 100% !important;
		margin: 0 0 8px !important;
		font-size: 14px !important;
		line-height: 1.35 !important;
	}
	.woocommerce .woocommerce-ordering select {
		width: 100% !important;
		max-width: 320px !important;
		min-height: 44px !important;
		padding: 6px 34px 6px 10px !important;
		font-size: 15px !important;
	}

	/* One professional mobile product row: cover left, information right. */
	body.woocommerce.archive ul.products,
	body.post-type-archive-product ul.products,
	body.tax-product_cat ul.products,
	.met-launch-home ul.products {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 10px !important;
		width: 100% !important;
		margin: 0 !important;
	}
	body.woocommerce.archive ul.products li.product,
	body.post-type-archive-product ul.products li.product,
	body.tax-product_cat ul.products li.product,
	.met-launch-home ul.products li.product {
		display: grid !important;
		grid-template-columns: 108px minmax(0, 1fr) !important;
		grid-template-rows: minmax(174px, auto) !important;
		gap: 10px !important;
		align-items: stretch !important;
		width: 100% !important;
		min-width: 0 !important;
		min-height: 194px !important;
		padding: 10px !important;
		margin: 0 !important;
		overflow: hidden !important;
	}
	body.home .met-launch-home .woocommerce ul.products.products > li.product {
		display: grid !important;
		grid-template-columns: 108px minmax(0, 1fr) !important;
		grid-template-rows: minmax(174px, auto) !important;
		gap: 10px !important;
		width: 100% !important;
		min-width: 0 !important;
		min-height: 194px !important;
		padding: 10px !important;
		margin: 0 !important;
		overflow: hidden !important;
	}
	/* Non-public staging-review cards use a separate renderer. Keep the same
	 * cover-left / information-right reading order without exposing products. */
	.met-managed-catalogue .met-managed-catalogue__grid {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 10px !important;
		width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
	}
	.met-managed-catalogue .met-managed-card {
		display: grid !important;
		grid-template-columns: 108px minmax(0, 1fr) !important;
		grid-template-rows: auto auto auto auto !important;
		gap: 6px 10px !important;
		align-items: start !important;
		width: 100% !important;
		min-width: 0 !important;
		min-height: 194px !important;
		padding: 10px !important;
		margin: 0 !important;
		overflow: hidden !important;
	}
	.met-managed-catalogue .met-managed-card > .woocommerce-LoopProduct-link {
		display: contents !important;
	}
	.met-managed-catalogue .met-managed-card__cover {
		grid-column: 1 !important;
		grid-row: 1 / 5 !important;
		width: 108px !important;
		height: 174px !important;
		max-height: 174px !important;
		object-fit: contain !important;
		object-position: top center !important;
		margin: 0 !important;
	}
	.met-managed-catalogue .met-managed-card__tags {
		grid-column: 2 !important;
		grid-row: 1 !important;
		display: flex !important;
		gap: 4px !important;
		min-width: 0 !important;
	}
	.met-managed-catalogue .met-managed-card__tags > * {
		min-height: 28px !important;
		padding: 4px 8px !important;
		font-size: 12px !important;
		line-height: 1.15 !important;
	}
	.met-managed-catalogue .met-managed-card h3 {
		grid-column: 2 !important;
		grid-row: 2 !important;
		display: -webkit-box !important;
		-webkit-box-orient: vertical !important;
		-webkit-line-clamp: 3 !important;
		overflow: hidden !important;
		min-width: 0 !important;
		margin: 0 !important;
		font-size: 15px !important;
		line-height: 1.3 !important;
		font-weight: 700 !important;
	}
	.met-managed-catalogue .met-managed-card .price {
		grid-column: 2 !important;
		grid-row: 3 !important;
		margin: 0 !important;
		font-size: 18px !important;
		line-height: 1.15 !important;
	}
	.met-managed-catalogue .met-managed-card__button {
		grid-column: 2 !important;
		grid-row: 4 !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		min-width: 0 !important;
		min-height: 44px !important;
		padding: 7px 10px !important;
		margin: 0 !important;
		font-size: 14px !important;
		line-height: 1.15 !important;
		text-align: center !important;
	}
	.met-managed-catalogue .met-managed-card__status {
		grid-column: 2 !important;
		grid-row: 5 !important;
		font-size: 12px !important;
		line-height: 1.25 !important;
		margin: 0 !important;
	}
	body.woocommerce.archive ul.products li.product .woocommerce-loop-image-link,
	body.post-type-archive-product ul.products li.product .woocommerce-loop-image-link,
	body.tax-product_cat ul.products li.product .woocommerce-loop-image-link,
	.met-launch-home ul.products li.product .woocommerce-loop-image-link {
		grid-column: 1 !important;
		grid-row: 1 !important;
		display: flex !important;
		align-items: flex-start !important;
		justify-content: center !important;
		width: 108px !important;
		height: 174px !important;
		min-width: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
		overflow: hidden !important;
	}
	body.woocommerce.archive ul.products li.product .woocommerce-loop-image-link img,
	body.post-type-archive-product ul.products li.product .woocommerce-loop-image-link img,
	body.tax-product_cat ul.products li.product .woocommerce-loop-image-link img,
	.met-launch-home ul.products li.product .woocommerce-loop-image-link img {
		width: 100% !important;
		height: 100% !important;
		max-height: 174px !important;
		margin: 0 !important;
		object-fit: contain !important;
		object-position: top center !important;
	}
	body.woocommerce.archive ul.products li.product .met-pj-native-meta,
	body.post-type-archive-product ul.products li.product .met-pj-native-meta,
	body.tax-product_cat ul.products li.product .met-pj-native-meta,
	.met-launch-home ul.products li.product .met-pj-native-meta {
		display: none !important;
	}
	body.woocommerce.archive ul.products li.product .product-details,
	body.post-type-archive-product ul.products li.product .product-details,
	body.tax-product_cat ul.products li.product .product-details,
	.met-launch-home ul.products li.product .product-details {
		grid-column: 2 !important;
		grid-row: 1 !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 6px !important;
		min-width: 0 !important;
		width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
		text-align: left !important;
	}
	ul.products li.product .met-uix-meta {
		display: flex !important;
		flex-wrap: wrap !important;
		align-items: center !important;
		gap: 4px !important;
		margin: 0 !important;
	}
	ul.products li.product .met-uix-meta > * {
		min-height: 28px !important;
		padding: 4px 8px !important;
		font-size: 13px !important;
		line-height: 1.1 !important;
	}
	body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
	body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
	body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
	.met-launch-home ul.products li.product .woocommerce-loop-product__title {
		display: -webkit-box !important;
		-webkit-box-orient: vertical !important;
		-webkit-line-clamp: 3 !important;
		overflow: hidden !important;
		min-height: 0 !important;
		max-height: calc(1.32em * 3) !important;
		margin: 0 !important;
		font-size: 15px !important;
		font-weight: 700 !important;
		line-height: 1.32 !important;
		letter-spacing: 0 !important;
	}
	body.woocommerce.archive ul.products li.product .price,
	body.post-type-archive-product ul.products li.product .price,
	body.tax-product_cat ul.products li.product .price,
	.met-launch-home ul.products li.product .price {
		display: block !important;
		margin: 0 !important;
		font-size: 20px !important;
		line-height: 1.15 !important;
	}
	body.woocommerce.archive ul.products li.product .product-excerpt,
	body.post-type-archive-product ul.products li.product .product-excerpt,
	body.tax-product_cat ul.products li.product .product-excerpt,
	.met-launch-home ul.products li.product .product-excerpt {
		display: none !important;
	}
	body.woocommerce.archive ul.products li.product .product-action-wrap,
	body.post-type-archive-product ul.products li.product .product-action-wrap,
	body.tax-product_cat ul.products li.product .product-action-wrap,
	.met-launch-home ul.products li.product .product-action-wrap {
		margin-top: auto !important;
		width: 100% !important;
	}
	body.woocommerce.archive ul.products li.product .button,
	body.post-type-archive-product ul.products li.product .button,
	body.tax-product_cat ul.products li.product .button,
	.met-launch-home ul.products li.product .button,
	.met-managed-card .button,
	.met-pj-card .button {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		min-height: 44px !important;
		padding: 7px 9px !important;
		font-size: 14px !important;
		font-weight: 700 !important;
		line-height: 1.22 !important;
		text-align: center !important;
		white-space: normal !important;
		word-break: normal !important;
		overflow-wrap: anywhere !important;
	}
	.met-managed-catalogue__grid,
	.met-pj-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 10px !important;
	}
	.met-managed-card,
	.met-pj-card {
		min-width: 0 !important;
		overflow: hidden !important;
	}
	.met-managed-card h3,
	.met-pj-card h3,
	.met-managed-card .woocommerce-loop-product__title,
	.met-pj-card .woocommerce-loop-product__title {
		font-size: 15px !important;
		line-height: 1.32 !important;
		-webkit-line-clamp: 3 !important;
	}

	/* Product pages: show content, not internal catalogue metadata. */
	body.single-product .product_meta {
		display: none !important;
	}
	body.single-product .content-container.site-container,
	body.woocommerce-account .content-container.site-container,
	body.single-sfwd-courses .content-container.site-container,
	body.single-sfwd-lessons .content-container.site-container,
	body.single-sfwd-topic .content-container.site-container {
		width: 100% !important;
		max-width: none !important;
		padding: 12px !important;
		margin: 0 !important;
	}
	body.single-product #main.site-main,
	body.woocommerce-account #main.site-main,
	body.single-sfwd-courses #main.site-main,
	body.single-sfwd-lessons #main.site-main,
	body.single-sfwd-topic #main.site-main {
		width: 100% !important;
		max-width: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}
	body.single-product .woocommerce-tabs,
	body.single-product .related,
	body.single-product .upsells {
		clear: both !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-top: 16px !important;
		overflow: hidden !important;
	}
	body.single-sfwd-courses .learndash-wrapper .ld-course-status,
	body.single-sfwd-lessons .learndash-wrapper .ld-lesson-status,
	body.single-sfwd-topic .learndash-wrapper .ld-topic-status {
		margin-block: 8px 14px !important;
	}
	body.single-sfwd-courses .learndash-wrapper .ld-item-list,
	body.single-sfwd-lessons .learndash-wrapper .ld-item-list,
	body.single-sfwd-topic .learndash-wrapper .ld-item-list {
		margin-block: 12px !important;
	}

	/* Compact three-part footer: identity full-width, then two link columns. */
	footer.site-footer .site-footer-row-container-inner {
		padding: 20px 16px !important;
	}
	footer.site-footer .site-middle-footer-inner-wrap {
		display: grid !important;
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) !important;
		gap: 16px 20px !important;
		align-items: start !important;
		padding: 0 !important;
	}
	footer.site-footer .site-footer-middle-section-1 {
		grid-column: 1 / -1 !important;
	}
	footer.site-footer .site-footer-section,
	footer.site-footer .footer-widget-area,
	footer.site-footer .footer-widget-area-inner,
	footer.site-footer .widget,
	footer.site-footer .textwidget {
		width: 100% !important;
		min-width: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
	}
	footer.site-footer .widget-title,
	footer.site-footer h2,
	footer.site-footer h3 {
		margin: 0 0 7px !important;
		font-size: 16px !important;
		line-height: 1.25 !important;
	}
	footer.site-footer p {
		margin: 0 0 6px !important;
		font-size: 14px !important;
		line-height: 1.4 !important;
	}
	footer.site-footer a,
	footer.site-footer .textwidget {
		font-size: 14px !important;
		line-height: 1.4 !important;
	}
	footer.site-footer a {
		display: inline-block !important;
		padding-block: 3px !important;
	}
	footer.site-footer .met-footer-links,
	footer.site-footer .met-footer-service {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	footer.site-footer .met-m1-footer-toggle {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 8px !important;
		width: 100% !important;
		min-height: 44px !important;
		padding: 8px 10px !important;
		border: 1px solid rgba(255,255,255,.32) !important;
		border-radius: 8px !important;
		background: rgba(255,255,255,.06) !important;
		color: #fff !important;
		font-size: 15px !important;
		font-weight: 700 !important;
		line-height: 1.2 !important;
		text-align: left !important;
	}
	footer.site-footer .met-m1-footer-toggle::after {
		content: "+" !important;
		font-size: 20px !important;
		font-weight: 400 !important;
		line-height: 1 !important;
	}
	footer.site-footer .met-m1-footer-toggle[aria-expanded="true"]::after {
		content: "−" !important;
	}
	footer.site-footer .met-m1-footer-toggle + .widget-title {
		display: none !important;
	}
	footer.site-footer .met-m1-footer-panel[hidden] {
		display: none !important;
	}

	/* Keep the privacy/access control clear of products and navigation. */
	.cky-btn-revisit-wrapper {
		left: auto !important;
		right: 12px !important;
		bottom: 12px !important;
		width: 42px !important;
		height: 42px !important;
		min-width: 42px !important;
		min-height: 42px !important;
	}
}

@media (max-width: 380px) {
	.met-store-brand { max-width: 150px !important; font-size: 14px !important; }
	.met-store-brand img,
	.met-store-brand svg { width: 146px !important; max-width: 146px !important; }
	.met-store-actions a,
	.met-store-actions button { padding-inline: 8px !important; font-size: 13px !important; }
	.met-store-search button { min-width: 86px !important; padding-inline: 9px !important; }
	body.woocommerce.archive ul.products li.product,
	body.post-type-archive-product ul.products li.product,
	body.tax-product_cat ul.products li.product,
	.met-launch-home ul.products li.product {
		grid-template-columns: 98px minmax(0, 1fr) !important;
	}
	body.woocommerce.archive ul.products li.product .woocommerce-loop-image-link,
	body.post-type-archive-product ul.products li.product .woocommerce-loop-image-link,
	body.tax-product_cat ul.products li.product .woocommerce-loop-image-link,
	.met-launch-home ul.products li.product .woocommerce-loop-image-link {
		width: 98px !important;
	}
	footer.site-footer .site-middle-footer-inner-wrap { gap: 14px !important; }
}