/*
Theme Name: BW Clothing
Theme URI: https://bwclothing.com.mx
Author: BW Clothing
Author URI: https://bwclothing.com.mx
Description: A custom minimal WooCommerce theme for BW Clothing — premium traditional Mexican winter clothing. Clean white product areas, warm cream sections, charcoal text, single terracotta accent. No page builders, no frameworks.
Version: 1.0.12
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bw-clothing
Tags: e-commerce, woocommerce, minimal, custom-colors, threaded-comments
*/

/* ============ Tokens ============ */
:root {
	--cream: #FAF7F2;
	--charcoal: #1F1B16;
	--terra: #C0563B;
	--terra-dark: #A8462C;
	--white: #FFFFFF;
	--muted: #6E6459;
	--border: #EAE2D6;
	--radius: 12px;
	--radius-lg: 16px;
	--shadow: 0 8px 28px rgba(31, 27, 22, 0.08);
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ============ Reset & base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--charcoal);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-dark); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1550px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto; margin: 0; padding: 10px 18px; background: var(--charcoal); color: #fff; z-index: 9999; border-radius: 8px; }

/* ============ Buttons ============ */
.btn, .button, button[type="submit"], input[type="submit"],
.woocommerce button.button, .woocommerce a.button, .woocommerce input.button {
	display: inline-block;
	background: var(--terra);
	color: #fff !important;
	border: 1px solid var(--terra);
	border-radius: 999px;
	padding: 14px 34px;
	font-family: var(--font);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover, .button:hover, button[type="submit"]:hover, input[type="submit"]:hover,
.woocommerce button.button:hover, .woocommerce a.button:hover, .woocommerce input.button:hover {
	background: var(--terra-dark);
	border-color: var(--terra-dark);
	color: #fff !important;
	transform: translateY(-1px);
}
.btn-outline {
	background: transparent;
	color: var(--charcoal) !important;
	border: 1px solid var(--charcoal);
}
.btn-outline:hover { background: var(--charcoal); color: #fff !important; border-color: var(--charcoal); }

/* ============ Header ============ */
.site-header {
	background: var(--white);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 200;
	transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(31, 27, 22, 0.08); }
.header-main {
	display: flex;
	align-items: center;
	gap: 20px;
	padding-top: 16px;
	padding-bottom: 16px;
	flex-wrap: wrap;
}
.site-logo {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--charcoal);
	white-space: nowrap;
}
.site-logo .logo-accent { color: var(--terra); }
.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: none;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--charcoal); }
.header-search { flex: 1 1 100%; order: 4; display: flex; }
.header-search input[type="search"] {
	flex: 1;
	border: 1px solid var(--border);
	border-right: 0;
	border-radius: 999px 0 0 999px;
	padding: 12px 20px;
	font-size: 15px;
	font-family: var(--font);
	background: var(--cream);
	color: var(--charcoal);
	min-width: 0;
}
.header-search input[type="search"]::placeholder { color: var(--muted); }
.header-search button {
	border-radius: 0 999px 999px 0;
	padding: 12px 22px;
	display: inline-flex;
	align-items: center;
}
.header-search button svg { width: 18px; height: 18px; stroke: #fff; }
.header-icons { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: var(--charcoal);
}
.icon-link:hover { background: var(--cream); color: var(--charcoal); }
.icon-link svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.cart-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--terra);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
/* Header "Shop by Category" dropdown */
.cat-dropdown { position: relative; flex: 0 0 auto; }
.cat-dropdown-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 0;
	padding: 10px 14px;
	border-radius: 999px;
	font-family: var(--font);
	font-size: 14px;
	font-weight: 600;
	color: var(--charcoal);
	cursor: pointer;
	white-space: nowrap;
}
.cat-dropdown-btn:hover { background: var(--cream); }
.cat-dropdown-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.cat-dropdown-btn .chev { width: 14px; height: 14px; }
.cat-panel {
	display: none;
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 520px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(31, 27, 22, 0.16);
	padding: 14px;
	z-index: 400;
}
.cat-panel ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
}
.cat-panel a {
	display: block;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	color: var(--charcoal);
}
.cat-panel a:hover { background: var(--cream); color: var(--terra); }
@media (hover: hover) {
	.cat-dropdown:hover .cat-panel { display: block; }
}
.cat-dropdown.open .cat-panel { display: block; }

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.header-search { flex: 1 1 auto; order: 0; max-width: 560px; margin: 0 auto; }
	.header-icons { margin-left: 0; }
}
@media (max-width: 899px) {
	.cat-dropdown { display: none; }
	.cat-dropdown-btn { display: none; }
}

/* ============ Mobile drawer menu ============ */
.drawer-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(31, 27, 22, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 600;
}
.mobile-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(340px, 88vw);
	background: var(--white);
	z-index: 601;
	transform: translateX(-105%);
	transition: transform 0.32s ease;
	display: flex;
	flex-direction: column;
	box-shadow: 8px 0 40px rgba(31, 27, 22, 0.16);
}
body.drawer-open { overflow: hidden; }
body.drawer-open .mobile-drawer { transform: translateX(0); }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.mobile-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid var(--border);
}
.mobile-drawer-head .site-logo { font-size: 20px; }
.drawer-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: var(--cream);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.drawer-close svg { width: 20px; height: 20px; stroke: var(--charcoal); fill: none; stroke-width: 2; stroke-linecap: round; }
.mobile-drawer-nav { flex: 1 1 auto; overflow-y: auto; padding: 8px 20px 20px; }
.drawer-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
	margin: 14px 0 6px;
}
.mobile-drawer-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer-nav a {
	display: block;
	padding: 12px 4px;
	font-size: 16px;
	font-weight: 500;
	color: var(--charcoal);
	border-bottom: 1px solid var(--cream);
}
.mobile-drawer-nav a:hover { color: var(--terra); }
.mobile-drawer-foot {
	padding: 16px 20px 24px;
	border-top: 1px solid var(--border);
	display: grid;
	gap: 10px;
}
@media (min-width: 900px) {
	.mobile-drawer, .drawer-backdrop { display: none; }
}

/* ============ Sections ============ */
.section { padding: 48px 0; }
.section-cream { background: var(--cream); }
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
}
.section-head h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: 0; margin: 0; }
.section-link { font-weight: 600; font-size: 15px; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

/* ============ Hero ============ */
.hero {
	position: relative;
	min-height: 72vh;
	display: flex;
	align-items: center;
	background-size: cover;
	background-position: center;
	color: #fff;
}
.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(22, 16, 10, 0.74) 0%, rgba(22, 16, 10, 0.38) 55%, rgba(22, 16, 10, 0.12) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 640px; padding-top: 64px; padding-bottom: 64px; }
.hero-eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	opacity: 0.85;
	margin-bottom: 16px;
}
.hero h1 { font-family: var(--serif); font-size: 40px; font-weight: 700; letter-spacing: 0; margin-bottom: 18px; color: #fff; }
.hero p.hero-sub { font-size: 18px; line-height: 1.55; opacity: 0.92; margin-bottom: 32px; max-width: 520px; }

/* ============ Category banner cards ============ */
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.cat-card {
	position: relative;
	display: block;
	border-radius: var(--radius-lg);
	overflow: hidden;
	aspect-ratio: 16 / 8;
	background: var(--border);
}
.cat-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.cat-card:hover img { transform: scale(1.035); }
.cat-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(22, 16, 10, 0.42) 0%, rgba(22, 16, 10, 0) 55%);
}
.cat-card-label {
	position: absolute;
	left: 22px;
	bottom: 22px;
	z-index: 1;
	background: rgba(255, 255, 255, 0.96);
	color: var(--charcoal);
	font-weight: 600;
	font-size: 15px;
	padding: 10px 22px;
	border-radius: 999px;
	box-shadow: var(--shadow);
}
.cat-card:hover .cat-card-label { background: var(--charcoal); color: #fff; }

/* ============ Product cards (Etsy-style) ============ */
ul.products {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
/* The related/upsells <section> also carries the "products" class — it must
   stay a normal block so its heading sits above its product list. */
section.related.products,
section.upsells.products {
	display: block;
}
/* WooCommerce's clearfix pseudo-elements (::before/::after with content:" ")
   become phantom grid items once ul.products is display:grid, shifting every
   loop into a 3+1 layout. Neutralize them. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
	content: none !important;
}
section.related.products > ul.products,
section.upsells.products > ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
section.related.products > ul.products > li.product,
section.upsells.products > ul.products > li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	grid-column: auto !important;
}
@media (min-width: 900px) {
	section.related.products > ul.products,
	section.upsells.products > ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 28px;
	}
}
ul.products li.product, .products .product {
	display: flex;
	flex-direction: column;
	background: var(--white);
}
ul.products li.product a.woocommerce-LoopProduct-link { display: block; color: var(--charcoal); }
ul.products li.product a img {
	border-radius: var(--radius);
	aspect-ratio: 4 / 5;
	width: 100%;
	object-fit: cover;
	background: var(--cream);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
ul.products li.product a:hover img { transform: translateY(-3px); box-shadow: var(--shadow); }
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.products .product .woocommerce-loop-product__title {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	margin: 12px 0 6px;
	padding: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.8em;
	color: var(--charcoal);
}
.woocommerce ul.products li.product .price,
.products .product .price {
	font-size: 17px;
	font-weight: 700;
	color: var(--charcoal);
	margin: 0;
}
.woocommerce ul.products li.product .price del { color: var(--muted); font-weight: 400; opacity: 1; margin-right: 8px; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .star-rating { font-size: 13px; margin: 6px 0 0; }
.woocommerce ul.products li.product .star-rating span { color: var(--terra); }
.woocommerce span.onsale, ul.products li.product .onsale {
	background: var(--terra);
	color: #fff;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 12px;
	min-height: 0;
	line-height: 1.4;
	top: 12px;
	left: 12px;
	right: auto;
	margin: 0;
}

/* ---- WooCommerce default-layout overrides ----
   The theme lays product loops out with CSS grid (not floats), so the
   stock WooCommerce widths/floats must be neutralised or cards collapse. */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	float: none;
	width: auto;
	margin: 0;
}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
ul.products li.product a.woocommerce-LoopProduct-link {
	display: block;
}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img,
ul.products li.product a.woocommerce-LoopProduct-link img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}
/* Never break product titles mid-word. */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.products .product .woocommerce-loop-product__title {
	word-break: normal;
	overflow-wrap: break-word;
}

/* ============ Brand story strip ============ */
.brand-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.brand-item { text-align: left; }
.brand-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(192, 86, 59, 0.12);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px;
}
.brand-icon svg { width: 24px; height: 24px; stroke: var(--terra); fill: none; stroke-width: 1.8; }
.brand-item h3 { font-size: 18px; margin-bottom: 8px; }
.brand-item p { color: var(--muted); margin: 0; font-size: 15px; }

/* ============ Shop archive ============ */
.page-pad { padding: 48px 0 72px; }
.woocommerce-breadcrumb { font-size: 14px; color: var(--charcoal); margin: 0 0 20px; }
.woocommerce-breadcrumb a { color: var(--muted); }
.woocommerce-breadcrumb a:hover { color: var(--terra); text-decoration: underline; }
.shop-head { margin-bottom: 24px; }
.shop-head .page-title { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: 0; margin-bottom: 8px; }
.shop-head .term-description, .shop-head .page-description { color: var(--muted); max-width: 720px; }
.shop-topbar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}
.cat-pills { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cat-pills::-webkit-scrollbar { display: none; }
.pill {
	border: 1px solid var(--border);
	background: var(--white);
	color: var(--charcoal);
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}
.pill:hover { border-color: var(--charcoal); color: var(--charcoal); }
.pill.active { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.shop-tools { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.woocommerce-result-count { margin: 0; font-size: 14px; color: var(--muted); }
.woocommerce-ordering select {
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 9px 16px;
	font-family: var(--font);
	font-size: 14px;
	background: var(--white);
	color: var(--charcoal);
}
/* Category archive banner header */
.cat-hero {
	position: relative;
	border-radius: var(--radius-lg);
	overflow: hidden;
	min-height: 300px;
	display: flex;
	align-items: flex-end;
	background-size: cover;
	background-position: center;
	margin-bottom: 32px;
}
.cat-hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(22,16,10,0.68) 0%, rgba(22,16,10,0.1) 60%); }
.cat-hero-content { position: relative; z-index: 1; padding: 36px; color: #fff; }
.cat-hero-content h1 { font-family: var(--serif); color: #fff; font-size: 36px; font-weight: 600; letter-spacing: 0; margin-bottom: 8px; }
.cat-hero-content p { opacity: 0.9; margin: 0; max-width: 640px; }
.cat-count { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; margin-bottom: 10px !important; }
/* Slimmer category hero on phones. */
@media (max-width: 899px) {
	.cat-hero { min-height: 220px; }
	.cat-hero-content { padding: 24px; }
	.cat-hero-content h1 { font-size: 28px; }
}

/* ============ Single product ============ */
.single-product .product { display: grid; grid-template-columns: 1fr; gap: 40px; }
/* WooCommerce floats/widths must not fight the theme grid. */
.woocommerce div.product div.images.woocommerce-product-gallery,
.woocommerce div.product div.summary.entry-summary {
	float: none;
	width: auto;
	margin: 0;
}
/* Tabs and related products always span the full width below gallery+summary. */
.single-product div.product > .woocommerce-tabs,
.single-product div.product > .related.products,
.single-product div.product > .upsells.products {
	grid-column: 1 / -1;
}
.woocommerce-product-gallery { width: 100%; }
.woocommerce div.product div.images.woocommerce-product-gallery img { width: 100%; }
.woocommerce-product-gallery img { border-radius: var(--radius-lg); }

/* Etsy-style vertical thumbnail strip (desktop). */
@media (min-width: 900px) {
	.woocommerce div.product div.images.woocommerce-product-gallery {
		display: flex;
		flex-direction: row;
		gap: 16px;
		align-items: flex-start;
	}
	.woocommerce-product-gallery .flex-viewport {
		flex: 1 1 auto;
		min-width: 0;
		order: 2;
	}
	.woocommerce-product-gallery ol.flex-control-thumbs {
		flex: 0 0 84px;
		width: 84px;
		order: 1;
		display: flex;
		flex-direction: column;
		gap: 12px;
		margin: 0;
		padding: 0;
		max-height: 620px;
		overflow-y: auto;
		scrollbar-width: thin;
	}
	.woocommerce-product-gallery ol.flex-control-thumbs li {
		float: none !important;
		width: 100% !important;
		margin: 0 !important;
		list-style: none;
	}
	.woocommerce-product-gallery ol.flex-control-thumbs li img {
		border-radius: 10px;
		border: 2px solid transparent;
		cursor: pointer;
		aspect-ratio: 1 / 1;
		object-fit: cover;
	}
	.woocommerce-product-gallery ol.flex-control-thumbs li img.flex-active {
		border-color: var(--charcoal);
	}
}
.woocommerce div.product .product_title { font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.woocommerce div.product p.price, .woocommerce div.product span.price {
	font-size: 26px;
	font-weight: 700;
	color: var(--charcoal);
	margin-bottom: 20px;
}
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--muted); margin-bottom: 24px; }
.woocommerce div.product form.cart { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.woocommerce div.product form.cart .quantity { width: 100%; }
/* +/- quantity stepper */
.bw-qty {
	display: flex;
	align-items: stretch;
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 14px;
	overflow: hidden;
	background: var(--white);
}
.bw-qty .qty {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	text-align: center;
	font-family: var(--font);
	font-size: 16px;
	font-weight: 600;
	color: var(--charcoal);
	padding: 14px 8px;
	background: transparent;
	-moz-appearance: textfield;
	appearance: textfield;
}
.bw-qty .qty::-webkit-outer-spin-button,
.bw-qty .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.bw-qty-btn {
	flex: 0 0 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cream);
	border: 0;
	cursor: pointer;
	padding: 0;
}
.bw-qty-btn svg { width: 18px; height: 18px; stroke: var(--charcoal); fill: none; stroke-width: 2; stroke-linecap: round; }
.bw-qty-btn:hover { background: #efe5d3; }
.bw-qty-btn:active { background: #e7d9c2; }
.woocommerce div.product form.cart .button { width: 100%; padding: 18px; border-radius: 999px; font-size: 17px; }
/* Force the theme's terracotta on the buy buttons even if a plugin restyles them. */
.woocommerce div.product form.cart .button.single_add_to_cart_button,
.bw-sticky-bar .button {
	background: var(--terra) !important;
	border-color: var(--terra) !important;
	color: #fff !important;
}
.woocommerce div.product form.cart .button.single_add_to_cart_button:hover,
.bw-sticky-bar .button:hover {
	background: var(--terra-dark) !important;
	border-color: var(--terra-dark) !important;
	color: #fff !important;
}

/* Low-stock urgency line (Etsy-style, above the price) */
.bw-low-stock {
	color: #b3261e;
	font-weight: 600;
	font-size: 15px;
	margin: 0 0 10px;
}

/* Product accordions (buy column) */
.bw-accordion { border-top: 1px solid var(--border); margin: 8px 0 24px; }
.bw-acc-item { border-bottom: 1px solid var(--border); }
.bw-acc-head {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: none;
	border: 0;
	padding: 18px 4px;
	font-family: var(--font);
	font-size: 16px;
	font-weight: 600;
	color: var(--charcoal);
	cursor: pointer;
	text-align: left;
}
.bw-acc-head svg { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; transition: transform 0.25s ease; }
.bw-acc-item.open .bw-acc-head svg { transform: rotate(180deg); }
.bw-acc-panel { display: none; padding: 0 4px 24px; font-size: 15px; line-height: 1.7; color: #4d463c; }
.bw-acc-panel p { margin-bottom: 12px; }
.bw-acc-panel ul { margin: 0 0 16px 20px; padding: 0; }
.bw-acc-panel li { margin-bottom: 6px; }
.bw-acc-item.open .bw-acc-panel { display: block; }

/* Gallery prev/next arrows */
.woocommerce-product-gallery .flex-viewport { position: relative; }
.bw-gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--border);
	box-shadow: 0 4px 14px rgba(31, 27, 22, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 5;
	padding: 0;
}
.bw-gallery-arrow svg { width: 20px; height: 20px; stroke: var(--charcoal); fill: none; stroke-width: 2; stroke-linecap: round; }
.bw-gallery-arrow:hover { background: var(--white); }
.bw-gallery-prev { left: 14px; }
.bw-gallery-next { right: 14px; }
.product_meta { font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 20px; }
.product_meta .sku_wrapper, .product_meta .posted_in { display: block; margin-bottom: 6px; }
.woocommerce div.product .woocommerce-tabs { margin: 56px 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; border-bottom: 1px solid var(--border); }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
	border: 0;
	background: none;
	border-radius: 0;
	padding: 0;
	margin: 0 28px 0 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-weight: 600; color: var(--muted); padding: 12px 2px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--charcoal); border-bottom: 2px solid var(--terra); }
.woocommerce div.product .woocommerce-tabs .panel { padding: 28px 0; }
.related.products > h2, .upsells.products > h2 { font-size: 24px; margin-bottom: 24px; }

/* ============ Trust badges (under add-to-cart) ============ */
.bw-trust {
	list-style: none;
	margin: 4px 0 24px;
	padding: 18px 20px;
	background: var(--cream);
	border-radius: var(--radius);
	display: grid;
	gap: 10px;
}
.bw-trust li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--charcoal);
	margin: 0;
}
.bw-trust svg {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	stroke: var(--terra);
	fill: none;
	stroke-width: 1.8;
}

/* ============ Sticky buy bar (product pages) ============ */
.bw-sticky-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 300;
	background: rgba(255, 255, 255, 0.98);
	border-top: 1px solid var(--border);
	box-shadow: 0 -8px 28px rgba(31, 27, 22, 0.08);
	transform: translateY(110%);
	transition: transform 0.3s ease;
}
.bw-sticky-bar.visible { transform: translateY(0); }
.bw-sticky-inner {
	max-width: 1550px;
	margin: 0 auto;
	padding: 12px 24px;
	display: flex;
	align-items: center;
	gap: 16px;
}
.bw-sticky-inner img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 10px;
	flex: 0 0 52px;
}
.bw-sticky-info { min-width: 0; flex: 1 1 auto; }
.bw-sticky-title {
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bw-sticky-price { font-weight: 700; font-size: 15px; }
.bw-sticky-bar .button { padding: 12px 28px; white-space: nowrap; }
@media (max-width: 640px) {
	.bw-sticky-title { display: none; }
}

/* ============ WooCommerce: terracotta for .button.alt (WC default is purple) ============ */
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
	background: var(--terra);
	border-color: var(--terra);
	color: #fff;
}
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
	background: var(--terra-dark);
	border-color: var(--terra-dark);
	color: #fff;
}

/* ============ Cart page ============ */
.woocommerce table.shop_table {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: var(--white);
}
.woocommerce table.shop_table th {
	background: var(--cream);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 14px 18px;
	font-weight: 700;
}
.woocommerce table.shop_table td {
	padding: 18px;
	border-top: 1px solid var(--border);
	vertical-align: middle;
}
.woocommerce table.cart .product-thumbnail img { width: 84px; border-radius: 10px; }
.woocommerce table.cart td.product-name a { font-weight: 600; color: var(--charcoal); }
.woocommerce table.cart td.product-price .amount, .woocommerce table.cart td.product-subtotal .amount { font-weight: 700; }
.woocommerce a.remove {
	color: #b3261e !important;
	font-size: 24px !important;
	font-weight: 400;
	width: 32px;
	height: 32px;
	line-height: 30px;
}
.woocommerce a.remove:hover { background: #b3261e !important; color: #fff !important; }
.woocommerce-cart table.cart td.actions {
	background: var(--cream);
	padding: 18px;
	border-top: 1px solid var(--border);
}
.woocommerce-cart table.cart td.actions .coupon { display: flex; gap: 10px; float: left; }
.woocommerce-cart table.cart td.actions .coupon .input-text {
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 12px 18px;
	font-size: 14px;
	min-width: 200px;
}
.woocommerce-cart table.cart td.actions .button { width: auto; }
.woocommerce .cart-collaterals .cart_totals {
	background: var(--cream);
	border-radius: var(--radius-lg);
	padding: 28px;
	width: 100%;
	float: none;
}
.woocommerce .cart_totals h2 {
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 18px;
}
.woocommerce .cart_totals table.shop_table { border: 0; box-shadow: none; background: var(--white); margin-bottom: 20px; }
.woocommerce .cart_totals table.shop_table th, .woocommerce .cart_totals table.shop_table td { padding: 12px 16px; }
.wc-proceed-to-checkout { padding: 0; }
.wc-proceed-to-checkout .button.checkout-button { width: 100%; padding: 18px; font-size: 17px; margin-bottom: 0; }
@media (min-width: 900px) {
	.woocommerce-cart .woo-wrap { display: flow-root; }
	.woocommerce-cart form.woocommerce-cart-form { float: left; width: 64%; }
	.woocommerce-cart .cart-collaterals { float: right; width: 32%; }
}
@media (max-width: 899px) {
	.woocommerce-cart table.cart thead { display: none; }
	.woocommerce-cart table.cart tbody tr.woocommerce-cart-form__cart-item {
		display: block;
		position: relative;
		border: 1px solid var(--border);
		border-radius: 16px;
		margin-bottom: 16px;
		padding: 6px 18px;
	}
	.woocommerce-cart table.cart tbody td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		border: 0;
		padding: 10px 0;
	}
	.woocommerce-cart table.cart tbody td::before {
		content: attr(data-title);
		font-size: 13px;
		font-weight: 600;
		color: var(--muted);
		flex: 0 0 auto;
	}
	.woocommerce-cart table.cart td.product-thumbnail::before,
	.woocommerce-cart table.cart td.product-remove::before,
	.woocommerce-cart table.cart td.actions::before { content: none; }
	.woocommerce-cart table.cart td.product-remove {
		position: absolute;
		top: 2px;
		right: 6px;
		padding: 0;
	}
	.woocommerce-cart table.cart td.product-thumbnail { justify-content: flex-start; }
	.woocommerce-cart table.cart td .bw-qty { max-width: 200px; }
	.woocommerce-cart table.cart td.actions {
		display: block;
		border: 1px solid var(--border);
		border-radius: 16px;
		padding: 18px;
		margin-bottom: 8px;
	}
	.woocommerce-cart table.cart td.actions .coupon { float: none; margin-bottom: 12px; }
	.woocommerce-cart table.cart td.actions .coupon .input-text { flex: 1; min-width: 0; }
	.woocommerce-cart table.cart td.actions > .button { width: 100%; }
	.woocommerce-cart .cart-collaterals { margin-top: 8px; }
}

/* ============ Checkout page ============ */
.woocommerce form .form-row { margin-bottom: 18px; }
.woocommerce form .form-row > label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 8px;
	color: var(--charcoal);
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 13px 14px;
	font-size: 15px;
	font-family: var(--font);
	background: #fff;
	color: var(--charcoal);
	width: 100%;
	min-height: 50px;
}
.woocommerce form .form-row textarea { min-height: 110px; }
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	border-color: var(--terra);
	outline: none;
	box-shadow: 0 0 0 3px rgba(192, 86, 59, 0.14);
}
.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: #b3261e; }
#order_review {
	background: var(--cream);
	border-radius: var(--radius-lg);
	padding: 28px;
}
#order_review h3, .woocommerce-checkout h3 {
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 20px;
}
.woocommerce-checkout-review-order-table { background: #fff; }
.woocommerce-checkout #payment {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 14px;
	margin-top: 20px;
}
.woocommerce-checkout #payment ul.payment_methods {
	border-bottom: 1px solid var(--border);
	padding: 20px;
	margin: 0;
}
.woocommerce-checkout #payment div.payment_box { background: var(--cream); border-radius: 10px; }
.woocommerce-checkout #payment div.form-row.place-order { padding: 20px; margin: 0; }
.woocommerce-checkout #payment #place_order { width: 100%; padding: 18px; font-size: 17px; float: none; }
@media (min-width: 900px) {
	form.woocommerce-checkout {
		display: grid;
		grid-template-columns: 1fr 400px;
		gap: 24px 48px;
		align-items: start;
	}
	/* Left column: billing/shipping form. Right column: order heading + review. */
	form.woocommerce-checkout > .col2-set { grid-column: 1; grid-row: 1 / span 2; }
	form.woocommerce-checkout > #order_review_heading { grid-column: 2; grid-row: 1; margin-bottom: 0; }
	form.woocommerce-checkout > #order_review { grid-column: 2; grid-row: 2; }
	/* Express-payment button placeholders go full-width below the columns. */
	form.woocommerce-checkout > div[id^="ppc-button"] { grid-column: 1 / -1; }
	form.woocommerce-checkout > div[id^="ppc-button"]:empty { display: none; }
	#order_review { position: sticky; top: 96px; }
}
@media (max-width: 899px) {
	form.woocommerce-checkout { display: block; }
	#order_review { margin-top: 36px; padding: 22px; }
	.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; }
}

/* ============ WooCommerce Blocks cart (the /cart/ page uses blocks) ============ */
/* NOTE: these rules also live in Customizer > Additional CSS (applied live 2026-10-04);
   keep both copies in sync. Markup has no wrapper on these pages. */
.wp-block-woocommerce-cart.alignwide { max-width: none; }
.wc-block-components-sidebar-layout.wc-block-cart {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 48px;
	align-items: start;
}
/* Override WooCommerce's default 65%/35% widths + paddings on the grid children. */
.wc-block-components-sidebar-layout.wc-block-cart > .wc-block-components-main,
.wc-block-components-sidebar-layout.wc-block-cart > .wc-block-components-sidebar {
	width: auto;
	margin: 0;
	padding-left: 0;
	padding-right: 0;
}
/* Line items */
.wc-block-cart .wc-block-cart-item {
	border-bottom: 1px solid var(--border);
	padding: 22px 0;
}
.wc-block-cart .wc-block-cart-item__image img { border-radius: 12px; }
.wc-block-cart .wc-block-components-product-name {
	font-weight: 600;
	font-size: 17px;
	color: var(--charcoal);
	text-decoration: none;
}
.wc-block-cart .wc-block-components-product-name:hover { color: var(--terra); }
.wc-block-cart .wc-block-formatted-money-amount { font-weight: 700; }
/* Totals sidebar card */
.wc-block-components-sidebar.wc-block-cart__sidebar {
	background: var(--cream);
	border-radius: var(--radius-lg);
	padding: 28px;
	margin: 0;
}
.wc-block-cart__sidebar .wc-block-components-totals-wrapper { border-top: 0; padding: 0; }
.wc-block-cart__sidebar .wc-block-components-totals-item { padding-left: 0; padding-right: 0; }
.wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
	font-size: 22px;
	font-weight: 800;
}
/* Coupon panel */
.wc-block-components-totals-coupon { border-bottom: 1px solid var(--border); }
/* Proceed to checkout: proper full-width terracotta pill */
.wc-block-cart__submit-button.wc-block-components-button.contained {
	background: var(--terra);
	border: 1px solid var(--terra);
	border-radius: 999px;
	color: #fff;
	width: 100%;
	padding: 18px;
	font-size: 17px;
	font-weight: 600;
	text-align: center;
	display: block;
	text-decoration: none;
}
.wc-block-cart__submit-button.wc-block-components-button.contained:hover {
	background: var(--terra-dark);
	border-color: var(--terra-dark);
	color: #fff;
}
.wc-block-cart__submit-button .wc-block-components-button__text { color: inherit; }
/* Empty cart */
.wc-block-cart__empty-cart-container { text-align: center; padding: 48px 0; }
@media (max-width: 1023px) {
	.wc-block-components-sidebar-layout.wc-block-cart {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
}

/* ============ Notices, pagination ============ */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	border: 1px solid var(--border);
	border-top: 3px solid var(--terra);
	background: var(--cream);
	border-radius: var(--radius);
	padding: 14px 20px;
}
.woocommerce-pagination { margin-top: 48px; }
.woocommerce nav.woocommerce-pagination ul { border: 0; display: flex; gap: 8px; justify-content: center; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	border: 1px solid var(--border);
	border-radius: 999px;
	min-width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	color: var(--charcoal);
	padding: 0 14px;
}
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
	background: var(--charcoal);
	border-color: var(--charcoal);
	color: #fff;
}

/* ============ Cart / checkout / account basics ============ */
.woocommerce table.shop_table { border: 1px solid var(--border); border-radius: var(--radius); border-collapse: separate; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 16px; }
.woocommerce .cart-collaterals .cart_totals { background: var(--cream); border-radius: var(--radius-lg); padding: 32px; }
#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment { background: var(--cream); border-radius: var(--radius-lg); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea,
.woocommerce form .form-row select, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], textarea, select {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px 16px;
	font-family: var(--font);
	font-size: 15px;
	width: 100%;
	background: var(--white);
	color: var(--charcoal);
}
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.woocommerce-MyAccount-navigation a {
	display: block;
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 500;
	color: var(--charcoal);
}
.woocommerce-MyAccount-navigation .is-active a { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }

/* ============ Blog / pages ============ */
.post-list { display: grid; gap: 40px; }
.post-card { border-bottom: 1px solid var(--border); padding-bottom: 40px; }
.post-card h2 { font-size: 26px; }
.post-meta { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.entry-content > * { max-width: 780px; }
/* WooCommerce pages (cart, checkout, account) use the full container, not the blog measure. */
.entry-content > .woocommerce,
.entry-content > .wp-block-woocommerce-cart,
.entry-content > .wp-block-woocommerce-checkout { max-width: none; }
.alignwide { max-width: 1550px; }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border); background: var(--white); padding: 64px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; color: var(--charcoal); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--muted); font-size: 15px; }
.footer-col a:hover { color: var(--terra); }
.footer-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.footer-contact svg { width: 18px; height: 18px; flex: 0 0 18px; stroke: var(--terra); fill: none; stroke-width: 1.8; margin-top: 2px; }
.footer-contact span { color: var(--muted); font-size: 15px; }
.footer-contact .footer-company { font-weight: 700; font-size: 14px; letter-spacing: 0.02em; color: var(--charcoal); margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 15px; max-width: 300px; }
.footer-bottom {
	margin-top: 48px;
	border-top: 1px solid var(--border);
	padding: 24px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	font-size: 14px;
	color: var(--muted);
}

/* ============ 404 ============ */
.error-404 { text-align: center; padding: 96px 0; }
.error-404 h1 { font-size: 72px; margin-bottom: 16px; }

/* ============ Desktop ============ */
@media (min-width: 900px) {
	.section { padding: 96px 0; }
	.section-head h2 { font-size: 32px; }
	.hero h1 { font-size: 60px; }
	.cat-grid { grid-template-columns: repeat(2, 1fr); }
	ul.products { grid-template-columns: repeat(4, 1fr); gap: 28px; }
	.brand-grid { grid-template-columns: repeat(3, 1fr); }
	.single-product .product { grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: start; }
	.footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
	.shop-head .page-title { font-size: 40px; }
	.page-pad { padding: 64px 0 96px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
	html { scroll-behavior: auto; }
}
