/**
 * Frame & Thread — Made to Order (front end).
 *
 * Brand system:
 *   Taupe        #756f68   Darker taupe  #635d57   Darkest taupe #565049
 *   Warm gold    #c4a882   Charcoal      #1a1a1a   White         #ffffff
 *   Pink         #f37b94   (links only)
 *
 * Type: Cormorant Garamond italic for display, Outfit 300–500 for body,
 * 14px uppercase 1.5px letter-spacing base. Form fields are underline-only,
 * matching the registration and contact form treatment.
 */

/* -------------------------------------------------------------------------
 * Utility
 * ---------------------------------------------------------------------- */

.ft-mto-hidden {
	display: none !important;
}

/* While a made-to-order combo is selected, the form carries .ft-mto-active.
   Hiding via descendant rules (rather than classes on the elements) survives
   WooCommerce re-rendering the .single_variation contents from its template
   — freshly inserted availability/price nodes are matched immediately. */
form.variations_form.ft-mto-active .quantity,
form.variations_form.ft-mto-active .single_add_to_cart_button,
form.variations_form.ft-mto-active .woocommerce-variation-availability {
	display: none !important;
}

body.ft-mto-drawer-open {
	overflow: hidden;
}

/* -------------------------------------------------------------------------
 * Product page: made-to-order block
 * ---------------------------------------------------------------------- */

.ft-mto-block {
	margin: 18px 0 24px;
}

.ft-mto-label {
	margin: 0 0 14px;
	font-family: 'Cormorant Garamond', Garamond, serif;
	font-style: italic;
	font-size: 19px;
	line-height: 1.4;
	color: #756f68;
	letter-spacing: 0.2px;
}

.ft-mto-add {
	display: inline-block;
	padding: 14px 34px;
	background: transparent;
	border: 1px solid #1a1a1a;
	border-radius: 0;
	font-family: 'Outfit', sans-serif;
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #1a1a1a;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.ft-mto-add:hover,
.ft-mto-add:focus {
	background: #1a1a1a;
	color: #ffffff;
	outline: none;
}

.ft-mto-add:disabled {
	background: #1a1a1a;
	color: #c4a882;
	cursor: default;
}

.ft-mto-signin {
	font-family: 'Outfit', sans-serif;
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #f37b94;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
}

/* -------------------------------------------------------------------------
 * Floating indicator pill
 * ---------------------------------------------------------------------- */

.ft-mto-indicator {
	position: fixed;
	right: 24px;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 999990;
	padding: 13px 26px;
	background: #1a1a1a;
	border: none;
	border-radius: 0;
	font-family: 'Outfit', sans-serif;
	font-weight: 400;
	font-size: 13px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(26, 26, 26, 0.22);
	transition: background-color 0.25s ease;
}

.ft-mto-indicator:hover,
.ft-mto-indicator:focus {
	background: #565049;
	outline: none;
}

.ft-mto-indicator .ft-mto-count {
	color: #c4a882;
	margin-left: 4px;
}

/* -------------------------------------------------------------------------
 * Overlay + drawer
 * ---------------------------------------------------------------------- */

.ft-mto-overlay {
	position: fixed;
	inset: 0;
	z-index: 999991;
	background: rgba(26, 26, 26, 0.4);
}

.ft-mto-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 999992;
	width: 440px;
	max-width: 100vw;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	box-shadow: -6px 0 30px rgba(26, 26, 26, 0.18);
}

.ft-mto-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 44px 30px 20px;
	border-bottom: 1px solid #e8e5e1;
}

.ft-mto-drawer-head h2 {
	margin: 0;
	font-family: 'Cormorant Garamond', Garamond, serif;
	font-style: italic;
	font-weight: 500;
	font-size: 28px;
	color: #1a1a1a;
}

.ft-mto-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #756f68;
	cursor: pointer;
	padding: 4px 8px;
	transition: color 0.2s ease;
}

.ft-mto-close:hover,
.ft-mto-close:focus {
	color: #1a1a1a;
	outline: none;
}

/* --- Lines ------------------------------------------------------------- */

.ft-mto-lines {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px 30px;
}

.ft-mto-empty {
	margin: 26px 0;
	font-family: 'Cormorant Garamond', Garamond, serif;
	font-style: italic;
	font-size: 18px;
	color: #756f68;
}

.ft-mto-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid #e8e5e1;
}

.ft-mto-line-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.ft-mto-line-product {
	font-family: 'Outfit', sans-serif;
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #1a1a1a;
}

.ft-mto-line-summary {
	font-family: 'Cormorant Garamond', Garamond, serif;
	font-style: italic;
	font-size: 17px;
	color: #635d57;
}

.ft-mto-line-price {
	font-family: 'Outfit', sans-serif;
	font-weight: 300;
	font-size: 13px;
	letter-spacing: 1px;
	color: #756f68;
}

.ft-mto-line-controls {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
}

/* Underline-only qty input. */
.ft-mto-qty {
	width: 44px;
	padding: 6px 2px;
	background: transparent;
	border: none;
	border-bottom: 1px solid #756f68;
	border-radius: 0;
	font-family: 'Outfit', sans-serif;
	font-weight: 400;
	font-size: 14px;
	color: #1a1a1a;
	text-align: center;
	transition: border-color 0.2s ease;
	-moz-appearance: textfield;
	appearance: textfield;
}

/* Native spinners off — the −/+ steppers are the one clear control. */
.ft-mto-qty::-webkit-inner-spin-button,
.ft-mto-qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.ft-mto-qty:focus {
	outline: none;
	border-bottom-color: #1a1a1a;
}

.ft-mto-qty-minus,
.ft-mto-qty-plus {
	background: none;
	border: none;
	font-family: 'Outfit', sans-serif;
	font-weight: 300;
	font-size: 18px;
	line-height: 1;
	color: #756f68;
	cursor: pointer;
	padding: 6px 8px;
	transition: color 0.2s ease;
}

.ft-mto-qty-minus:hover,
.ft-mto-qty-plus:hover,
.ft-mto-qty-minus:focus,
.ft-mto-qty-plus:focus {
	color: #1a1a1a;
	outline: none;
}

.ft-mto-remove {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	color: #756f68;
	cursor: pointer;
	padding: 4px 6px;
	transition: color 0.2s ease;
}

.ft-mto-remove:hover,
.ft-mto-remove:focus {
	color: #1a1a1a;
	outline: none;
}

/* --- Footer ------------------------------------------------------------ */

.ft-mto-foot {
	padding: 20px 30px 28px;
	border-top: 1px solid #e8e5e1;
}

.ft-mto-note-label {
	display: block;
	margin: 0 0 6px;
	font-family: 'Outfit', sans-serif;
	font-weight: 400;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #756f68;
}

/* Underline-only textarea. */
.ft-mto-note {
	width: 100%;
	padding: 6px 2px;
	background: transparent;
	border: none;
	border-bottom: 1px solid #756f68;
	border-radius: 0;
	font-family: 'Outfit', sans-serif;
	font-weight: 300;
	font-size: 14px;
	line-height: 1.6;
	color: #1a1a1a;
	resize: vertical;
	transition: border-color 0.2s ease;
}

.ft-mto-note:focus {
	outline: none;
	border-bottom-color: #1a1a1a;
}

.ft-mto-lead {
	margin: 16px 0 18px;
	font-family: 'Cormorant Garamond', Garamond, serif;
	font-style: italic;
	font-size: 16px;
	color: #756f68;
}

.ft-mto-submit {
	display: block;
	width: 100%;
	padding: 15px 20px;
	background: #1a1a1a;
	border: 1px solid #1a1a1a;
	border-radius: 0;
	font-family: 'Outfit', sans-serif;
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.ft-mto-submit:hover,
.ft-mto-submit:focus {
	background: #ffffff;
	color: #1a1a1a;
	outline: none;
}

.ft-mto-submit:disabled {
	background: #756f68;
	border-color: #756f68;
	color: #ffffff;
	cursor: default;
}

.ft-mto-status {
	margin: 14px 0 0;
	min-height: 1.4em;
	font-family: 'Outfit', sans-serif;
	font-weight: 300;
	font-size: 14px;
	line-height: 1.6;
	color: #635d57;
}

.ft-mto-status-success {
	font-family: 'Cormorant Garamond', Garamond, serif;
	font-style: italic;
	font-size: 17px;
	color: #1a1a1a;
}

/* -------------------------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------------------- */

@media (max-width: 520px) {
	.ft-mto-drawer {
		width: 100vw;
	}

	.ft-mto-indicator {
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	}

	.ft-mto-drawer-head,
	.ft-mto-lines,
	.ft-mto-foot {
		padding-left: 20px;
		padding-right: 20px;
	}
}
