/* Import premium modern typography */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
	/* Brand Colors */
	--mbws-brand-primary: #4f46e5;
	--mbws-brand-primary-hover: #4338ca;
	--mbws-brand-light: #6366f1;
	--mbws-brand-light-05: rgba(99, 102, 241, 0.05);
	--mbws-brand-light-12: rgba(99, 102, 241, 0.12);
	--mbws-brand-gradient: linear-gradient(135deg, var(--mbws-brand-light), var(--mbws-brand-primary));
	--mbws-brand-gradient-hover: linear-gradient(135deg, var(--mbws-brand-primary), var(--mbws-brand-primary-hover));

	/* Neutral / Slate Colors */
	--mbws-white: #fff;
	--mbws-white-95: rgba(255, 255, 255, 0.95);
	--mbws-white-30: rgba(255, 255, 255, 0.3);
	--mbws-slate-50: #f8fafc;
	--mbws-slate-100: #f1f5f9;
	--mbws-slate-200: #e2e8f0;
	--mbws-slate-300: #cbd5e1;
	--mbws-slate-400: #94a3b8;
	--mbws-slate-500: #64748b;
	--mbws-slate-600: #475569;
	--mbws-slate-700: #334155;
	--mbws-slate-800: #1e293b;
	--mbws-slate-900: #0f172a;
	--mbws-slate-900-rgba: rgba(15, 23, 42, 0.55);

	/* Status Colors */
	--mbws-success: #22c55e;
	--mbws-success-bg: #f0fdf4;
	--mbws-success-border: #dcfce7;

	--mbws-danger: #ef4444;
	--mbws-danger-bg: #fef2f2;
	--mbws-danger-border: #fee2e2;
	--mbws-danger-20: rgba(239, 68, 68, 0.2);
	--mbws-danger-05: rgba(239, 68, 68, 0.05);
	--mbws-danger-15: rgba(239, 68, 68, 0.15);

	--mbws-orange: #f97316;
	--mbws-flash-gradient: linear-gradient(90deg, var(--mbws-danger), var(--mbws-orange));
	--mbws-flash-gradient-135: linear-gradient(135deg, var(--mbws-danger), var(--mbws-orange));
}

/* Apply font to plugin elements */
.mbws-popup-overlay,
.mbws-quote-wrapper,
.mbws-flash-sale-wrapper,
.mbws-flash-sale-ended-container,
.mbws-dealer-dashboard,
.mbws-quote-checkout {
	font-family: 'Outfit', sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* Glassmorphism Popup Overlay */
.mbws-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--mbws-slate-900-rgba);
	backdrop-filter: blur(12px) saturate(180%);
	-webkit-backdrop-filter: blur(12px) saturate(180%);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: mbwsFadeIn 0.3s ease-out;
}

/* Popup Container */
.mbws-popup-container {
	background: var(--mbws-white-95);
	border: 1px solid var(--mbws-white-30);
	border-radius: 16px;
	width: 100%;
	max-width: 440px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	animation: mbwsSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mbws-popup-header {
	padding: 30px 30px 20px;
	text-align: center;
	background: linear-gradient(180deg, var(--mbws-brand-light-05) 0%, rgba(255, 255, 255, 0) 100%);
}

.mbws-popup-header h2 {
	margin: 0 0 8px;
	font-weight: 800;
	font-size: 22px;
	color: var(--mbws-slate-900);
	letter-spacing: -0.02em;
}

.mbws-popup-subtitle {
	margin: 0;
	font-size: 14px;
	color: var(--mbws-slate-500);
	line-height: 1.5;
}

/* Popup Tabs */
.mbws-popup-tabs {
	display: flex;
	background: var(--mbws-slate-100);
	padding: 6px;
	margin: 0 30px;
	border-radius: 10px;
	border: 1px solid var(--mbws-slate-200);
}

.mbws-tab-btn {
	flex: 1;
	padding: 10px;
	border: none;
	background: none;
	font-weight: 600;
	font-size: 14px;
	color: var(--mbws-slate-500);
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.25s ease;
	margin: unset;
}

.mbws-tab-btn.active {
	background: var(--mbws-white);
	color: var(--mbws-brand-primary);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Form Styling */
.mbws-popup-content {
	padding: 25px 30px 30px;
}

.mbws-popup-content .mbws-form {
	display: none;
	/* opacity: 0; */
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.mbws-form select,
.mbws-form input:not([type=checkbox]) {
	padding: 0 14px;
	height: 45px;
	border: 1px solid var(--mbws-slate-300);
	border-radius: 8px;
	background-color: var(--mbws-white);
	color: var(--mbws-slate-900);
	font-size: 14px;
	outline: none;
	transition: all 0.2s ease;
	box-sizing: border-box;
	margin-bottom: unset;
}

.mbws-form,
.mbws-form button,
.mbws-form input[type=checkbox],
.mbws-form input[type=radio] {
	margin-bottom: unset;
}

.mbws-form.active {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

.mbws-form-group {
	margin-bottom: 18px;
}

.mbws-form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 13px;
	color: var(--mbws-slate-700);
}

.mbws-form-group input,
.mbws-form-group select,
.mbws-form-group textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--mbws-slate-300);
	border-radius: 8px;
	background-color: var(--mbws-white);
	color: var(--mbws-slate-900);
	font-size: 14px;
	outline: none;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

/* Checkbox styling within form groups */
.mbws-checkbox-group {
	display: flex;
	align-items: center;
}

.mbws-checkbox-group label {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	margin-bottom: 0;
	font-weight: 500;
}

.mbws-checkbox-group input[type="checkbox"] {
	width: auto;
	margin-right: 8px;
	cursor: pointer;
	height: auto;
	box-shadow: none;
}

.mbws-customer-type-wrapper label.checkbox {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
}

.mbws-customer-type-wrapper input[type="checkbox"] {
	margin-right: 8px;
	width: auto;
}

.mbws-form-group input::placeholder {
	color: var(--mbws-slate-400);
}

.mbws-form-group input:focus,
.mbws-form-group select:focus,
.mbws-form-group textarea:focus {
	border-color: var(--mbws-brand-light);
	box-shadow: 0 0 0 4px var(--mbws-brand-light-12);
}

/* Premium Buttons */
.mbws-btn {
	width: 100%;
	padding: 12px;
	background: var(--mbws-brand-gradient);
	color: var(--mbws-white);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 700;
	font-size: 15px;
	text-align: center;
	transition: all 0.2s ease;
	box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
}

.mbws-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.25), 0 4px 6px -2px rgba(79, 70, 229, 0.15);
	background: var(--mbws-brand-gradient-hover);
}

.mbws-btn:active {
	transform: translateY(1px);
}

.mbws-btn:disabled {
	background: var(--mbws-slate-400);
	box-shadow: none;
	cursor: not-allowed;
}

/* Message Indicators */
.mbws-msg {
	margin-top: 15px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	padding: 8px 12px;
	border-radius: 6px;
	display: none;
}

.mbws-msg.error {
	display: block;
	background: var(--mbws-danger-bg);
	color: var(--mbws-danger);
	border: 1px solid var(--mbws-danger-border);
	animation: mbwsShake 0.4s ease;
}

.mbws-msg.success {
	display: block;
	background: var(--mbws-success-bg);
	color: var(--mbws-success);
	border: 1px solid var(--mbws-success-border);
}

/* Premium Flash Sale Container */
.mbws-flash-sale-wrapper {
	margin: 24px 0;
	padding: 20px;
	border: 1px solid var(--mbws-danger-20);
	border-radius: 12px;
	background: linear-gradient(135deg, #fffefe 0%, var(--mbws-danger-bg) 100%);
	box-shadow: 0 4px 12px var(--mbws-danger-05);
}

.mbws-fs-title {
	font-weight: 800;
	font-size: 13px;
	color: var(--mbws-danger);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.mbws-fs-timer {
	font-size: 26px;
	font-weight: 800;
	color: var(--mbws-slate-800);
	display: flex;
	align-items: center;
	gap: 6px;
	letter-spacing: -0.03em;
}

.mbws-fs-timer span {
	background: var(--mbws-danger);
	color: var(--mbws-white);
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 20px;
	box-shadow: 0 4px 6px var(--mbws-danger-15);
}

.mbws-fs-stock {
	margin-top: 18px;
}

.mbws-fs-progress {
	background: var(--mbws-slate-300);
	height: 8px;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 8px;
}

.mbws-fs-bar {
	background: var(--mbws-flash-gradient);
	height: 100%;
	border-radius: 10px;
	transition: width 0.6s ease;
}

.mbws-fs-stock-info {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--mbws-slate-500);
	font-weight: 600;
}

.mbws-fs-stock-left {
	color: var(--mbws-danger);
}

/* Loop Badge */
.mbws-flash-sale-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	color: var(--mbws-white);
	padding: 5px 12px;
	border-radius: 20px;
	z-index: 9;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	background: var(--mbws-flash-gradient-135);
}

/* Dealer Dashboard Layout */
.mbws-section {
	transition: all 0.3s ease;
}

.mbws-table {
	margin-top: 15px;
	border: 1px solid var(--mbws-slate-200);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mbws-table th {
	background: var(--mbws-slate-50);
	color: var(--mbws-slate-600);
	font-weight: 700;
	font-size: 13px;
	padding: 14px 16px;
	border-bottom: 2px solid var(--mbws-slate-300);
}

.mbws-table td {
	padding: 14px 16px;
	font-size: 14px;
	color: var(--mbws-slate-700);
	border-bottom: 1px solid var(--mbws-slate-200);
}

.mbws-table tbody tr:hover {
	background-color: var(--mbws-slate-50);
}

/* Form Row Grid */
.mbws-form-row {
	display: flex;
	gap: 16px;
}

@media (max-width: 768px) {
	.mbws-form-row {
		flex-direction: column;
		gap: 0;
	}
}

/* Animations */
@keyframes mbwsFadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes mbwsSlideUp {
	from {
		transform: translateY(20px);
		opacity: 0;
	}

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

@keyframes mbwsShake {

	0%,
	100% {
		transform: translateX(0);
	}

	20%,
	60% {
		transform: translateX(-6px);
	}

	40%,
	80% {
		transform: translateX(6px);
	}
}

/* --- UX Builder Flash Sale Element --- */
.mbws-ux-flashsale-container {
	margin: 30px 0;
	font-family: 'Outfit', sans-serif;
}

.mbws-ux-fs-header {
	background: #ff7a00;
	background: linear-gradient(90deg, #ff7a00 0%, #ff5500 100%);
	padding: 12px 20px;
	border-radius: 12px 12px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #fff;
	flex-wrap: wrap;
	gap: 10px;
}

.mbws-ux-fs-title-wrap {
	display: flex;
	align-items: center;
}

.mbws-ux-fs-title-text {
	font-size: 24px;
	font-weight: 800;
	font-style: italic;
	text-transform: uppercase;
	letter-spacing: -0.02em;
	color: #fff;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
}

.mbws-ux-fs-header-right {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	font-weight: 600;
}

.mbws-ux-fs-timer-label {
	color: rgba(255, 255, 255, 0.9);
	font-weight: 500;
}

.mbws-ux-fs-header-timer {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 16px;
	font-weight: 700;
}

.mbws-ux-fs-header-timer .t-box {
	background: #111;
	color: #fff;
	padding: 3px 6px;
	border-radius: 4px;
	min-width: 28px;
	text-align: center;
	font-family: monospace, sans-serif;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mbws-ux-fs-more {
	color: #fff;
	text-decoration: none;
	background: rgba(0, 0, 0, 0.15);
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	transition: background 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.mbws-ux-fs-more:hover {
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
}

/* Product Grid */
.mbws-ux-fs-grid {
	display: grid;
	gap: 20px;
	padding: 20px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-top: none;
	border-radius: 0 0 12px 12px;
}

.mbws-ux-fs-grid.columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.mbws-ux-fs-grid.columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.mbws-ux-fs-grid.columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.mbws-ux-fs-grid.columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.mbws-ux-fs-grid.columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 991px) {
	.mbws-ux-fs-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 767px) {
	.mbws-ux-fs-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 479px) {
	.mbws-ux-fs-grid {
		grid-template-columns: 1fr;
	}
}

/* Card */
.mbws-ux-fs-product-card {
	background: #fff;
	border: 1px solid #f0f0f0;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

.mbws-ux-fs-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
	border-color: #ff5500;
}

.mbws-ux-fs-product-card .card-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.mbws-ux-fs-product-card .product-image-link {
	display: block;
	position: relative;
	text-align: center;
	padding: 15px;
	background: #f9f9f9;
}

.mbws-ux-fs-product-card .product-image-link img {
	max-height: 200px;
	object-fit: contain;
	width: auto;
	margin: 0 auto;
}

.mbws-discount-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #ef4444;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
	z-index: 5;
}

.mbws-ux-fs-product-card .product-info {
	padding: 15px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.mbws-ux-fs-product-card .product-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 10px 0;
	height: 40px;
	overflow: hidden;
	display: -webkit-box;
	line-clamp: 2;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.mbws-ux-fs-product-card .product-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.15s ease;
}

.mbws-ux-fs-product-card .product-title a:hover {
	color: #ff5500;
}

.mbws-ux-fs-product-card .price-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.mbws-ux-fs-product-card .flash-price {
	font-size: 16px;
	font-weight: 700;
	color: #ef4444;
}

.mbws-ux-fs-product-card .regular-price {
	font-size: 13px;
	color: #999;
	text-decoration: line-through;
}

/* Progress bar style from photo */
.mbws-ux-fs-product-card .progress-wrapper {
	margin-top: auto;
}

.mbws-ux-fs-product-card .progress-bar-container {
	position: relative;
	background: #e0e0e0;
	height: 22px;
	border-radius: 11px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mbws-ux-fs-product-card .progress-bar-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: #ffb800;
	background: linear-gradient(90deg, #ffb800 0%, #ff7a00 100%);
	border-radius: 11px;
	transition: width 0.4s ease;
}

.mbws-ux-fs-product-card .progress-bar-label {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	color: #333;
}

.mbws-ux-fs-product-card .progress-bar-label .fire-icon {
	animation: mbwsFirePulse 1.2s infinite alternate;
}

@keyframes mbwsFirePulse {
	0% {
		transform: scale(1);
	}

	100% {
		transform: scale(1.2);
	}
}

/* Sold Out styling */
.mbws-ux-fs-product-card.sold-out {
	opacity: 0.85;
}

.mbws-ux-fs-product-card.sold-out .progress-bar-fill {
	background: #999;
}

.mbws-ux-fs-product-card.sold-out .progress-bar-label {
	color: #fff;
}

/* --- WooCommerce my-account page layout --- */
.woocommerce-account #customer_login,
.mbws-account-tabs {
	font-family: 'Outfit', sans-serif;
	-webkit-font-smoothing: antialiased;
}

.mbws-account-tabs {
	max-width: 440px;
	margin: 40px auto 0;
}

#customer_login.mbws-account-login-container {
	display: block;
	max-width: 440px;
	margin: 20px auto 40px;
	background: var(--mbws-white);
	border: 1px solid var(--mbws-slate-200);
	border-radius: 16px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
	padding: 30px;
	float: none;
}

#customer_login.mbws-account-login-container .col-1,
#customer_login.mbws-account-login-container .col-2 {
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin: 0;
	float: none;
	border: none;
}

#customer_login.mbws-account-login-container h3.uppercase {
	display: none;
}

#customer_login.mbws-account-login-container form.woocommerce-form {
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	box-shadow: none;
}

#customer_login.mbws-account-login-container form.woocommerce-form p.form-row {
	margin-bottom: 18px;
}

#customer_login.mbws-account-login-container form.woocommerce-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 13px;
	color: var(--mbws-slate-700);
	text-transform: none;
}

#customer_login.mbws-account-login-container form.woocommerce-form input[type="text"],
#customer_login.mbws-account-login-container form.woocommerce-form input[type="email"],
#customer_login.mbws-account-login-container form.woocommerce-form input[type="password"],
#customer_login.mbws-account-login-container form.woocommerce-form select {
	width: 100%;
	height: 45px;
	padding: 0 14px;
	border: 1px solid var(--mbws-slate-300);
	border-radius: 8px;
	background-color: var(--mbws-white);
	color: var(--mbws-slate-900);
	font-size: 14px;
	outline: none;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

#customer_login.mbws-account-login-container form.woocommerce-form .show-password-input {
	height: 45px;
}

#customer_login.mbws-account-login-container form.woocommerce-form input:focus,
#customer_login.mbws-account-login-container form.woocommerce-form select:focus {
	border-color: var(--mbws-brand-light);
	box-shadow: 0 0 0 4px var(--mbws-brand-light-12);
}

#customer_login.mbws-account-login-container form.woocommerce-form button[type="submit"] {
	width: 100%;
	padding: 12px;
	background: var(--mbws-brand-gradient);
	color: var(--mbws-white);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 700;
	font-size: 15px;
	text-align: center;
	transition: all 0.2s ease;
	box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
	height: auto;
	text-transform: none;
}

#customer_login.mbws-account-login-container form.woocommerce-form button[type="submit"]:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.25), 0 4px 6px -2px rgba(79, 70, 229, 0.15);
	background: var(--mbws-brand-gradient-hover);
}

#customer_login.mbws-account-login-container .woocommerce-LostPassword {
	margin-top: 15px;
	margin-bottom: 0;
	text-align: center;
}

#customer_login.mbws-account-login-container .woocommerce-LostPassword a {
	font-size: 13px;
	color: var(--mbws-brand-primary);
	font-weight: 600;
	text-decoration: none;
}

#customer_login.mbws-account-login-container .woocommerce-LostPassword a:hover {
	color: var(--mbws-brand-primary-hover);
}

#customer_login.mbws-account-login-container form.woocommerce-form p.form-row:last-of-type {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 0;
}

#customer_login.mbws-account-login-container form.woocommerce-form button[type="submit"] {
	order: 2;
}

#customer_login.mbws-account-login-container .woocommerce-form-login__rememberme {
	order: 1;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	font-weight: 500;
	font-size: 13px;
	color: var(--mbws-slate-600);
	margin-bottom: 0;
}

#customer_login.mbws-account-login-container .woocommerce-form-login__rememberme input[type="checkbox"] {
	margin-right: 8px;
	width: auto;
	height: auto;
}

/* Fix registration layout */
#customer_login.mbws-account-login-container .mbws-customer-type-wrapper {
	margin-top: 10px;
	margin-bottom: 10px;
}

#customer_login.mbws-account-login-container .mbws-wholesale-state-wrapper {
	margin-bottom: 18px;
}