/* BTLLC UX polish — P1 improvements
 * Loaded globally on the frontend. Scoped to avoid clobbering theme styles.
 */

/* ────────────────────────────────────────────────────────────────────
 * 1) Sticky header on mobile so search / cart / hamburger stay reachable
 * ──────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	#masthead,
	.site-header,
	header#masthead,
	header.site-header {
		position: sticky;
		top: 0;
		z-index: 100;
		background: #fff;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	}
}

/* ────────────────────────────────────────────────────────────────────
 * 2) 16px minimum on form controls so iOS Safari doesn't auto-zoom
 *    when an input gains focus.
 * ──────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	input[type="text"],
	input[type="email"],
	input[type="search"],
	input[type="password"],
	input[type="tel"],
	input[type="number"],
	input[type="url"],
	select,
	textarea {
		font-size: 16px !important;
	}
}

/* ────────────────────────────────────────────────────────────────────
 * 3) 44×44 minimum tap targets on mobile (Apple HIG / Material guidance).
 *    Focused on the elements most users actually tap.
 * ──────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	/* Filter checkboxes */
	.widget input[type="checkbox"] + label,
	.woocommerce-widget-layered-nav-list a,
	.woocommerce-widget-layered-nav-list__item,
	.shop-sidebar input[type="checkbox"] + label {
		min-height: 44px;
		display: flex;
		align-items: center;
		padding: 6px 0;
	}

	/* Pagination arrows */
	.woocommerce-pagination .page-numbers,
	.agni-woocommerce-pagination a,
	.agni-woocommerce-pagination .page-numbers {
		min-width: 44px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0 8px;
	}

	/* Footer social icons */
	.site-footer__social a,
	.social-links a {
		min-width: 44px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* Top utility nav links (call/email/Sell to Us) */
	.site-header__top-bar a,
	.top-bar a,
	.header-top-bar a {
		min-height: 40px;
		display: inline-flex;
		align-items: center;
	}
}

/* ────────────────────────────────────────────────────────────────────
 * 4) Cart "Proceed to Checkout" — primary CTA, not a thin link.
 *    Targets WC Block Cart's submit container and the legacy link.
 * ──────────────────────────────────────────────────────────────────── */
.wc-block-cart__submit-container .wc-block-cart__submit-button,
.wc-block-cart__submit-container a,
.wc-proceed-to-checkout a.checkout-button,
a.checkout-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 14px 24px;
	background: #1a1a1a !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	text-transform: none;
	text-align: center;
	cursor: pointer;
	transition: background 150ms ease, transform 80ms ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wc-block-cart__submit-container .wc-block-cart__submit-button:hover,
.wc-block-cart__submit-container a:hover,
.wc-proceed-to-checkout a.checkout-button:hover,
a.checkout-button:hover {
	background: #000 !important;
	color: #fff !important;
}

.wc-block-cart__submit-container .wc-block-cart__submit-button:active,
.wc-block-cart__submit-container a:active {
	transform: translateY(1px);
}

/* "Go to Shopping Cart" secondary link sits below the primary button */
.wc-block-cart__submit-container .wc-block-cart__submit-button + a,
.wc-block-cart__submit-container .wc-block-cart__submit-button + p a {
	background: transparent !important;
	color: #555 !important;
	font-weight: 500 !important;
	min-height: auto;
	padding: 8px;
	box-shadow: none;
	text-decoration: underline !important;
}

/* ────────────────────────────────────────────────────────────────────
 * 5) Shop loop card — keep only the first category tag visible above the
 *    title. The PHP filter limits it to 1, this CSS hides any stragglers
 *    that come from other plugins/contexts.
 * ──────────────────────────────────────────────────────────────────── */
.products .woocommerce-loop-product__category {
	font-size: 11px;
	color: #888;
	line-height: 1.3;
	margin-bottom: 4px;
	max-height: 1.3em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.products .woocommerce-loop-product__category a {
	color: inherit;
	text-decoration: none;
}

.products .woocommerce-loop-product__category a:hover {
	text-decoration: underline;
}

/* Hide all-but-first inline category links if PHP filter didn't catch them */
.products .woocommerce-loop-product__category > a ~ a,
.products .woocommerce-loop-product__category > span ~ span {
	display: none !important;
}
