/* =============================================
   RFQ – Front-end styles
   Uses CSS custom properties injected via wp_head
   from admin Color/Style settings.
   ============================================= */

/* --- Defaults (overridden by injected :root) - */
:root {
	--rfq-cart-bg:    #237A9E;
	--rfq-icon-color: #ffffff;
	--rfq-badge-bg:   #ffffff;
	--rfq-badge-color:#237A9E;
	--rfq-primary:    #237A9E;
	--rfq-wa-btn:     #25D366;
	/* Fixed palette */
	--rfq-danger:     #e53e3e;
	--rfq-surface:    #ffffff;
	--rfq-border:     #e2e8f0;
	--rfq-text:       #1a202c;
	--rfq-muted:      #718096;
	--rfq-radius:     10px;
	--rfq-shadow:     0 4px 24px rgba(0,0,0,.10);
	--rfq-shadow-sm:  0 2px 8px rgba(0,0,0,.07);
	--rfq-transition: .2s ease;
}

/* =============================================
   CART ICON (menu item)
   ============================================= */

.quote-li { list-style: none; }

#quote-li-icon { width: auto; }

.cart_cotizaciones {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 40px;
	height: 40px;
	background: var(--rfq-cart-bg);
	border-radius: 50%;
	cursor: pointer;
	transition: transform var(--rfq-transition), box-shadow var(--rfq-transition);
}

.cart_cotizaciones:hover {
	transform: scale(1.08);
	box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

.rfq-cart-icon {
	color: var(--rfq-icon-color);
	font-size: 17px;
	line-height: 1;
}

/* Badge counter */
.totalitems {
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 20px;
	height: 20px;
	padding: 0 4px;
	border-radius: 50px;
	background: var(--rfq-badge-bg);
	color: var(--rfq-badge-color);
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	white-space: nowrap;
	box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* Box dropdown trigger row */
.box_dropdown {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cart_message span {
	font-size: 13px;
	color: var(--rfq-muted);
}

ul li#quote-li {
	float: right;
	width: auto;
}

/* =============================================
   MINI-CART DROPDOWN
   ============================================= */

.mini-quote-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 5000;
	display: none;
	min-width: 300px;
	background: var(--rfq-surface);
	border: 1px solid var(--rfq-border);
	border-radius: var(--rfq-radius);
	box-shadow: var(--rfq-shadow);
	overflow: hidden;
}

.quote-li { position: relative; }

.quote-li:hover .mini-quote-dropdown {
	display: block;
	animation: rfqFadeIn .18s ease;
}

@keyframes rfqFadeIn {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Items list */
.mini-quote-dropdown ul {
	max-height: 280px;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0;
	margin: 0 !important;
	list-style: none;
	position: initial !important;
	display: block !important;
}

.mini-quote-dropdown ul::-webkit-scrollbar { width: 4px; }
.mini-quote-dropdown ul::-webkit-scrollbar-track { background: #f1f5f9; }
.mini-quote-dropdown ul::-webkit-scrollbar-thumb {
	background: var(--rfq-cart-bg);
	border-radius: 4px;
}

/* Single item */
.mini-quote-dropdown li.kuiraweb-rfq-mini-cart-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--rfq-border);
	transition: background var(--rfq-transition);
}

.mini-quote-dropdown li.kuiraweb-rfq-mini-cart-item:last-child { border-bottom: none; }

.mini-quote-dropdown li.kuiraweb-rfq-mini-cart-item:hover { background: #f8fafc; }

/* Thumbnail */
.arfq-pro-thumbnail {
	flex: 0 0 48px;
	text-align: center;
}

.arfq-pro-thumbnail img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	float: none !important;
}

/* Detail */
.mini-quote-dropdown .arfq-pro-detail {
	flex: 1;
	min-width: 0;
}

.mini-quote-dropdown .arfq-pro-detail a {
	display: block;
	font-weight: 600 !important;
	font-size: 13px !important;
	line-height: 1.4;
	color: var(--rfq-text) !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none !important;
	padding: 0 !important;
}

.mini-quote-dropdown .arfq-pro-detail a:hover {
	color: var(--rfq-primary) !important;
	background: transparent !important;
}

.arfq-pro-qty {
	font-size: 12px;
	color: var(--rfq-muted);
	margin-top: 2px;
}

.arfq-pro-price {
	font-size: 13px;
	font-weight: 600;
	color: var(--rfq-text);
	margin-top: 2px;
}

/* Remove button */
.mini-quote-dropdown li a.quote-remove {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 16px;
	font-weight: 700;
	color: var(--rfq-muted);
	background: transparent;
	text-decoration: none !important;
	transition: background var(--rfq-transition), color var(--rfq-transition);
	line-height: 1;
}

.mini-quote-dropdown li a.quote-remove:hover {
	background: #fee2e2;
	color: var(--rfq-danger) !important;
}

/* Footer */
.mini-quote-dropdown p.total {
	padding: 12px 16px;
	margin: 0;
	font-size: 13px;
	color: var(--rfq-muted);
	border-top: 1px solid var(--rfq-border);
	text-align: center;
}

.mini-quote-dropdown .buttons {
	padding: 12px 16px;
	display: flex;
	gap: 8px;
}

.mini-quote-dropdown .buttons a {
	flex: 1;
	display: block;
	text-align: center;
	padding: 9px 12px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	transition: opacity var(--rfq-transition);
}

.mini-quote-dropdown .buttons a:first-child {
	background: var(--rfq-primary);
	color: #fff !important;
}

.mini-quote-dropdown .buttons a:first-child:hover { opacity: .88; }

.mini-quote-dropdown .buttons a:not(:first-child) {
	background: #f1f5f9;
	color: var(--rfq-text) !important;
}

.mini-quote-dropdown .buttons a:not(:first-child):hover { background: #e2e8f0; }

/* Empty message */
.mini-quote-dropdown .kuiraweb-rfq-mini-cart__empty-message {
	padding: 20px 16px;
	text-align: center;
	color: var(--rfq-muted);
	font-size: 13px;
}

/* =============================================
   QUOTE BUTTONS (shop / product page)
   ============================================= */

a.afrfqbt_single_page,
a.afrfq-loop-btn,
.kuiraweb-quote-actions .button {
	background: var(--rfq-primary) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 10px 20px !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	cursor: pointer;
	transition: opacity var(--rfq-transition), transform var(--rfq-transition) !important;
	text-decoration: none !important;
}

a.afrfqbt_single_page:hover,
a.afrfq-loop-btn:hover,
.kuiraweb-quote-actions .button:hover {
	opacity: .88 !important;
	transform: translateY(-1px);
}

/* WhatsApp button */
a.kuiraweb-wa-btn,
.kuiraweb-wa-btn {
	background: var(--rfq-wa-btn) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 10px 20px !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none !important;
	transition: opacity var(--rfq-transition), transform var(--rfq-transition) !important;
}

a.kuiraweb-wa-btn:hover,
.kuiraweb-wa-btn:hover {
	opacity: .88 !important;
	transform: translateY(-1px);
}

/* =============================================
   QUOTE FORM PAGE  (full cart page)
   ============================================= */

#main-q-row {
	padding-bottom: 2%;
	width: 100%;
	border-bottom: 1px solid var(--rfq-border);
	margin-bottom: 16px;
}

.af_quote_form { width: 100%; }

/* Table wrapper card */
.shop_table {
	background: var(--rfq-surface);
	border-radius: var(--rfq-radius);
	box-shadow: var(--rfq-shadow-sm);
	overflow: hidden;
	border-collapse: collapse;
	width: 100%;
}

.shop_table th {
	background: #f8fafc;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--rfq-muted);
	padding: 12px 16px;
	border-bottom: 2px solid var(--rfq-border);
	text-align: left;
}

.shop_table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--rfq-border);
	vertical-align: middle;
	background: var(--rfq-surface);
}

.shop_table tr:last-child td { border-bottom: none; }

.shop_table .woocommerce-cart-form__quote-item img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
}

/* Quantity stepper */
.shop_table .quantity {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.shop_table .quantity-btn {
	width: 30px;
	height: 30px;
	border: 1px solid var(--rfq-border);
	border-radius: 6px;
	background: #f8fafc;
	font-size: 15px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--rfq-transition);
}

.shop_table .quantity-btn:hover { background: var(--rfq-border); }

.shop_table .quantity-input {
	width: 50px;
	text-align: center;
	border: 1px solid var(--rfq-border);
	border-radius: 6px;
	padding: 5px;
}

/* Delete button */
.kuiraweb-quote-form__contents .quote-delete-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: #fee2e2;
	cursor: pointer;
	transition: background var(--rfq-transition), width var(--rfq-transition);
	overflow: hidden;
}

.kuiraweb-quote-form__contents .quote-delete-button .eicon-trash-o {
	font-size: 17px;
	color: var(--rfq-danger);
	transition: transform var(--rfq-transition);
}

.kuiraweb-quote-form__contents .quote-delete-button:hover {
	width: 90px;
	border-radius: 50px;
	background: var(--rfq-danger);
}

.kuiraweb-quote-form__contents .quote-delete-button:hover .eicon-trash-o {
	color: #fff;
	transform: rotate(15deg);
}

.kuiraweb-quote-form__contents .quote-delete-button::before {
	display: none;
	content: "Quitar";
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.kuiraweb-quote-form__contents .quote-delete-button:hover::before {
	display: block;
	padding-right: 8px;
}

table.kuiraweb-quote-form__contents th.product-name,
section.kuiraweb-quote-details table.quote_details th.product-name {
	min-width: 150px;
}

table.kuiraweb-quote-form__contents th,
table.kuiraweb-quote-form__contents td,
section.kuiraweb-quote-details table.quote_details th,
section.kuiraweb-quote-details table.quote_details td {
	padding: 14px 16px;
}

table.kuiraweb-quote-form__contents .product-thumbnail,
table.kuiraweb-quote-form__contents .product-remove {
	width: 60px;
}

table.kuiraweb-quote-form__contents td.offered-price .offered-price-input {
	padding: 0.326em;
	width: 4.7em;
}

.req_price_text { padding: 0.326em; width: 3.7em; }

/* =============================================
   QUOTE FORM – Fields & footer
   ============================================= */

.rfq_form_wrap div.row { margin-bottom: 6px; padding: 2px; }

.form_row { width: 100%; margin-top: 12px; }

.form_row label { display: block; font-weight: 600; margin-bottom: 4px; }

.form_row .form_row_input { width: 100%; margin-top: 6px; }

div.af_quote_fields { width: 100%; }

div.af_quote_fields input[type="text"],
div.af_quote_fields input[type="email"],
div.af_quote_fields input[type="time"],
div.af_quote_fields input[type="date"],
div.af_quote_fields input[type="datetime-local"],
div.af_quote_fields select,
div.af_quote_fields textarea {
	width: 100%;
	border: 1px solid var(--rfq-border);
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 14px;
	transition: border-color var(--rfq-transition), box-shadow var(--rfq-transition);
}

div.af_quote_fields input:focus,
div.af_quote_fields select:focus,
div.af_quote_fields textarea:focus {
	outline: none;
	border-color: var(--rfq-primary);
	box-shadow: 0 0 0 3px rgba(35,122,158,.15);
}

div.af_quote_fields table.quote-fields { width: 100%; border-collapse: collapse; }

div.af_quote_fields table.quote-fields h3 { font-size: 18px; }

table.quote-fields tr { border-bottom: 1px solid var(--rfq-border); }

table.quote-fields th,
table.quote-fields td {
	padding: 12px;
	background: none !important;
}

/* Submit area */
div.kuiraweb_converty_to_order_button { width: 100%; }

button.kuiraweb_checkout_place_quote {
	float: right;
	background: var(--rfq-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity var(--rfq-transition);
}

button.kuiraweb_checkout_place_quote:hover { opacity: .88; }

#view-quote {
	display: inline-block;
	background: var(--rfq-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 20px;
	text-align: center;
	text-decoration: none !important;
	transition: opacity var(--rfq-transition);
}

#view-quote:hover { opacity: .88; }

/* =============================================
   MESSAGES
   ============================================= */

.successmsg { color: #276749; font-size: 14px; background: #f0fff4; padding: 8px 12px; border-radius: 6px; border-left: 3px solid #38a169; }

.errormsg   { color: #9b2c2c; font-size: 14px; background: #fff5f5; padding: 8px 12px; border-radius: 6px; border-left: 3px solid var(--rfq-danger); }

.afnonece   { color: var(--rfq-danger); }

.frequired  { color: var(--rfq-danger); width: 100%; margin-bottom: 10px; }

#afrfqerror { color: var(--rfq-danger); margin-top: 10px; }

.added_quote,
.added_quote_pro {
	color: #276749;
	font-size: 14px;
	border: 1px solid #9ae6b4;
	background: #f0fff4;
	padding: 8px 12px;
	border-radius: 6px;
	display: none;
}

.added_quote      { margin-bottom: 20px; }
.added_quote_pro  { margin-top: 20px; }

/* =============================================
   TOTALS & MISC
   ============================================= */

.quote_totals { width: 50%; float: right; }

.woo_options     { width: 100%; margin-top: 10px; }
.woo_options_mini{ width: 100%; margin-top: 10px; font-size: 12px; }
.pronam          { font-size: 14px; }
.af_allowed_types{ width: 100%; margin-top: 10px; font-size: 12px; }

#quantityfor { float: left; height: 46px; margin-right: 10px; width: 50px; }

.qrow        { padding: 5px 0; border-bottom: 1px solid var(--rfq-border); }

.view-quote-row { margin-top: 15px !important; }

.main-btn-col { margin-top: 2%; padding: 0 2%; }

#dropdownMenuButton { cursor: pointer; }

/* =============================================
   EMPTY CART STATE
   ============================================= */

.container-empty-car {
	max-width: 100%;
	width: 100%;
	padding: 2.5rem;
	background: var(--rfq-surface);
	border-radius: var(--rfq-radius);
	text-align: center;
	opacity: 0;
	transform: translateY(16px);
	animation: rfqFadeInUp .45s ease-out forwards .2s;
}

@keyframes rfqFadeInUp {
	to { opacity: 1; transform: translateY(0); }
}

.container-empty-car .cart-icon { display: inline-block; margin-bottom: 1.5rem; }

.container-empty-car .cart-icon svg { width: 9rem; height: 9rem; color: #cbd5e0; }

.container-empty-car h2 { font-size: 28px; font-weight: 700; color: var(--rfq-text); margin-bottom: .75rem; }

.container-empty-car p  { color: var(--rfq-muted); margin-bottom: 1.75rem; font-size: 16px; }

.container-empty-car .button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: .7rem 1.4rem;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: opacity var(--rfq-transition);
	margin: 4px;
}

.container-empty-car .button:hover { opacity: .88; }

.container-empty-car .button-primary { background: var(--rfq-primary); color: #fff !important; }

.container-empty-car .button svg { width: 18px; height: 18px; }

/* =============================================
   QUOTE DETAILS (my-account)
   ============================================= */

section.kuiraweb-quote-details { overflow: auto; }

.quote_details th,
.quote_details td { padding: 1em 1.2em; }

.quote_details thead { white-space: nowrap; }

.quote_details a { text-decoration: none !important; }

.quote_details div.wc-order-item-sku { font-size: 11px; }

table.my_account_quotes form.quote-convert-to-order { display: inline; }

.af_rfq_get_qoute_by_id { display: inline-block; }

#af_rfq_download_pdf_with_qoute_id {
	padding: 9px;
	background: #edf2f7;
	color: var(--rfq-text);
	border-radius: 6px;
	border: 1px solid var(--rfq-border);
}

/* =============================================
   LOADER
   ============================================= */

.loader {
	display: none;
	border: 5px solid #f1f5f9;
	border-top: 5px solid var(--rfq-primary);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	animation: rfqSpin .8s linear infinite;
	position: absolute;
}

@keyframes rfqSpin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

#loader-wrapper {
	position: fixed;
	inset: 0;
	background: rgba(255,255,255,.75);
	z-index: 9999;
	display: none;
}

#loader-wrapper::after {
	content: '';
	display: block;
	position: absolute;
	left: 50%;
	top: 45%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	border: 5px solid #e2e8f0;
	border-top-color: var(--rfq-primary);
	border-radius: 50%;
	animation: rfqSpin .8s linear infinite;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
	.quote_totals   { width: 100%; float: none; }
	.form_row .form_row_input { width: 100%; }

	.mini-quote-dropdown,
	.cart_message { display: none !important; }

	.shop_table table,
	.shop_table tr,
	.shop_table td { display: block; }

	.shop_table thead { display: none; }

	.shop_table tr {
		margin-bottom: 14px;
		border: 1px solid var(--rfq-border);
		border-radius: 8px;
		overflow: hidden;
	}

	.shop_table td {
		text-align: right;
		padding-left: 50%;
		position: relative;
		border-bottom: 1px solid var(--rfq-border);
	}

	.shop_table td::before {
		content: attr(data-label);
		position: absolute;
		left: 12px;
		width: 42%;
		font-weight: 600;
		text-align: left;
		color: var(--rfq-muted);
		font-size: 12px;
	}

	.shop_table td:first-child { border-radius: 0; }
	.shop_table td:last-child  { border-radius: 0; border-bottom: none; }

	table.kuiraweb-quote-form__contents .product-thumbnail {
		width: 100%;
		text-align: center;
	}

	.product-thumbnail .attachment-woocommerce_thumbnail { width: 50% !important; }

	div.af_quote_fields table.quote-fields { width: 100%; }

	table.quote-fields th,
	table.quote-fields td {
		display: block;
		width: 100%;
		padding: 6px 0;
	}

	table.quote-fields th { margin-top: 10px; }

	.kuiraweb-quote-form__contents .quote-delete-button:hover { width: 36px; border-radius: 50%; }

	.kuiraweb-quote-form__contents .quote-delete-button:hover::before { display: none; }

	.woocommerce-cart-form__quote-item .product-quantity .quantity { flex-direction: column; }
}

@media (min-width: 320px) {
	.quote_totals { width: 80%; float: right; }
	.form_row .form_row_input { width: 100%; margin-top: 6px; }
}

@media (min-width: 720px) {
	.quote_totals { width: 50%; float: right; }
	.form_row .form_row_input { width: 60%; margin-top: 6px; }
}

/* =============================================
   MISC / COMPAT
   ============================================= */

.dashicons,
.dashicons-before:before { line-height: 0.5 !important; }

.my_account_orders .button.download::after {
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	content: "\f019";
	margin-left: .5em;
}

.kuiraweb__quote-item .product-thumbnail img { width: 50px; }

form.kuiraweb-quote-form table.kuiraweb-quote-form__contents .product-quantity { text-align: center; }

form.kuiraweb-quote-form table.kuiraweb-quote-form__contents .product-quantity .minus,
form.kuiraweb-quote-form table.kuiraweb-quote-form__contents .product-quantity .plus { font-size: 22px; }

form.kuiraweb-quote-form table.kuiraweb-quote-form__contents .product-remove {
	text-align: center;
	font-size: 26px;
}
