/*
Theme Name: One Atelier
Theme URI: https://example.com/one-atelier
Author: Robin
Description: A block theme for shops selling one-of-one dresses — brand samples and final pieces. Built for WordPress 7.0+ and WooCommerce 10.9+, fully editable in the Site Editor. Signature details borrowed from the pattern room: ruler dividers, spec-sheet type, tailor's chalk blue.
Version: 1.0.0
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: one-atelier
Tags: e-commerce, block-patterns, full-site-editing, block-styles
*/

/* ---------------------------------------------------------------
   1. Signature: the pattern-room ruler divider
   Tick marks like a drafting ruler: short ticks every 10px,
   tall ticks every 50px, baseline underneath.
---------------------------------------------------------------- */
.oa-ruler {
	height: 16px;
	background-image:
		repeating-linear-gradient(to right, var(--wp--preset--color--kraft) 0 1px, transparent 1px 10px),
		repeating-linear-gradient(to right, var(--wp--preset--color--ink) 0 1px, transparent 1px 50px);
	background-size: 100% 8px, 100% 16px;
	background-position: left bottom, left bottom;
	background-repeat: repeat-x;
	border-bottom: 1px solid var(--wp--preset--color--ink);
}

/* Spec-sheet text (measurements, eyebrows, labels) */
.oa-spec {
	font-family: var(--wp--preset--font-family--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Trust chips on the product page */
.oa-chip {
	border: 1px solid var(--wp--preset--color--kraft);
	padding: 0.4em 0.75em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0;
}

/* ---------------------------------------------------------------
   2. Product cards: portrait crops for dresses
---------------------------------------------------------------- */
.wp-block-woocommerce-product-collection .wc-block-components-product-image img {
	aspect-ratio: 3 / 4;
	object-fit: cover;
	width: 100%;
	height: auto;
}

/* Sold pieces strip: quiet the images slightly */
.oa-sold .wc-block-components-product-image img {
	filter: grayscale(0.4) contrast(0.95);
}

/* ---------------------------------------------------------------
   3. WooCommerce components tuned to the theme
---------------------------------------------------------------- */
.wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--chalk);
	color: var(--wp--preset--color--calico);
	border: 0;
	border-radius: 0;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

.wc-block-components-product-stock-indicator {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--chalk);
}
.wc-block-components-product-stock-indicator.wc-block-components-product-stock-indicator--out-of-stock,
.wc-block-components-product-stock-indicator.out-of-stock {
	color: var(--wp--preset--color--selvedge);
}

/* Classic add-to-cart form pieces inside the block template */
.single_add_to_cart_button,
.wc-block-components-button {
	border-radius: 0;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}
.single_add_to_cart_button {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--calico);
	border: 1px solid var(--wp--preset--color--ink);
	padding: 0.9em 2em;
}
.single_add_to_cart_button:hover {
	background: var(--wp--preset--color--chalk);
	border-color: var(--wp--preset--color--chalk);
	color: var(--wp--preset--color--calico);
}
.cart input.qty {
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 0;
	padding: 0.7em 0.5em;
}

/* ---------------------------------------------------------------
   4. FAQ details blocks
---------------------------------------------------------------- */
.wp-block-details {
	border-top: 1px solid var(--wp--preset--color--kraft);
	padding: 1rem 0;
}
.wp-block-details:last-of-type {
	border-bottom: 1px solid var(--wp--preset--color--kraft);
}
.wp-block-details > summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--mono);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 0.85rem;
}

/* ---------------------------------------------------------------
   5. Shop layout: sticky filter rail, products first on mobile
---------------------------------------------------------------- */
.oa-filter-rail {
	position: sticky;
	top: 24px;
}
@media (max-width: 781px) {
	.oa-shop-cols {
		display: flex;
		flex-direction: column-reverse;
	}
	.oa-filter-rail {
		position: static;
	}
}

/* Keyboard focus stays visible everywhere */
:where(a, button, input, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--chalk);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
