/* Fabric Configurator — match theme (minimal radius), responsive */
.fcf-cfg {
	direction: rtl;
	margin: 0.35rem 0 1rem;
	padding: 0.5rem 0 0.75rem;
	border: none;
	border-radius: 0;
	background: transparent;
	font-size: 14px;
	line-height: 1.5;
	color: #222;
}
.fcf-cfg-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	padding: 0 0 0.65rem;
	border-bottom: 1px solid #e5e5e5;
}
.fcf-cfg-title {
	display: none; /* title is in purchase step bar */
}
/* Steps like purchase bar */
.fcf-cfg-steps {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0.35rem 0.45rem;
	font-size: 12px;
	color: #6b7280;
	overflow-x: auto;
	white-space: nowrap;
	max-width: 100%;
}
.fcf-cfg-step {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: #6b7280;
	flex: 0 0 auto;
	white-space: nowrap;
}
.fcf-cfg-step.is-active,
.fcf-cfg-step.codevz-current-step {
	color: inherit;
	font-weight: 600;
}
.fcf-cfg-step.is-done {
	opacity: 0.85;
}
.fcf-cfg-hint {
	margin: 0 0 0.65rem;
	color: #666;
	font-size: 13px;
}
.fcf-cfg-search-wrap {
	margin-bottom: 0.65rem;
}
.fcf-cfg-search {
	width: 100%;
	max-width: 360px;
	border: 1px solid #ccc;
	border-radius: 0;
	padding: 0.5rem 0.75rem;
	font-size: 13px;
	box-sizing: border-box;
}
.fcf-cfg-search:focus {
	outline: none;
	border-color: #888;
}
.fcf-cfg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.75rem;
}
.fcf-cfg-card {
	border: 1px solid #e0e0e0;
	border-radius: 0;
	overflow: hidden;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
	text-align: center;
	padding: 0;
	font: inherit;
	color: inherit;
	width: 100%;
}
.fcf-cfg-card:hover,
.fcf-cfg-card:focus-visible {
	border-color: #999;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	outline: none;
}
.fcf-cfg-card.is-selected {
	border-color: #333;
	box-shadow: 0 0 0 1px #333;
}
/* ============================================================
 * FCF kaliteh image crop (ALL plugin views)
 * Rule: square fill; hide bottom 33% of source + 4px extra
 * => img height = 100% / 0.67 ≈ 149.25%  →  use 150% + 4px
 * Container must have real height (padding-bottom square).
 * ============================================================ */
.fcf-img-crop,
.fcf-cfg-card-img,
.fcf-cfg-summary-img-wrap,
.fcf-cart-fabric-photo,
.fcf-thumb-wrap {
	position: relative;
	display: block;
	width: 100%;
	height: 0;
	padding-bottom: 100%; /* forces square */
	overflow: hidden;
	background: #f3f3f3;
	border-radius: 0;
}
.fcf-img-crop > img,
.fcf-cfg-card-img > img,
.fcf-cfg-summary-img-wrap > img,
.fcf-cfg-summary-img,
.fcf-cart-fabric-photo > img,
.fcf-thumb-wrap > img,
.fcf-img-crop img.fcf-img-crop-el {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: auto !important;
	bottom: auto !important;
	width: 100% !important;
	/* bottom 33% + 4px cropped by overflow */
	height: calc(150% + 4px) !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center top !important;
	display: block !important;
	border: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}
/* Sized variants (override width; keep square via padding-bottom) */
.fcf-img-crop--sm,
.fcf-thumb-wrap {
	width: 52px;
	padding-bottom: 52px; /* square 52×52 */
}
.fcf-img-crop--md {
	width: 100px;
	padding-bottom: 100px;
}
.fcf-img-crop--lg,
.fcf-cfg-summary-img-wrap {
	width: min(240px, 100%);
	max-width: 240px;
	/* padding-bottom % is relative to width → square */
	padding-bottom: min(240px, 100%);
	height: 0;
}
/* ensure square when width resolves to 240px */
@supports (width: min(240px, 100%)) {
	.fcf-cfg-summary-img-wrap {
		aspect-ratio: 1 / 1;
		height: auto;
		padding-bottom: 0;
		min-height: 0;
	}
	.fcf-cfg-summary-img-wrap > img,
	.fcf-cfg-summary-img {
		height: calc(150% + 4px) !important;
	}
}
/* Cart fabric under product description — force crop (theme-proof) */
.woocommerce-cart .fcf-cart-fabric-photo,
.fcf-cart-fabric-photo {
	position: relative !important;
	display: block !important;
	width: 96px !important;
	max-width: 96px !important;
	height: 0 !important;
	padding: 0 0 96px 0 !important; /* square 96×96 */
	margin: 10px 0 8px !important;
	overflow: hidden !important;
	border: 1px solid #e5e5e5 !important;
	background: #f3f3f3 !important;
	border-radius: 0 !important;
}
.woocommerce-cart .fcf-cart-fabric-photo img,
.fcf-cart-fabric-photo img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: calc(150% + 4px) !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center top !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
}
/* Checkout: never show fabric photo */
.woocommerce-checkout .fcf-cart-fabric-photo {
	display: none !important;
}
/* Order received / view order */
.fcf-order-fabric-block {
	margin-top: 10px;
	clear: both;
}
.fcf-order-fabric-label {
	font-size: 12px;
	color: #6b7280;
	margin-bottom: 4px;
}
.fcf-order-fabric-photo {
	position: relative !important;
	display: block !important;
	width: 96px !important;
	height: 0 !important;
	padding: 0 0 96px 0 !important;
	overflow: hidden !important;
	border: 1px solid #e5e5e5 !important;
	background: #f3f3f3 !important;
}
.fcf-order-fabric-photo img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: calc(150% + 4px) !important;
	object-fit: cover !important;
	object-position: center top !important;
	max-width: none !important;
	margin: 0 !important;
	border: none !important;
}
.fcf-cfg-card-img-empty {
	display: flex;
	align-items: center;
	justify-content: center;
}
.fcf-cfg-card-img-empty .fcf-cfg-noimg,
.fcf-cfg-card-img .fcf-cfg-noimg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #999;
	padding: 0.5rem;
}

/* Card text: name / total price / meters × unit */
.fcf-cfg-card-body {
	display: block;
	padding: 0.65rem 0.5rem 0.8rem;
	text-align: right;
	line-height: 1.4;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}
.fcf-cfg-card-name {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #111;
	margin: 0 0 0.35rem;
	word-break: break-word;
	line-height: 1.35;
}
.fcf-cfg-card-price {
	display: block;
	font-weight: 700;
	font-size: 13px;
	color: #111;
	margin: 0 0 0.3rem;
	line-height: 1.35;
}
.fcf-cfg-card-meta {
	display: block;
	font-size: 11px;
	color: #6b7280;
	margin: 0;
	line-height: 1.4;
	font-weight: 400;
}
.fcf-cfg-card-color .fcf-cfg-card-body {
	text-align: center;
}

.fcf-cfg-summary-text {
	flex: 1 1 200px;
	min-width: 0;
}
.fcf-cfg-summary-text strong {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 1rem;
}
.fcf-cfg-summary-text p {
	margin: 0.35rem 0;
	font-size: 13px;
	color: #444;
}
.fcf-cfg-k {
	color: #777;
	font-weight: 500;
	margin-left: 0.25rem;
}
.fcf-cfg-price {
	font-weight: 700;
	color: #222;
	font-size: 14px;
}
.fcf-cfg-price-final {
	font-size: 16px;
	margin-top: 0.5rem !important;
	padding-top: 0.5rem;
	border-top: 1px solid #e5e5e5;
}
.fcf-cfg-qty {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 0;
}
.fcf-cfg-qty input {
	width: 80px;
	border-radius: 0;
}
.fcf-cfg-submit {
	width: 100%;
	max-width: 320px;
	border-radius: 0;
}

.fcf-last-fabric-banner {
	margin: 0 0 12px;
	padding: 10px 12px;
	background: #f7f7f7;
	border: 1px solid #e0e0e0;
	border-radius: 0;
	font-size: 13px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.fcf-last-fabric-banner[hidden] {
	display: none !important;
}
.fcf-last-fabric-banner .fcf-last-actions {
	margin-inline-start: auto;
	display: flex;
	gap: 8px;
	align-items: center;
}
.fcf-last-remove {
	border: 2px solid #1d2327;
	background: #1d2327;
	color: #fff !important;
	width: 34px;
	height: 34px;
	line-height: 30px;
	cursor: pointer;
	font-size: 22px;
	font-weight: 700;
	padding: 0;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.fcf-last-remove:hover,
.fcf-last-remove:focus {
	background: #b32d2e;
	border-color: #b32d2e;
	color: #fff !important;
	outline: none;
}

/* Responsive like cart */
@media (max-width: 782px) {
	.fcf-cfg {
		padding: 0.75rem;
		margin: 0.75rem 0;
	}
	.fcf-cfg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.55rem;
	}
	.fcf-cfg-summary-img-wrap {
		width: 100%;
		max-width: 100%;
	}
	.fcf-cfg-search {
		max-width: 100%;
	}
	.fcf-cfg-submit {
		max-width: 100%;
	}
}
@media (max-width: 400px) {
	.fcf-cfg-grid {
		grid-template-columns: 1fr 1fr;
	}
	.fcf-cfg-card-name {
		font-size: 12px;
	}
	.fcf-cfg-card-price {
		font-size: 12px;
	}
}


/* —— Confirm step: two-column layout —— */
.fcf-cfg-panel-confirm .fcf-cfg-confirm-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
	gap: 1.25rem 1.75rem;
	align-items: start;
}
.fcf-cfg-summary {
	background: #fafafa;
	border: 1px solid #e8e8e8;
	border-radius: 0;
	padding: 1rem 1.1rem;
	margin: 0;
}
.fcf-cfg-summary-layout {
	display: grid;
	grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
	gap: 1rem 1.25rem;
	align-items: start;
}
.fcf-cfg-summary-heading {
	display: block;
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}
.fcf-cfg-summary-dl {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}
.fcf-cfg-summary-item {
	display: grid;
	grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
	gap: 0.35rem 0.75rem;
	align-items: baseline;
	margin: 0;
	padding: 0.2rem 0;
	border-bottom: 1px solid #eee;
}
.fcf-cfg-summary-item:last-child {
	border-bottom: none;
}
.fcf-cfg-summary-item dt {
	margin: 0;
	font-weight: 500;
	color: #6b7280;
	font-size: 13px;
}
.fcf-cfg-summary-item dd {
	margin: 0;
	font-size: 13px;
	color: #111;
	word-break: break-word;
}
.fcf-cfg-summary-item--em dd {
	font-weight: 600;
}
.fcf-cfg-summary-item--final {
	padding-top: 0.5rem;
	margin-top: 0.15rem;
	border-top: 1px solid #ddd;
	border-bottom: none;
}
.fcf-cfg-summary-item--final dt,
.fcf-cfg-summary-item--final dd {
	font-weight: 700;
	font-size: 14px;
	color: #111;
}
.fcf-cfg-confirm-actions {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 1rem;
	background: #fff;
	border: 1px solid #e8e8e8;
	position: sticky;
	top: 12px;
}
.fcf-cfg-confirm-actions .fcf-cfg-nav {
	margin: 0;
}
.fcf-cfg-confirm-actions .fcf-cfg-qty {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0;
}
.fcf-cfg-confirm-actions .fcf-cfg-qty label {
	margin: 0;
	white-space: nowrap;
}
.fcf-cfg-confirm-actions .fcf-cfg-qty input {
	width: 4.5rem;
	max-width: 100%;
}
.fcf-cfg-confirm-actions .fcf-cfg-submit {
	width: 100%;
	max-width: none;
	margin: 0;
	text-align: center;
}
.fcf-cfg-summary-img-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	color: #999;
	font-size: 12px;
}

/* Kaliteh grid: more columns on wide screens */
.fcf-cfg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.75rem;
}
.fcf-cfg-panel[data-panel="2"] .fcf-cfg-nav {
	margin-top: 1rem;
}

@media (max-width: 900px) {
	.fcf-cfg-panel-confirm .fcf-cfg-confirm-grid {
		grid-template-columns: 1fr;
	}
	.fcf-cfg-summary-layout {
		grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
	}
	.fcf-cfg-confirm-actions {
		position: static;
	}
}
@media (max-width: 560px) {
	.fcf-cfg-summary-layout {
		grid-template-columns: 1fr;
	}
	.fcf-cfg-summary-img-wrap {
		max-width: 200px;
		margin: 0 auto;
	}
	.fcf-cfg-summary-item {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}


/* Confirm: no table/box summary (layout in purchase-flow.css) */
.fcf-cfg-panel-confirm .fcf-cfg-summary,
#fcf-cfg-summary.fcf-select-fabric {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
}
.fcf-cfg-panel-confirm .fcf-cfg-confirm-grid {
	display: contents;
}

/* Color cards: same fabric crop rule (hide bottom 1/3) */
.fcf-cfg-card-color .fcf-cfg-card-img {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	height: auto;
	padding-bottom: 0;
}
.fcf-cfg-card-color .fcf-cfg-card-img > img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: calc(150% + 4px) !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center top !important;
}

/* Currency SVG styling */
.fcf-price-curr svg,
.fcf-cfg-card-price svg,
.fcf-cfg-card-meta svg,
.fcf-cfg-grand-value svg,
.fcf-set-item-price svg,
.fcf-select-fabric-price svg {
	width: 1.1em;
	height: 1.1em;
	display: inline-block;
	vertical-align: middle;
	fill: currentColor;
}
