/*
Theme Name: Belt Store (child)
Template: twentytwentyfive
Description: Lightweight child theme for the belt store. Colours, type and spacing live in theme.json and can be changed in Appearance → Editor → Styles.
Version: 0.1.1
Requires at least: 6.6
Text Domain: beltstore
*/

/* Placeholder content is outlined so nobody mistakes it for final copy. Remove the class when real content goes in. */
.is-placeholder {
	outline: 2px dashed var(--wp--preset--color--accent);
	outline-offset: 4px;
}
.placeholder-photo {
	background:
		repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent) 14px 15px),
		var(--wp--preset--color--surface);
	border: 1px dashed var(--wp--preset--color--accent);
	display: grid;
	place-items: center;
	text-align: center;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 1.5rem;
}

/* Announcement bar */
.announce { font-size: .8125rem; letter-spacing: .02em; }

/* Keep the add-to-cart button prominent on phones */
.single-product form.cart .single_add_to_cart_button,
.single-product .wc-block-components-product-button__button {
	width: 100%;
	min-height: 3.25rem;
	font-size: 1rem;
}
@media (min-width: 782px) {
	.single-product form.cart .single_add_to_cart_button { width: auto; min-width: 16rem; }
}
.single-product table.variations select { min-height: 2.75rem; min-width: 12rem; }

/* Product info list under the add-to-cart button */
.buy-info { border-top: 1px solid var(--wp--preset--color--line); }
.buy-info details { border-bottom: 1px solid var(--wp--preset--color--line); padding-block: .85rem; }
.buy-info summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.buy-info summary::after { content: "+"; font-weight: 400; }
.buy-info details[open] summary::after { content: "−"; }
.buy-info details > *:not(summary) { margin-block: .6rem 0; color: var(--wp--preset--color--muted); }

/* Sticky, clear header on mobile */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--wp--preset--color--base); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 0); }

/* Home: categories as tappable chips. New categories appear here automatically once they have products. */
.cat-chips ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.cat-chips li a {
	display: inline-block; padding: .6rem 1.1rem; border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast);
	text-decoration: none; min-height: 44px;
}
.cat-chips li a:hover { border-color: var(--wp--preset--color--contrast); }

/* Size-guide diagram */
.belt-diagram svg { width: 100%; height: auto; max-width: 760px; display: block; margin-inline: auto; }
.table-scroll { overflow-x: auto; }

/* Product cards */
.wc-block-product .wp-block-post-title a { text-decoration: none; }
.wc-block-components-product-image img, .wp-block-woocommerce-product-image img { background: var(--wp--preset--color--surface); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/*
 * Keep form fields at 16px on small screens, so Safari never zooms.
 *
 * Preventive, not a fix: every field a customer can actually reach on this
 * checkout today is already 16px. The one that measured 13.33px —
 * WooCommerce's address_2 — turned out to be visibility:hidden until the
 * "Add apartment" button is pressed, so nobody could have tapped it.
 *
 * It is here because the threshold is Safari's, not a design choice: a field
 * below 16px zooms the page on focus and does not zoom back, leaving somebody
 * mid-checkout on a page half again too wide. The next optional field added
 * will inherit the browser default, and nobody will think to measure it.
 */
@media (max-width: 782px) {
	input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
	input[type="password"], input[type="search"], input[type="url"], select, textarea {
		font-size: max(16px, 1rem);
	}
}
