/*
Theme Name: Bin Khalid Theme
Theme URI:
Author: User
Author URI:
Description: A custom WooCommerce theme for Bin Khalid, premium unstitched men's fabric.
Version: 2.1.0
Requires PHP: 7.4
Text Domain: binkhalid
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--paper: #F7F4EE;
	--paper-2: #EEE9DF;
	--white: #FFFFFF;
	--ink: #1C2333;
	--ink-2: #2E3850;
	--text: #2A2A2A;
	--muted: #6B675F;
	--line: #DCD5C8;
	--accent: #8C6D42;
	--star: #B8893E;
	--sale: #9E3B2C;

	--font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

	--gutter: 32px;
	--max: 1320px;
	--header-h: 72px;
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	/* Cormorant's default numbers dip below the line (3, 4, 5, 9); use evenly aligned ones everywhere. */
	font-variant-numeric: lining-nums;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.2; color: var(--ink); }

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 16px; top: -100px;
	z-index: 1000;
	background: var(--ink);
	color: var(--paper);
	padding: 10px 16px;
}
.skip-link:focus { top: 16px; }

.container {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.container--narrow { max-width: 820px; }

.eyebrow {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button,
:is(.woocommerce, .woocommerce-page) a.button,
:is(.woocommerce, .woocommerce-page) button.button,
:is(.woocommerce, .woocommerce-page) input.button,
:is(.woocommerce, .woocommerce-page) #respond input#submit,
:is(.woocommerce, .woocommerce-page) a.button.alt,
:is(.woocommerce, .woocommerce-page) button.button.alt,
.wp-element-button,
.wc-block-components-button:not(.is-link) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.button:hover,
:is(.woocommerce, .woocommerce-page) a.button:hover,
:is(.woocommerce, .woocommerce-page) button.button:hover,
:is(.woocommerce, .woocommerce-page) input.button:hover,
:is(.woocommerce, .woocommerce-page) #respond input#submit:hover,
:is(.woocommerce, .woocommerce-page) a.button.alt:hover,
:is(.woocommerce, .woocommerce-page) button.button.alt:hover,
.wp-element-button:hover,
.wc-block-components-button:not(.is-link):hover {
	background: var(--ink-2);
	border-color: var(--ink-2);
	color: var(--paper);
}

.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--ink); color: var(--paper); }

.button--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button--light:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.button .icon { width: 18px; height: 18px; }

.link-arrow {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 6px;
	color: var(--ink);
}
.link-arrow:hover { color: var(--accent); }

.round-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--white);
	color: var(--ink);
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.round-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.round-btn .icon { width: 18px; height: 18px; }
.carousel__prev .icon { transform: rotate(180deg); }

/* ==========================================================================
   Header
   ========================================================================== */

.announcement {
	background: var(--ink);
	color: var(--paper);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-align: center;
	padding: 8px 0;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 200; /* above WooCommerce's product photo controls (z-index 99) */
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }

/* Logo | menu | icons, all on one row. */
.site-header__row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 32px;
	height: var(--header-h);
}
.site-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }

.icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	cursor: pointer;
}
.icon-btn:hover { color: var(--accent); }

.nav-toggle { display: none; }

.logo {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-decoration: none;
	color: var(--ink);
}
.logo__name {
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1;
}
.logo__tag {
	margin-top: 5px;
	font-size: 9px;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--muted);
}
.logo__img { max-height: 48px; width: auto; }

.bk-cart-count {
	position: absolute;
	top: 6px;
	right: 4px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--ink);
	color: var(--paper);
	font-size: 10px;
	font-weight: 500;
	line-height: 17px;
	text-align: center;
}
.bk-cart-count.is-empty { display: none; }

.nav__list, .nav .menu {
	display: flex;
	justify-content: center;
	gap: 36px;
}
.nav a {
	display: block;
	padding: 10px 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
}
.nav a:hover,
.nav .current-menu-item > a,
.nav .current-product_cat-ancestor > a { color: var(--accent); }

.search-panel {
	border-top: 1px solid var(--line);
	padding: 14px 0;
	background: var(--paper);
}
.search-form { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--line);
	background: var(--white);
	font: inherit;
	color: var(--text);
}

/* ==========================================================================
   Carousel (hero + reviews)
   ========================================================================== */

.carousel { --per-view: 1; --gap: 0px; position: relative; }
.carousel__viewport {
	overflow: hidden;
	touch-action: pan-y; /* page still scrolls vertically; sideways swipes go to the slider */
	cursor: grab;
	user-select: none;
}
.carousel__viewport:active { cursor: grabbing; }
.carousel__viewport a, .carousel__viewport button { cursor: pointer; }
.carousel__track {
	display: flex;
	gap: var(--gap);
	transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}
.carousel__slide {
	flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
	min-width: 0;
}

.carousel__dots { display: flex; justify-content: center; gap: 6px; }
.carousel__dot {
	width: 32px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.carousel__dot::before {
	content: '';
	display: block;
	height: 2px;
	background: currentColor;
	opacity: 0.3;
}
.carousel__dot.is-active::before { opacity: 1; }

/* ==========================================================================
   Hero: promotional banners
   ========================================================================== */

.hero { overflow: hidden; }

.slide {
	background: var(--slide-bg, var(--paper-2));
	color: var(--ink);
}
.slide__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 48px;
	min-height: 540px;
	padding-top: 48px;
	padding-bottom: 64px;
}
.slide__copy { max-width: 540px; padding-left: 40px; }
.slide__eyebrow {
	margin: 0 0 16px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.8;
}
.slide__title {
	font-family: var(--font-display);
	font-size: clamp(44px, 5vw, 72px);
	font-weight: 600;
	line-height: 1.02;
	color: inherit;
	margin-bottom: 18px;
}
.slide__text { font-size: 18px; margin-bottom: 30px; opacity: 0.85; }
.slide__media {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 20px;
}
.slide__media img {
	width: 42%;
	max-width: 270px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: center top;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.slide__media img:nth-child(2) { margin-top: 52px; }

.slide--dark { color: var(--paper); }
.slide--dark .button { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.slide--dark .button:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--ink);
	cursor: pointer;
}
.hero__arrow:hover { background: var(--white); }
.hero__arrow .icon { width: 20px; height: 20px; }
.hero .carousel__prev { left: 20px; }
.hero .carousel__next { right: 20px; }

.hero__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	z-index: 2;
}
.hero[data-theme="dark"] .hero__dots { color: var(--paper); }
.hero[data-theme="light"] .hero__dots { color: var(--ink); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 80px 0; }
.section--tight { padding-top: 0; }

.section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 32px;
}
.section__title {
	font-family: var(--font-display);
	font-size: clamp(30px, 3vw, 40px);
	font-weight: 600;
}

.grid { display: grid; gap: 24px; }
.grid--products { grid-template-columns: repeat(4, 1fr); row-gap: 48px; }

/* Shop by season */

/* As many panels as there are categories: 2 per row on desktop, 3 when there are 3, and so on.
   Each panel lays itself out by its own width (container query), not the screen's. */
.seasons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
	gap: 24px;
}
.season {
	container-type: inline-size;
	background: var(--season-tint, var(--paper-2));
}
.season__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	padding: 20px;
}
.season__media { display: block; }
.season__media img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: center 35%;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
@container (min-width: 500px) {
	.season__inner {
		grid-template-columns: 40% 1fr;
		align-items: center;
		gap: 32px;
		padding: 28px;
	}
	.season__media img { aspect-ratio: 3 / 4; object-position: center top; }
}
.season__label {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
}
.season__title {
	font-family: var(--font-display);
	font-size: clamp(28px, 2.6vw, 36px);
	font-weight: 600;
	margin-bottom: 10px;
}
.season__title a { text-decoration: none; }
.season__title a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.season__text { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.season__label .woocommerce-Price-amount { letter-spacing: 0.08em; }

/* Product card */

.card { display: flex; flex-direction: column; }
.card__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--paper-2);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	background: var(--sale);
	color: var(--white);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.card__badge--muted { background: var(--muted); }
.card__body { padding: 16px 0 14px; flex: 1; }
.card__title { font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.4; margin-bottom: 6px; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Price with the rating beside it; wraps under on narrow cards. */
.card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
}
.card__price, .card__meta .price { font-size: 15px; color: var(--ink); }
.card__price del, .card__meta .price del { color: var(--muted); margin-right: 4px; font-size: 14px; }
.card__price ins, .card__meta .price ins { text-decoration: none; color: var(--sale); }

.card .card__add {
	width: 100%;
	padding: 12px 16px;
	background: transparent;
	color: var(--ink);
	font-size: 12px;
}
.card .card__add:hover { background: var(--ink); color: var(--paper); }
.card .card__add.loading { opacity: 0.6; }
/* "Added ✓" for 2 seconds after adding (js/main.js). */
.card .card__add.is-added,
.woocommerce ul.products li.product .button.is-added,
.woocommerce div.product form.cart .button.is-added { background: var(--ink); color: var(--paper); }
/* The slide-in cart replaces WooCommerce's "View cart" link under the button. */
a.added_to_cart.wc-forward { display: none !important; }

/* Star rating: five stars filled to the average, e.g. --rating: 4.6 */
.rating {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	text-decoration: none;
	white-space: nowrap;
}
.rating__stars {
	display: inline-block;
	font-size: 13px;
	line-height: 1;
	letter-spacing: 1px;
}
.rating__stars::before {
	content: '★★★★★';
	background: linear-gradient(90deg, var(--star) calc(var(--rating, 0) / 5 * 100%), var(--line) 0);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.rating__count { font-size: 13px; color: var(--muted); }
.rating:hover .rating__count { color: var(--ink); text-decoration: underline; }

/* Fabric story */

.fabric { background: var(--ink); color: #D9D6CF; }
.fabric__inner {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 72px;
	padding-top: 64px;
	padding-bottom: 64px;
}
.fabric__media img {
	width: auto;
	height: min(560px, calc(100vh - 260px));
	min-height: 380px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}
.fabric .eyebrow { color: #C9A977; }
.fabric__title {
	font-family: var(--font-display);
	font-size: clamp(34px, 3.4vw, 46px);
	font-weight: 600;
	color: var(--paper);
	margin-bottom: 16px;
}
.fabric__copy { max-width: 560px; }
.fabric__copy > p { font-size: 16px; }
.specs { margin: 24px 0 28px; }
.specs__row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 16px;
	padding: 11px 0;
	border-top: 1px solid rgba(247, 244, 238, 0.16);
	font-size: 15px;
}
.specs__row:last-child { border-bottom: 1px solid rgba(247, 244, 238, 0.16); }
.specs dt { color: #9DA3B2; }
.specs dd { margin: 0; color: var(--paper); }

/* Services */

.services {
	background: var(--paper-2);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.services__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
	padding-top: 40px;
	padding-bottom: 40px;
}
.service { display: flex; gap: 14px; align-items: flex-start; }
.service .icon { flex-shrink: 0; width: 26px; height: 26px; color: var(--accent); }
.service__title { font-family: var(--font-body); font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.service__text { margin: 0; font-size: 14px; color: var(--muted); }

/* Reviews slider */

.reviews .carousel { --per-view: 3; --gap: 24px; }
.reviews__summary {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0 0;
	font-size: 14px;
	color: var(--muted);
}
.reviews__summary .rating__stars { font-size: 15px; }
.reviews__nav { display: flex; gap: 8px; flex-shrink: 0; }
.reviews__dots { margin-top: 20px; color: var(--ink); }

.review {
	margin: 0;
	display: flex;
	flex-direction: column;
	padding: 28px;
	background: var(--white);
	border: 1px solid var(--line);
}
.stars { display: inline-flex; gap: 2px; margin-bottom: 16px; }
.stars svg.on { fill: var(--star); }
.stars svg.off { fill: var(--line); }
.review__text { margin: 0 0 24px; flex: 1; font-size: 16px; line-height: 1.65; color: var(--text); }
.review__meta { display: flex; flex-direction: column; gap: 2px; padding-top: 16px; border-top: 1px solid var(--line); }
.review__name { font-size: 14px; font-weight: 500; color: var(--ink); }
.review__product { font-size: 13px; color: var(--muted); text-decoration: none; }
a.review__product:hover { color: var(--ink); text-decoration: underline; }

/* WhatsApp CTA */

.cta { padding-bottom: 80px; }
.cta__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 40px;
	padding-bottom: 40px;
	border: 1px solid var(--line);
	background: var(--white);
}
.cta__title { font-family: var(--font-body); font-size: 22px; font-weight: 500; margin-bottom: 6px; }
.cta p { margin: 0; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	background: var(--paper-2);
	border-top: 1px solid var(--line);
	font-size: 14px;
	color: var(--muted);
}
.site-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 48px;
	padding-top: 56px;
	padding-bottom: 40px;
}
.logo--footer { margin-bottom: 16px; }
.logo--footer .logo__name { font-size: 24px; }
.site-footer__brand p { max-width: 320px; }
.site-footer__social { display: flex; gap: 20px; }
.site-footer__heading {
	margin-bottom: 16px;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink);
}
.site-footer li { margin-bottom: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.site-footer__bottom {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding-top: 20px;
	padding-bottom: 20px;
	border-top: 1px solid var(--line);
	font-size: 13px;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

.page { padding: 48px 0 88px; }
.page__title,
.woocommerce h1.page-title {
	font-family: var(--font-display);
	font-size: clamp(34px, 4vw, 48px);
	font-weight: 600;
	margin: 0 0 28px;
}
.entry__content > * + * { margin-top: 1em; }
/* Text links only; buttons keep their own colours (otherwise their text turns navy on navy). */
.entry__content a:not(.button):not(.wp-element-button):not(.wc-block-components-button) { color: var(--ink); }
.entry__content > p:first-child { font-size: 18px; color: var(--ink); }
.entry__content h2 {
	margin: 2em 0 0;
	font-family: var(--font-body);
	font-size: 20px;
	font-weight: 500;
	color: var(--ink);
}
.entry__content h2 + * { margin-top: 0.5em; }
.entry__content ul { padding-left: 1.2em; }
.entry__content li + li { margin-top: 0.4em; }
.entry__content .updated { font-size: 14px; color: var(--muted); }

/* Contact block ([bk_contact] shortcode) */
.contact-card {
	padding: 28px;
	border: 1px solid var(--line);
	background: var(--white);
}
.contact-card .button { display: inline-flex; align-items: center; gap: 10px; }
.contact-card__list { margin: 24px 0 0; }
.contact-card__list > div {
	display: grid;
	grid-template-columns: 170px 1fr;
	gap: 16px;
	padding: 12px 0;
	border-top: 1px solid var(--line);
}
.contact-card__list dt { color: var(--muted); }
.contact-card__list dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) {
	.contact-card { padding: 20px; }
	.contact-card__list > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ==========================================================================
   WooCommerce
   ========================================================================== */

.woocommerce .woocommerce-breadcrumb {
	margin: 0 0 24px;
	font-size: 13px;
	color: var(--muted);
}
.woocommerce .woocommerce-breadcrumb a { color: var(--muted); }

.woocommerce .woocommerce-result-count { font-size: 14px; color: var(--muted); }

/* Sort dropdown: native arrow replaced with one that has room to breathe. */
.woocommerce .woocommerce-ordering select {
	-webkit-appearance: none;
	appearance: none;
	min-width: 230px;
	padding: 11px 44px 11px 14px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C2333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--ink);
	cursor: pointer;
}
.woocommerce .woocommerce-ordering select:hover { border-color: var(--ink); }
.woocommerce .woocommerce-ordering select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Checkout: WooCommerce drops the Country field's top margin assuming it's the first
   field. Here First/Last name come first, so put the gap back. */
.wc-block-components-form .wc-block-components-checkout-step .wc-block-components-address-form .wc-block-components-country-input:not(:first-child) {
	margin-top: 12px;
}
/* Cart page: WooCommerce's cart block sets most text to 13px; bring it up to the body size. */
.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name { font-size: 17px; }
.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices,
.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total { font-size: 16px; }
.wc-block-cart .wc-block-components-product-metadata { font-size: 14px; }
.wc-block-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { font-size: 15px; }
.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header,
.wc-block-cart .wc-block-cart__totals-title { font-size: 14px; }
.wc-block-cart .wc-block-components-panel__button,
.wc-block-cart .wc-block-components-totals-item__label,
.wc-block-cart .wc-block-components-totals-item__value { font-size: 16px; }
.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 21px; }
.wc-block-cart .wc-block-components-totals-item__description { font-size: 14px; }
.wc-block-cart .wc-block-cart__submit-button { font-size: 14px; }

.woocommerce .quantity .qty,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce #review_form #respond textarea,
.woocommerce #review_form #respond input[type="text"],
.woocommerce #review_form #respond input[type="email"] {
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--white);
	font: inherit;
	color: var(--text);
}

/* Catalogue grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 48px 24px;
	margin: 0 0 48px;
	clear: both;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
}
.woocommerce ul.products li.product .loop-media {
	position: relative;
	display: block;
	margin: 0 0 16px;
	overflow: hidden;
	background: var(--paper-2);
}
.woocommerce ul.products li.product a img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: center top; /* keep the brand title at the top of taller photos */
	margin: 0;
	background: var(--paper-2);
}

/* Product photos zoom in slightly on hover, in the shop grid and on homepage cards. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.woocommerce ul.products li.product a img,
	.card__media img { transition: transform 0.6s ease; }
	.woocommerce ul.products li.product:hover a img,
	.card:hover .card__media img { transform: scale(1.06); }
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	padding: 0;
	margin-bottom: 6px;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--ink);
}
.woocommerce ul.products li.product .card__meta { margin-bottom: 14px; }
.woocommerce ul.products li.product .price { display: inline; margin: 0; font-size: 15px; color: var(--ink); }
.woocommerce ul.products li.product .button {
	width: 100%;
	margin-top: auto;
	padding: 12px 16px;
	background: transparent;
	color: var(--ink);
	font-size: 12px;
}
.woocommerce ul.products li.product .button:hover { background: var(--ink); color: var(--paper); }

.woocommerce span.onsale {
	top: 12px;
	left: 12px;
	right: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 4px 10px;
	border-radius: 0;
	background: var(--sale);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.woocommerce .price del,
.woocommerce div.product p.price del { color: var(--muted); opacity: 1; }
.woocommerce .price ins,
.woocommerce div.product p.price ins { text-decoration: none; color: var(--sale); }

.woocommerce .star-rating span::before,
.woocommerce p.stars a { color: var(--star); }

.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; margin: 0 4px; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span { padding: 10px 14px; border: 1px solid var(--line); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Single product: photo in a fixed-width column, details beside it. */
.woocommerce div.product {
	display: grid;
	grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
	column-gap: 64px;
	align-items: start;
}
.woocommerce div.product > * { grid-column: 1 / -1; }
.woocommerce div.product > div.images,
.woocommerce div.product > div.woocommerce-product-gallery {
	grid-column: 1;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}
.woocommerce div.product > div.summary {
	grid-column: 2;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding-top: 8px;
}
.woocommerce div.product > span.onsale { grid-column: 1; }
.woocommerce div.product div.images .woocommerce-product-gallery__image { background: var(--paper-2); overflow: hidden; }
.woocommerce div.product div.images img { width: 100%; height: auto; }
.woocommerce div.product div.images .flex-control-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.woocommerce div.product div.images .flex-control-thumbs li { width: 72px !important; float: none !important; }

/* Lightbox (magnifier) button in the photo's corner */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	z-index: 3;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.woocommerce div.product div.images .woocommerce-product-gallery__trigger::before { border-color: var(--ink); top: 10px; left: 10px; }
.woocommerce div.product div.images .woocommerce-product-gallery__trigger::after { background: var(--ink); top: 23px; left: 23px; }

.woocommerce div.product .product_title {
	font-family: var(--font-display);
	font-size: clamp(30px, 3.4vw, 44px);
	font-weight: 600;
	margin-bottom: 12px;
}
.woocommerce div.product .woocommerce-product-rating { margin-bottom: 12px; }
.woocommerce div.product .woocommerce-review-link { font-size: 14px; color: var(--muted); }
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	font-size: 22px;
	color: var(--ink);
}
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--muted); margin-bottom: 24px; }
.woocommerce div.product form.cart { display: flex; gap: 12px; align-items: stretch; margin-bottom: 24px; }
.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce .quantity .qty { width: 72px; height: 100%; text-align: center; }
.woocommerce div.product form.cart .button { float: none; flex: 1; max-width: 320px; }
.woocommerce div.product .product_meta { font-size: 14px; color: var(--muted); }
.woocommerce div.product .product_meta > span { display: block; margin-bottom: 4px; }
.woocommerce div.product .product_meta a { color: var(--ink); }

.woocommerce div.product .woocommerce-tabs { clear: both; padding-top: 48px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 24px; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-bottom-color: var(--line); }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0 28px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	padding: 12px 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	background: none;
	border-bottom: 2px solid var(--ink);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--ink); }
.woocommerce div.product .woocommerce-tabs .panel h2 { font-family: var(--font-body); font-size: 20px; font-weight: 500; margin-bottom: 16px; }

.woocommerce #reviews #comments ol.commentlist li .comment-text { border-color: var(--line); border-radius: 0; }

/* Rating breakdown above the reviews; each row filters the list. */
.rating-summary {
	display: grid;
	grid-template-columns: auto minmax(0, 420px);
	align-items: center;
	gap: 16px 48px;
	margin-bottom: 40px;
	padding: 24px 28px;
	background: var(--white);
	border: 1px solid var(--line);
}
.rating-summary__score { display: flex; align-items: center; gap: 14px; }
.rating-summary__average {
	font-family: var(--font-display);
	font-size: 56px;
	font-weight: 600;
	line-height: 1;
	color: var(--ink);
}
.rating-summary__score .rating__stars { display: block; font-size: 18px; margin-bottom: 4px; }
.rating-summary__based { font-size: 14px; color: var(--muted); }

.rating-bars { display: grid; gap: 4px; }
.rating-bar {
	display: grid;
	grid-template-columns: 34px 1fr 28px;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 4px 8px;
	border: 1px solid transparent;
	background: none;
	font-size: 14px;
	color: var(--ink);
	text-align: left;
	cursor: pointer;
}
.rating-bar:hover:not(:disabled) { border-color: var(--line); background: var(--paper); }
.rating-bar[aria-pressed="true"] { border-color: var(--ink); background: var(--paper); }
.rating-bar:disabled { cursor: default; opacity: 0.45; }
.rating-bar__label { white-space: nowrap; }
.rating-bar__track { height: 8px; background: var(--paper-2); overflow: hidden; }
.rating-bar__fill { display: block; height: 100%; background: var(--star); }
.rating-bar__count { text-align: right; color: var(--muted); }

.rating-filter-status {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	font-size: 14px;
}
.rating-filter-status[hidden] { display: none; }
.rating-filter-clear {
	padding: 0;
	border: 0;
	background: none;
	font-size: 14px;
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
}
.woocommerce #reviews #comments ol.commentlist li.review[hidden] { display: none; }

/* Review form */
.woocommerce #review_form #respond { max-width: 720px; }
.woocommerce #review_form #respond .comment-reply-title {
	display: block;
	margin-bottom: 8px;
	font-family: var(--font-body);
	font-size: 20px;
	font-weight: 500;
	color: var(--ink);
}
.woocommerce #review_form #respond p { margin: 0 0 18px; }
.woocommerce #review_form #respond label {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	color: var(--ink);
}
.woocommerce #review_form #respond .required { color: var(--sale); }

/* Label and stars on one line, vertically centred. */
.woocommerce #review_form #respond .comment-form-rating {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
}
.woocommerce #review_form #respond .comment-form-rating label { margin: 0; }
.woocommerce #review_form #respond p.stars {
	margin: 0;
	line-height: 1;
}
.woocommerce #review_form #respond p.stars span { display: flex; gap: 4px; }
.woocommerce #review_form #respond p.stars a { font-size: 20px; }

/* Full width; only resizable in height so the layout can't be pushed sideways. */
.woocommerce #review_form #respond textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 140px;
	resize: vertical;
}
.woocommerce #review_form #respond input[type="text"],
.woocommerce #review_form #respond input[type="email"] { width: 100%; max-width: 420px; }
.woocommerce #review_form #respond .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }
.woocommerce #review_form #respond .comment-form-cookies-consent label { display: inline; margin: 0; font-size: 14px; color: var(--muted); }
.woocommerce #review_form #respond .form-submit { margin-top: 8px; }
.woocommerce #reviews #comments ol.commentlist li img.avatar { border-radius: 50%; background: var(--paper-2); border: 0; }

.woocommerce .related.products > h2,
.woocommerce .upsells.products > h2 {
	font-family: var(--font-body);
	font-size: 22px;
	font-weight: 500;
	margin: 64px 0 24px;
}

/* ==========================================================================
   Slide-in mini cart (inc/mini-cart.php)
   ========================================================================== */

.has-drawer-open, .has-drawer-open body { overflow: hidden; }

.bk-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(28, 35, 51, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s, visibility 0s 0.25s;
}
.bk-drawer-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity 0.25s; }

.bk-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 301;
	display: flex;
	flex-direction: column;
	width: min(420px, 100%);
	height: 100%;
	background: var(--paper);
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s 0.3s;
}
.bk-drawer.is-open { transform: none; visibility: visible; transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1); }
.admin-bar .bk-drawer { top: 32px; height: calc(100% - 32px); }

.bk-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px 14px 24px;
	border-bottom: 1px solid var(--line);
}
.bk-drawer__title { font-family: var(--font-body); font-size: 18px; font-weight: 500; }
.bk-mini-cart__count { color: var(--muted); font-weight: 400; }

.bk-mini-cart__content { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.bk-mini-cart__empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 24px;
	text-align: center;
	color: var(--muted);
}

.bk-mini-cart__items { flex: 1; overflow-y: auto; padding: 0 24px; }
.bk-mini-cart__item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid var(--line);
}
.bk-mini-cart__item.is-updating { opacity: 0.55; pointer-events: none; }
.bk-mini-cart__thumb img { width: 72px; aspect-ratio: 3 / 4; object-fit: cover; background: var(--paper-2); }
.bk-mini-cart__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bk-mini-cart__name { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--ink); text-decoration: none; }
a.bk-mini-cart__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.bk-mini-cart__unit { font-size: 13px; color: var(--muted); }

.bk-qty {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	margin-top: 6px;
	border: 1px solid var(--line);
	background: var(--white);
}
.bk-qty__btn {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 16px;
	line-height: 1;
	color: var(--ink);
	cursor: pointer;
}
.bk-qty__btn:hover:not(:disabled) { background: var(--paper-2); }
.bk-qty__btn:disabled { color: var(--line); cursor: default; }
.bk-qty__value { min-width: 28px; font-size: 14px; text-align: center; }

.bk-mini-cart__end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.bk-mini-cart__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: -6px -8px 0 0;
	color: var(--muted) !important;
	background: none !important;
	border-radius: 50%;
}
.bk-mini-cart__remove:hover { color: var(--sale) !important; background: var(--paper-2) !important; }
.bk-mini-cart__remove .icon { width: 16px; height: 16px; }
.bk-mini-cart__line { font-size: 14px; color: var(--ink); white-space: nowrap; }

.bk-mini-cart__foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); background: var(--white); }
.bk-mini-cart__subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; color: var(--ink); }
.bk-mini-cart__subtotal strong { font-size: 18px; font-weight: 500; }
.bk-mini-cart__note { margin: 4px 0 16px; font-size: 13px; color: var(--muted); }
.bk-mini-cart__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--ink) !important;
	background: var(--white) !important;
	color: var(--text) !important;
}
.woocommerce-message::before,
.woocommerce-info::before { color: var(--ink) !important; }
.woocommerce-error { border-top-color: var(--sale) !important; }

.woocommerce-store-notice, p.demo_store { background: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.grid--products,
	.woocommerce ul.products,
	.woocommerce-page ul.products { grid-template-columns: repeat(3, 1fr); }
	.slide__copy { padding-left: 32px; }
	.nav__list, .nav .menu { gap: 24px; }
	.fabric__inner { gap: 48px; }
	.services__grid { grid-template-columns: repeat(2, 1fr); }
	.reviews .carousel { --per-view: 2; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 768px) {
	:root { --gutter: 16px; --header-h: 60px; }

	/* Menu button | logo | icons; the menu drops down under the header. */
	.site-header__row { grid-template-columns: 1fr auto 1fr; gap: 8px; }
	.nav-toggle { display: inline-flex; justify-self: start; margin-left: -10px; }
	.logo { align-items: center; }
	.logo__name { font-size: 21px; }
	.logo__tag { font-size: 8px; letter-spacing: 0.28em; margin-top: 4px; }
	.site-header__actions { margin-right: -10px; }
	.hide-sm { display: none; }

	.nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		padding: 0 var(--gutter);
	}
	.nav.is-open { display: block; }
	.nav__list, .nav .menu { flex-direction: column; gap: 0; }
	.nav li { border-top: 1px solid var(--line); }
	.nav a { padding: 14px 0; }

	.section { padding: 56px 0; }
	.section--tight { padding-top: 0; }
	.section__head { margin-bottom: 24px; }

	.slide__inner {
		grid-template-columns: 1fr;
		gap: 28px;
		min-height: 0;
		padding-top: 36px;
		padding-bottom: 60px;
	}
	.slide__copy { padding-left: 0; }
	.slide__eyebrow { font-size: 12px; margin-bottom: 12px; }
	.slide__title { font-size: clamp(36px, 10vw, 48px); margin-bottom: 14px; }
	.slide__text { font-size: 16px; margin-bottom: 24px; }
	.slide__media { gap: 12px; }
	.slide__media img { width: 42%; }
	.slide__media img:nth-child(2) { margin-top: 32px; }
	.hero__arrow { display: none; }

	.seasons { gap: 16px; }
	.season__text { font-size: 14px; margin-bottom: 16px; }
	.season .button { padding: 12px 16px; font-size: 12px; }

	.grid--products,
	.woocommerce ul.products,
	.woocommerce-page ul.products { grid-template-columns: repeat(2, 1fr); gap: 32px 12px; }
	.card__title,
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; }

	.fabric__inner { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 48px; }
	.fabric__media img { width: 100%; height: auto; min-height: 0; aspect-ratio: 4 / 3; }

	.services__grid { gap: 24px; padding-top: 32px; padding-bottom: 32px; }

	.reviews .carousel { --per-view: 1; --gap: 12px; }
	.reviews__nav { display: none; }
	.review { padding: 22px; }

	.cta { padding-bottom: 56px; }
	.cta__inner { flex-direction: column; align-items: flex-start; padding: 28px 20px; }

	.site-footer__grid { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
	.site-footer__bottom { flex-direction: column; }

	.page { padding: 32px 0 64px; }
	.rating-summary { grid-template-columns: 1fr; padding: 20px; }
	.rating-summary__average { font-size: 46px; }
	.woocommerce div.product { grid-template-columns: minmax(0, 1fr); }
	.woocommerce div.product > div.summary { grid-column: 1; padding-top: 24px; }
	.woocommerce div.product div.images { max-width: 480px; }
	.woocommerce div.product form.cart .button { max-width: none; }
}

/* Below 600px the WordPress admin bar scrolls away with the page. */
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

@media (max-width: 480px) {
	.services__grid { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
	.admin-bar .bk-drawer { top: 46px; height: calc(100% - 46px); }
}

@media (prefers-reduced-motion: reduce) {
	.carousel__track,
	.bk-drawer, .bk-drawer.is-open,
	.bk-drawer-backdrop, .bk-drawer-backdrop.is-open { transition: none; }
}
