/*
 * Fine Fit storefront polish (2026-12): mobile hero, homepage hierarchy, shop cards, product price row, checkout shipping.
 * Loaded after the theme stylesheet. Every rule is scoped so it only affects the surface named in its heading.
 * Playfair Display is loaded at 400/500/600 and Inter at 400/500/600, so "bold" here means 600.
 */

/* ---------------------------------------------------------------------------------------------
 * 1. Homepage hero, mobile only. Desktop and tablet-landscape are intentionally untouched.
 *    Hooks: .ko-hero (outer container) and .ko-hero-card (text card) are set in the Elementor homepage.
 * ------------------------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.site-main--home .elementor-element.ko-hero {
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		min-height: 32rem;
		padding: 0 !important;
	}
	/* The image is the hero here; keep only a soft shade behind the card. */
	body.home .elementor-element.ko-hero::before {
		background: linear-gradient(180deg, rgb(22 20 17 / 0%) 50%, rgb(22 20 17 / 24%) 100%);
	}
	.site-main--home .elementor-element.ko-hero > .e-con-inner {
		justify-content: flex-end;
		width: 100%;
		padding: 0 0.875rem 1rem;
	}
	.ko-hero .elementor-widget-spacer { display: none; }
	.ko-hero .e-con-full { padding: 0 !important; gap: 0 !important; }
	.site-main--home .elementor-element.ko-hero-card {
		width: min(100%, 16.25rem) !important;
		gap: 0.25rem !important;
		padding: 0.8rem 0.95rem 0.85rem !important;
		background-color: rgb(218 205 185 / 94%);
	}
	.ko-hero-card .elementor-widget { margin: 0 !important; }
	.ko-hero-card .elementor-widget-heading p.elementor-heading-title {
		font-size: 0.625rem !important;
		letter-spacing: 0.16em !important;
		line-height: 1.3 !important;
	}
	.ko-hero-card h1.elementor-heading-title {
		font-size: 1.35rem !important;
		line-height: 1.1 !important;
	}
	.ko-hero-card .elementor-widget-text-editor,
	.ko-hero-card .elementor-widget-text-editor p {
		margin: 0 !important;
		font-size: 0.74rem !important;
		line-height: 1.38 !important;
	}
	.ko-hero-card .elementor-widget-button { padding-top: 0.45rem !important; }
	.ko-hero-card .elementor-button {
		width: auto !important;
		padding: 0.55rem 0.85rem !important;
		font-size: 0.64rem !important;
		letter-spacing: 0.12em;
		line-height: 1.2;
	}
	.ko-hero-card .elementor-widget-button .elementor-button-link { display: inline-flex; }
}

/* ---------------------------------------------------------------------------------------------
 * 2. Homepage hierarchy: stronger headings, real buttons, bolder prices, tidier product cards.
 * ------------------------------------------------------------------------------------------- */
.site-main--home .ko-home-intro .elementor-widget-heading .elementor-heading-title,
.site-main--home .ffc-category-collection__intro h2,
.site-main--home .ko-home-intro__prop h3 {
	font-weight: 600;
}
.site-main--home .ko-home-intro__prop a {
	font-weight: 700;
}
/* Collection call-to-action: a solid black button, matching the other homepage buttons. */
.site-main--home a.ffc-category-collection__cta,
.site-main--home a.ko-featured-category__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.7rem 1.4rem;
	border: 1px solid #000;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 180ms ease, border-color 180ms ease;
}
.site-main--home a.ffc-category-collection__cta:hover,
.site-main--home a.ko-featured-category__action:hover {
	border-color: #2a2a26;
	background: #2a2a26;
	color: #fff;
}
.site-main--home a.ffc-category-collection__cta:focus-visible,
.site-main--home a.ko-featured-category__action:focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
}
/* Product cards on the homepage: refined titles (up to three lines), tighter image gap, strong prices. */
.site-main--home .ffc-category-card h3,
.site-main--home .ko-featured-category__products ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	min-height: 0;
	margin: 0.45rem 0 0.2rem;
	font-size: clamp(0.88rem, 1vw, 1rem);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.005em;
}
.site-main--home .ko-featured-category__products ul.products li.product .woocommerce-loop-product__title { margin: 0; }
.site-main--home .ffc-category-card__price,
.site-main--home .ffc-category-card__price .amount,
.site-main--home .ko-product-card .price,
.site-main--home .ko-product-card .price .amount {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--ko-color-text, #1c1c18);
}
.site-main--home .ko-product-card .price del .amount { font-weight: 500; }
.site-main--home .ko-home-category-section .ko-home-categories__name { font-weight: 600; }
@media (max-width: 600px) {
	.site-main--home .ffc-category-collection__intro { gap: 0.9rem; }
	.site-main--home .ffc-category-card h3 { font-size: 0.9rem; }
}

/* ---------------------------------------------------------------------------------------------
 * 3. Shop and category archives.
 * ------------------------------------------------------------------------------------------- */
/* Desktop: a slimmer filter column and tighter gap give the product grid more room; the page edges stay aligned with the header. */
@media (min-width: 1101px) {
	.ko-shop-layout {
		grid-template-columns: minmax(12rem, 13.5rem) minmax(0, 1fr);
		gap: clamp(1.75rem, 2.4vw, 2.5rem);
	}
}
.ko-shop-results ul.products li.product .woocommerce-loop-product__title {
	padding-block: 0.55rem 0;
	padding-inline: 0;
	min-height: 0;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
}
.ko-shop-results ul.products li.product .price {
	padding-inline: 0;
	font-size: 1rem;
	font-weight: 700;
}
.ko-shop-results ul.products li.product .price .amount { font-weight: 700; }
@media (max-width: 700px) {
	/* Less dead space above the product grid. */
	body.woocommerce-shop .site-main--content,
	body.tax-product_cat .site-main--content { padding-top: 0.75rem; }
	body.woocommerce-shop .page-title,
	body.tax-product_cat .page-title {
		margin: 0 0 0.6rem;
		font-size: 1.9rem;
		line-height: 1.15;
	}
	/* Filters and sorting share one line; the "Showing x of y" sentence is removed. */
	.ko-shop-results {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 0.75rem;
		align-items: center;
	}
	.ko-shop-results > * { grid-column: 1 / -1; }
	.ko-shop-results > .ko-shop-filter-trigger {
		grid-column: 1;
		grid-row: 1;
		margin: 0 0 0.6rem;
		min-height: 2.6rem;
	}
	.ko-shop-results > .ko-shop-toolbar {
		display: contents;
	}
	.ko-shop-toolbar .woocommerce-result-count { display: none; }
	.ko-shop-toolbar .woocommerce-ordering {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
		margin: 0 0 0.6rem;
	}
	.ko-shop-toolbar .woocommerce-ordering select {
		max-width: 100%;
		min-height: 2.6rem;
		border-bottom: 1px solid var(--ko-color-border, #e6e1d8);
	}
	.ko-shop-results ul.products { margin-top: 0.5rem; }
	.ko-shop-results ul.products li.product .woocommerce-loop-product__title {
		padding-block: 0.4rem 0;
		font-size: 0.92rem;
		font-weight: 600;
		line-height: 1.28;
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}
}
@media (min-width: 701px) {
	.ko-shop-results ul.products li.product .woocommerce-loop-product__title {
		font-size: 0.98rem;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}
}

/* ---------------------------------------------------------------------------------------------
 * 4. Single product: free-shipping signal beside the price, calmer mobile title.
 * ------------------------------------------------------------------------------------------- */
body.single-product .site-main--content .summary .ffc-price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin: 0.25rem 0 0.9rem;
}
body.single-product .site-main--content .summary .ffc-price-row > .price {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.2;
}
body.single-product .site-main--content .summary .ffc-price-row > .price .amount { font-weight: 700; }
body.single-product .site-main--content .summary .ffc-free-shipping {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-inline-start: auto;
	padding: 0.5rem 0.9rem;
	border: 1px solid #40543e;
	background: #eef2e8;
	color: #2e3a23;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}
body.single-product .site-main--content .summary .ffc-free-shipping svg { flex: none; width: 1.25em; height: 1.25em; }
@media (max-width: 640px) {
	body.single-product .site-main--content .summary .product_title {
		font-size: 1.6rem;
		font-weight: 500;
		line-height: 1.2;
		letter-spacing: 0;
	}
	body.single-product .site-main--content .summary .ffc-price-row > .price { font-size: 1.45rem; }
	body.single-product .site-main--content .summary .ffc-free-shipping { padding: 0.45rem 0.75rem; font-size: 0.78rem; }
}

/* ---------------------------------------------------------------------------------------------
 * 5. Cart and checkout (WooCommerce blocks): make free shipping unmistakable. Layout is not changed.
 * ------------------------------------------------------------------------------------------- */
body.woocommerce-cart .wc-block-components-totals-shipping .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-totals-shipping .wc-block-components-totals-item__label {
	font-size: 1rem;
	font-weight: 700;
}
body.woocommerce-cart .wc-block-components-totals-shipping .wc-block-components-totals-item__value,
body.woocommerce-checkout .wc-block-components-totals-shipping .wc-block-components-totals-item__value {
	color: #2e3a23;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
body.woocommerce-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__label,
body.woocommerce-cart .wc-block-components-shipping-rates-control .wc-block-components-radio-control__label {
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}
body.woocommerce-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__secondary-label,
body.woocommerce-cart .wc-block-components-shipping-rates-control .wc-block-components-radio-control__secondary-label {
	color: #2e3a23;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
body.woocommerce-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__option-checked {
	background: #eef2e8;
}

/* Story section: when the image column stacks under the text on mobile, keep a clear gap. */
@media (max-width: 767px) {
	.site-main--home .ko-home-story .elementor-column + .elementor-column { margin-top: 1.5rem; }
}
