/**
 * Pagrishop Fabric Manager Frontend Styles
 * Includes exact Pagrishop.com 2-Row Header Layout & Micro-animations
 */

/* Top Price Header Formatting */
.pfm-del-price {
	color: #94a3b8 !important;
	text-decoration: line-through !important;
	margin-right: 8px !important;
	font-weight: 400 !important;
	font-size: 0.9em !important;
}

.pfm-ins-price {
	text-decoration: none !important;
	font-weight: 700 !important;
	color: #0f172a !important;
}

.pfm-shipping-suffix {
	font-size: 0.85em !important;
	font-weight: 500 !important;
	color: #64748b !important;
	margin-left: 4px !important;
}

/* Meter Selector Container */
.pfm-meter-selector-container {
	margin: 20px 0;
	padding: 18px 20px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	max-width: 480px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Hide standard WooCommerce quantity box when Fabric Meter Selector is active */
.single-product form.cart div.quantity:not(.pfm-meter-input-wrapper) {
	display: none !important;
}

/* Ensure Add to Cart & Buy Now buttons display prominently */
.single-product form.cart button.single_add_to_cart_button {
	margin-top: 12px !important;
}

.pfm-meter-label {
	display: block;
	font-size: 15px;
	color: #1e293b;
	margin-bottom: 12px;
}

.pfm-unit-tag {
	font-weight: 400;
	color: #64748b;
	margin-left: 4px;
}

.pfm-meter-input-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.pfm-step-btn {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #1e293b;
	font-size: 20px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	user-select: none;
}

.pfm-step-btn:hover {
	background: #4f46e5;
	color: #ffffff;
	border-color: #4f46e5;
}

.pfm-input-field-group {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1;
}

.pfm-length-input {
	width: 100% !important;
	height: 44px !important;
	padding: 0 70px 0 16px !important;
	border-radius: 8px !important;
	border: 1px solid #cbd5e1 !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
	-moz-appearance: textfield !important;
}

.pfm-length-input::-webkit-outer-spin-button,
.pfm-length-input::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.pfm-length-input:focus {
	border-color: #4f46e5 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

.pfm-input-unit-suffix {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	font-weight: 700;
	color: #475569;
	pointer-events: none;
	z-index: 2;
}

/* Live Pricing Card */
.pfm-live-pricing-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 14px 16px;
}

.pfm-price-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	margin-bottom: 6px;
}

.pfm-price-row:last-child {
	margin-bottom: 0;
}

.pfm-row-label {
	color: #475569;
	font-weight: 500;
}

.pfm-row-val {
	font-weight: 600;
	color: #0f172a;
}

.pfm-highlight-row {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed #e2e8f0;
}

.pfm-live-total-price {
	font-size: 20px;
	font-weight: 800;
	color: #4f46e5;
}

.pfm-sub-text {
	font-size: 12px;
	color: #94a3b8;
	margin-top: 4px;
	text-align: right;
}

/* WhatsApp Expert Button */
.pfm-whatsapp-expert-wrapper {
	margin-top: 14px;
}

.pfm-whatsapp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #25D366;
	color: #ffffff !important;
	padding: 12px 18px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.25s ease;
	box-shadow: 0 3px 6px rgba(37, 211, 102, 0.2);
}

.pfm-whatsapp-btn:hover {
	background: #128C7E;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.pfm-wa-icon {
	font-size: 18px;
	line-height: 1;
}

/* Live Fabric Product Search Widget */
.pfm-live-search-wrapper {
	position: relative;
	box-sizing: border-box;
}

.pfm-search-input-box {
	position: relative;
	display: flex;
	align-items: center;
}

.pfm-search-icon {
	position: absolute;
	left: 14px;
	color: #64748b;
	font-size: 18px;
	pointer-events: none;
}

.pfm-live-search-input {
	width: 100% !important;
	height: 44px !important;
	padding: 0 40px 0 42px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 22px !important;
	font-size: 14px !important;
	color: #0f172a !important;
	background: #ffffff !important;
	box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
	transition: all 0.25s ease !important;
}

.pfm-live-search-input:focus {
	border-color: #4f46e5 !important;
	outline: none !important;
	box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15) !important;
}

.pfm-search-spinner {
	position: absolute;
	right: 14px;
	width: 16px;
	height: 16px;
	border: 2px solid #e2e8f0;
	border-top-color: #4f46e5;
	border-radius: 50%;
	animation: pfmSpin 0.7s linear infinite;
}

@keyframes pfmSpin {
	to { transform: rotate(360deg); }
}

.pfm-live-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 99999;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.12);
	max-height: 400px;
	overflow-y: auto;
}

.pfm-search-results-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 6px 0 !important;
}

.pfm-search-item {
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 1px solid #f1f5f9;
}

.pfm-search-item:last-child {
	border-bottom: none;
}

.pfm-search-link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 14px;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.pfm-search-link:hover {
	background: #f8fafc;
}

.pfm-search-thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
}

.pfm-search-details {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.pfm-search-title {
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.3;
}

.pfm-search-cat {
	font-size: 12px;
	color: #64748b;
	margin-top: 2px;
}

.pfm-search-price {
	font-size: 13px;
	font-weight: 700;
	color: #4f46e5;
	margin-top: 3px;
}

/* ==========================================================================
   Exact Pagrishop.com Header Theme Styles
   ========================================================================== */
.pfm-pagrishop-theme {
	width: 100%;
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
	box-shadow: 0 2px 10px rgba(0,0,0,0.03);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	position: relative;
	z-index: 99990;
}

.pfm-top-announcement-bar {
	padding: 7px 16px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2px;
}

.pfm-header-container {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Row 1: Logo & Icons */
.pfm-header-row-top {
	padding: 16px 0;
}

.pfm-header-flex-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.pfm-header-left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.pfm-header-logo-link {
	text-decoration: none !important;
	display: flex;
	align-items: center;
}

.pfm-header-logo-img {
	max-height: 52px;
	width: auto;
}

.pfm-header-brand-text {
	font-size: 34px;
	font-weight: 900;
	color: #0f172a;
	letter-spacing: -1.2px;
	font-family: inherit;
}

.pfm-brand-orange-o {
	color: #f97316;
	display: inline-block;
	transform: scale(0.95);
}

.pfm-header-search-box {
	flex: 1;
	max-width: 420px;
}

/* Right Icons (Bag & Account) */
.pfm-header-right-icons {
	display: flex;
	align-items: center;
	gap: 22px;
}

.pfm-header-icon-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #0f172a;
	text-decoration: none !important;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.pfm-header-icon-btn:hover {
	transform: translateY(-1px);
	opacity: 0.85;
}

.pfm-svg-icon {
	display: block;
}

.pfm-bag-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	background: #0f172a;
	color: #ffffff;
	font-size: 10px;
	font-weight: 800;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

/* Row 2: Category Navigation Menu */
.pfm-header-row-nav {
	padding: 10px 0 14px 0;
	border-top: 1px solid #f1f5f9;
}

.pfm-desktop-nav-menu .pfm-nav-ul-pagrishop,
.pfm-nav-ul-pagrishop {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 28px 32px;
}

.pfm-nav-ul-pagrishop li {
	margin: 0 !important;
	padding: 0 !important;
}

.pfm-nav-ul-pagrishop li a {
	display: inline-block;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	padding: 6px 0;
	position: relative;
	transition: color 0.2s ease;
	line-height: 1.4;
}

.pfm-nav-ul-pagrishop li a:hover {
	color: #0084ff;
}

/* Active Blue Accent Tab Underline Indicator */
.pfm-nav-ul-pagrishop li.current-menu-item a,
.pfm-nav-ul-pagrishop li.active a,
.pfm-nav-ul-pagrishop li a.active,
.pfm-nav-ul-pagrishop li.active-blue a {
	color: #0084ff !important;
}

.pfm-nav-ul-pagrishop li.current-menu-item a::after,
.pfm-nav-ul-pagrishop li.active a::after,
.pfm-nav-ul-pagrishop li.active-blue a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: -8px;
	right: -8px;
	height: 3px;
	background: #0084ff;
	border-radius: 2px;
}

/* Mobile Drawer Overlay */
.pfm-mobile-drawer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
}

.pfm-mobile-drawer-content {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 290px;
	background: #ffffff;
	padding: 24px 20px;
	box-shadow: 4px 0 20px rgba(0,0,0,0.15);
	overflow-y: auto;
}

.pfm-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 16px;
	border-bottom: 1px solid #f1f5f9;
	margin-bottom: 20px;
}

.pfm-drawer-title {
	font-size: 20px;
	font-weight: 900;
	color: #0f172a;
}

.pfm-drawer-close {
	background: none;
	border: none;
	font-size: 28px;
	color: #64748b;
	cursor: pointer;
	line-height: 1;
}

.pfm-mobile-nav-ul {
	list-style: none !important;
	margin: 0 0 24px 0 !important;
	padding: 0 !important;
}

.pfm-mobile-nav-ul li {
	margin-bottom: 14px;
}

.pfm-mobile-nav-ul li a {
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	display: block;
}

.pfm-drawer-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 16px;
	border-top: 1px solid #f1f5f9;
}

.pfm-drawer-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background: #f8fafc;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a !important;
	text-decoration: none !important;
}

.pfm-desktop-only { display: block; }
.pfm-mobile-only { display: none; }
.pfm-mobile-menu-toggle { display: none; background: none; border: none; padding: 4px; cursor: pointer; }
.pfm-hamburger-icon { font-size: 26px; color: #0f172a; }

@media (max-width: 992px) {
	.pfm-desktop-only { display: none !important; }
	.pfm-mobile-only { display: block !important; }
	.pfm-mobile-menu-toggle { display: block !important; }

	.pfm-header-brand-text {
		font-size: 26px;
	}

	.pfm-mobile-search-wrapper {
		padding: 0 0 14px 0;
	}
}
