/**
 * Al Faisal — quote feature styles (button + drawer + form).
 */

/* quote-only store: hide leftover block-based add-to-cart buttons (sidebar widgets etc.) */
.wc-block-components-product-button,
.wc-block-grid .add-to-cart-button {
	display: none !important;
}

/* --- Unified Add-to-Quote button (all product displays) --- */
.fas-quote-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	border: 1.5px solid var(--fas-blue);
	color: var(--fas-blue);
	background: #fff;
	border-radius: 9px;
	padding: 8px 10px;
	font-family: Poppins, sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.fas-quote-add:hover {
	background: var(--fas-blue);
	color: #fff;
}

.fas-quote-add:active {
	transform: scale(0.97);
}

.fas-quote-add.is-added {
	background: #1c7c3c;
	border-color: #1c7c3c;
	color: #fff;
}

/* front-page product cards */
.fas-pcard .fas-quote-add--card {
	margin-top: auto;
}

.fas-pcard:hover .fas-quote-add--card {
	background: var(--fas-blue);
	color: #fff;
}

/* WooCommerce loop cards */
.fas-quote-add--loop {
	margin-top: 8px;
	padding: 9px 10px;
}

/* single product */
.fas-quote-add--single {
	width: auto;
	flex: 1 1 auto;
	padding: 13px 26px;
	font-size: 14.5px;
	border-radius: 10px;
}

.fas-quote-single {
	display: flex;
	align-items: stretch;
	gap: 10px;
	margin: 18px 0;
	max-width: 460px;
}

.fas-quote-qty-wrap {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--fas-line);
	border-radius: 10px;
	overflow: hidden;
	flex: 0 0 auto;
}

.fas-quote-qty-btn {
	width: 40px;
	border: 0;
	background: #fff;
	font-size: 16px;
	color: var(--fas-ink);
	cursor: pointer;
}

.fas-quote-qty {
	width: 54px;
	border: 0;
	border-inline: 1px solid var(--fas-line);
	text-align: center;
	font-size: 14px;
	padding: 11px 0;
	outline: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.fas-quote-qty::-webkit-outer-spin-button,
.fas-quote-qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* --- Header quote-list button --- */
.fas-quote-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1.5px solid var(--fas-line);
	border-radius: 12px;
	background: #fff;
	color: var(--fas-ink);
	font-family: Poppins, sans-serif;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fas-quote-btn:hover {
	border-color: var(--fas-blue);
	box-shadow: var(--fas-shadow);
}

.fas-quote-btn svg {
	color: var(--fas-blue);
}

.fas-quote-count {
	display: none;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--fas-red);
	color: #fff;
	font-size: 10.5px;
	line-height: 18px;
	text-align: center;
}

.fas-quote-count.is-visible {
	display: inline-block;
}

/* mobile: icon-only variant in the header grid */
.fas-quote-btn--icon {
	display: none;
	width: 42px;
	padding: 0;
}

@media (max-width: 992px) {
	.fas-quote-btn--icon {
		display: inline-flex;
	}
}

/* --- Drawer --- */
.fas-qdrawer__scrim {
	position: fixed;
	inset: 0;
	z-index: 1001;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s;
}

.fas-qdrawer__panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 1002;
	width: min(94vw, 460px);
	background: #fff;
	display: flex;
	flex-direction: column;
	transform: translateX(105%);
	transition: transform 0.28s ease;
	box-shadow: 0 0 40px rgba(15, 23, 42, 0.25);
	visibility: hidden;
}

#fas-qdrawer.is-open .fas-qdrawer__scrim {
	opacity: 1;
	visibility: visible;
}

#fas-qdrawer.is-open .fas-qdrawer__panel {
	transform: translateX(0);
	visibility: visible;
}

.fas-qdrawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background: var(--fas-navy);
	color: #fff;
	flex: 0 0 auto;
}

.fas-qdrawer__title {
	font-family: Poppins, sans-serif;
	font-size: 15.5px;
	font-weight: 600;
	margin: 0;
}

.fas-qdrawer__close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.fas-qdrawer__close svg {
	stroke: #fff;
	width: 20px;
	height: 20px;
	min-width: 20px;
}

.fas-qdrawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 18px;
	-webkit-overflow-scrolling: touch;
}

.fas-qdrawer__foot {
	flex: 0 0 auto;
	padding: 14px 18px 16px;
	border-top: 1px solid var(--fas-line);
	background: #fff;
}

.fas-qdrawer__empty {
	text-align: center;
	color: var(--fas-muted);
	font-size: 14px;
	line-height: 1.7;
	padding: 40px 10px;
}

.fas-qdrawer__note {
	margin: 10px 0 0;
	font-size: 11.5px;
	color: var(--fas-muted);
	text-align: center;
}

/* list rows */
.fas-qlist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fas-qlist__row {
	display: flex;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--fas-bg);
}

.fas-qlist__img {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	border: 1px solid var(--fas-line);
	overflow: hidden;
	display: block;
	background: #fff;
	line-height: 0;
}

.fas-qlist__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.fas-qlist__info {
	flex: 1 1 auto;
	min-width: 0;
}

.fas-qlist__title {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--fas-ink);
	text-decoration: none;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.fas-qlist__title:hover {
	color: var(--fas-blue);
}

.fas-qlist__sku {
	margin: 3px 0 0;
	font-size: 11.5px;
	color: var(--fas-muted);
}

.fas-qlist__qty {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}

.fas-qlist__step {
	width: 28px;
	height: 28px;
	border: 1px solid var(--fas-line);
	border-radius: 7px;
	background: #fff;
	font-size: 14px;
	color: var(--fas-ink);
	cursor: pointer;
}

.fas-qlist__qtyin {
	width: 56px;
	height: 28px;
	border: 1px solid var(--fas-line);
	border-radius: 7px;
	text-align: center;
	font-size: 13px;
	-moz-appearance: textfield;
	appearance: textfield;
}

.fas-qlist__qtyin::-webkit-outer-spin-button,
.fas-qlist__qtyin::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.fas-qlist__remove {
	margin-left: auto;
	border: 0;
	background: none;
	color: var(--fas-muted);
	font-size: 12px;
	cursor: pointer;
	text-decoration: underline;
}

.fas-qlist__remove:hover {
	color: var(--fas-red);
}

/* form */
.fas-qf-row {
	margin-bottom: 12px;
}

.fas-qf-row label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--fas-body-c);
	margin-bottom: 5px;
}

.fas-qf-row label b {
	color: var(--fas-red);
}

.fas-qf-row input,
.fas-qf-row textarea {
	width: 100%;
	border: 1.5px solid var(--fas-line);
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 13.5px;
	font-family: Inter, sans-serif;
	color: var(--fas-ink);
	outline: none;
	transition: border-color 0.2s ease;
}

.fas-qf-row input:focus,
.fas-qf-row textarea:focus {
	border-color: var(--fas-blue);
}

.fas-qf-row--2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.fas-qf-hp {
	position: absolute;
	left: -9999px;
	width: 0;
	height: 0;
	overflow: hidden;
}

.fas-qf-error {
	background: #fdecec;
	color: #a03030;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 12.5px;
	margin: 0 0 12px;
}

.fas-qdrawer__btnrow {
	display: flex;
	gap: 10px;
}

.fas-qdrawer__back {
	border: 1.5px solid var(--fas-line);
	background: #fff;
	border-radius: 10px;
	padding: 12px 18px;
	font-family: Poppins, sans-serif;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--fas-ink);
	cursor: pointer;
}

.fas-qdrawer__back:hover {
	border-color: var(--fas-blue);
	color: var(--fas-blue);
}

/* done screen */
.fas-qdrawer__done {
	text-align: center;
	padding: 40px 8px;
}

.fas-qdrawer__done-ic {
	width: 60px;
	height: 60px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: #e8f6ec;
	color: #1c7c3c;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fas-qdrawer__done-title {
	font-family: Poppins, sans-serif;
	font-size: 16.5px;
	font-weight: 600;
	color: var(--fas-ink);
	margin: 0 0 8px;
}

.fas-qdrawer__done-text {
	font-size: 13.5px;
	color: var(--fas-body-c);
	line-height: 1.7;
	margin: 0 0 20px;
}

@media (max-width: 560px) {
	.fas-qf-row--2col {
		grid-template-columns: 1fr;
	}

	.fas-quote-add--single {
		padding: 12px 18px;
		font-size: 13.5px;
	}
}
