/**
 * Nova Fashion - Glassmorphism UI Components
 *
 * @package Nova_Fashion
 */

/* Glass Base Selector */
.nf-glass {
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
	.nf-glass {
		background: rgba(255, 255, 255, 0.95);
		border: 1px solid rgba(0, 0, 0, 0.1);
	}
}

/* Dark theme glass override */
body.dark-mode .nf-glass {
	background: rgba(10, 10, 10, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.05);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

@supports not (backdrop-filter: blur(20px)) {
	body.dark-mode .nf-glass {
		background: rgba(18, 18, 18, 0.98);
		border: 1px solid rgba(255, 255, 255, 0.05);
	}
}

/* Glass Card */
.nf-glass-card {
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(12px) saturate(150%);
	-webkit-backdrop-filter: blur(12px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--nf-radius-md);
	padding: 24px;
	transition: transform var(--nf-transition-normal), box-shadow var(--nf-transition-normal), border-color var(--nf-transition-normal);
}

.nf-glass-card:hover {
	transform: translateY(-5px);
	border-color: rgba(255, 255, 255, 0.25);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* Dark mode glass card */
body.dark-mode .nf-glass-card {
	background: rgba(20, 20, 30, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.04);
}

body.dark-mode .nf-glass-card:hover {
	border-color: rgba(255, 255, 255, 0.1);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Glass Panel / Off-canvas Drawers */
.nf-glass-panel {
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(24px) saturate(180%);
	-webkit-backdrop-filter: blur(24px) saturate(180%);
	border-left: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: -20px 0 50px rgba(0, 0, 0, 0.1);
}

body.dark-mode .nf-glass-panel {
	background: rgba(10, 10, 15, 0.6);
	border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glass Input Control */
.nf-glass-input {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--nf-radius-sm);
	padding: 12px 18px;
	color: var(--nf-color-primary);
	font-family: var(--nf-font-body);
	outline: none;
	transition: border-color var(--nf-transition-fast), background var(--nf-transition-fast);
}

.nf-glass-input:focus {
	border-color: var(--nf-color-accent);
	background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .nf-glass-input {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.05);
	color: var(--nf-color-secondary);
}

body.dark-mode .nf-glass-input:focus {
	border-color: var(--nf-color-accent);
	background: rgba(255, 255, 255, 0.05);
}

/* Glass Button */
.nf-glass-btn {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--nf-color-primary);
	border-radius: var(--nf-radius-full);
	padding: 12px 24px;
	text-transform: uppercase;
	font-family: var(--nf-font-heading);
	font-weight: 500;
	letter-spacing: 0.05em;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	transition: all var(--nf-transition-normal);
}

.nf-glass-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.4);
	transform: translateY(-2px);
}

body.dark-mode .nf-glass-btn {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.08);
	color: var(--nf-color-secondary);
}

body.dark-mode .nf-glass-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
}

/* Floating Glass Header Style */
.nf-navbar.nf-glass-header {
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	margin: 20px 40px;
	border-radius: var(--nf-radius-full);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

body.dark-mode .nf-navbar.nf-glass-header {
	background: rgba(10, 10, 15, 0.4);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Global Drawer Overlay Backdrop styling */
.nf-drawer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(10, 8, 20, 0.25);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 998;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--nf-transition-normal);
}

.nf-drawer-overlay.is-active {
	opacity: 1;
	pointer-events: all;
}

/* Off-canvas Drawers Responsive sizing */
@media (max-width: 600px) {
	.nf-glass-panel,
	.nf-cart-drawer,
	.nf-mobile-menu-container {
		width: 100vw !important;
		max-width: 100% !important;
		border-left: none !important;
	}
}

/* ==========================================================================
   Luxury Search The Collection Overlay & Modal Styling
   ========================================================================== */
.nf-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(10, 8, 20, 0.72);
	backdrop-filter: blur(28px) saturate(190%);
	-webkit-backdrop-filter: blur(28px) saturate(190%);
	z-index: 99999;
	display: none;
	justify-content: center;
	align-items: flex-start;
	padding: clamp(30px, 6vh, 80px) 20px 40px;
	overflow-y: auto;
	opacity: 0;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nf-search-overlay.is-open {
	opacity: 1;
}

.nf-search-overlay-inner {
	position: relative;
	width: 100%;
	max-width: 860px;
	margin: 0 auto;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
	backdrop-filter: blur(32px) saturate(200%);
	-webkit-backdrop-filter: blur(32px) saturate(200%);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 24px;
	box-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
	transform: scale(0.96) translateY(-10px);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
	overflow: hidden;
}

.nf-search-overlay.is-open .nf-search-overlay-inner {
	transform: scale(1) translateY(0);
}

body.dark-mode .nf-search-overlay-inner,
body.dark-theme .nf-search-overlay-inner {
	background: linear-gradient(145deg, rgba(26, 20, 48, 0.85), rgba(13, 10, 26, 0.95));
	border-color: rgba(168, 85, 247, 0.25);
	box-shadow: 0 40px 100px -10px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 92, 246, 0.15);
}

/* Close Button */
.nf-search-close {
	position: absolute;
	top: 22px;
	right: 22px;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10;
	padding: 0 8px;
}

.nf-search-close svg {
	width: 18px;
	height: 18px;
	stroke-width: 2.2;
}

.nf-search-kbd {
	font-family: inherit;
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	background: rgba(0, 0, 0, 0.25);
	padding: 2px 5px;
	border-radius: 5px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: rgba(255, 255, 255, 0.85);
}

.nf-search-close:hover {
	background: rgba(239, 68, 68, 0.25);
	border-color: rgba(239, 68, 68, 0.5);
	transform: scale(1.05);
}

/* Container */
.nf-search-container {
	padding: 40px 38px 36px;
}

/* Header Group */
.nf-search-header-group {
	text-align: center;
	margin-bottom: 24px;
}

.nf-search-eyebrow {
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #c084fc;
	margin-bottom: 6px;
	display: inline-block;
}

.nf-search-title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 6px;
	letter-spacing: -0.02em;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nf-search-subtitle {
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.72);
	margin: 0;
	font-weight: 400;
}

/* Search Input Wrap */
.nf-search-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 20px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.08);
	border: 1.5px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
	transition: all 0.3s ease;
}

.nf-search-input-wrap:focus-within {
	border-color: #a855f7;
	background: rgba(255, 255, 255, 0.12);
	box-shadow: 0 12px 40px rgba(168, 85, 247, 0.25), 0 0 0 3px rgba(168, 85, 247, 0.2);
}

body.dark-mode .nf-search-input-wrap,
body.dark-theme .nf-search-input-wrap {
	background: rgba(15, 12, 28, 0.7);
	border-color: rgba(168, 85, 247, 0.3);
}

.nf-search-icon-inside {
	position: absolute;
	left: 20px;
	color: #c084fc;
	display: flex;
	align-items: center;
	pointer-events: none;
}

.nf-search-icon-inside svg {
	width: 22px;
	height: 22px;
	stroke-width: 2.2;
}

.nf-search-input {
	width: 100%;
	padding: 18px 52px 18px 56px !important;
	font-size: 1.12rem !important;
	font-weight: 500;
	color: #ffffff !important;
	background: transparent !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.nf-search-input::placeholder {
	color: rgba(255, 255, 255, 0.45);
	font-weight: 400;
}

/* Clear Button */
.nf-search-clear-btn {
	position: absolute;
	right: 18px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	font-size: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.nf-search-clear-btn:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.1);
}

/* Spinner */
.nf-search-spinner {
	position: absolute;
	right: 54px;
	width: 20px;
	height: 20px;
	border: 2.5px solid rgba(255, 255, 255, 0.2);
	border-top-color: #a855f7;
	border-radius: 50%;
	animation: nfSpin 0.7s linear infinite;
}

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

/* Tags & Chips Row */
.nf-search-tags-row {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
}

.nf-search-tags-section {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.nf-tags-label {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.6);
	flex-shrink: 0;
}

.nf-tag-chips,
.nf-recent-chips {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.nf-tag-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(8px);
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 0.84rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nf-tag-chip:hover {
	background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(139, 92, 246, 0.15));
	border-color: rgba(168, 85, 247, 0.6);
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(139, 92, 246, 0.25);
}

.nf-chip-icon {
	font-size: 0.95rem;
}

/* Results Feed & Cards */
.nf-search-results-grid {
	min-height: 20px;
	max-height: 52vh;
	overflow-y: auto;
	padding-right: 4px;
}

.nf-search-results-grid::-webkit-scrollbar {
	width: 6px;
}

.nf-search-results-grid::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 4px;
}

.nf-search-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 4px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-bottom: 16px;
}

.nf-results-count {
	font-size: 0.86rem;
	color: rgba(255, 255, 255, 0.75);
}

.nf-results-count strong {
	color: #c084fc;
}

.nf-view-all-results {
	font-size: 0.84rem;
	font-weight: 700;
	color: #c084fc;
	text-decoration: none;
	transition: color 0.2s;
}

.nf-view-all-results:hover {
	color: #ffffff;
	text-decoration: underline;
}

.nf-search-results-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.nf-search-result-item {
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	padding: 12px;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nf-search-result-item:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(168, 85, 247, 0.5);
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.nf-search-result-image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.2);
	margin-bottom: 12px;
}

.nf-search-result-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.nf-search-result-item:hover .nf-search-result-img {
	transform: scale(1.06);
}

.nf-search-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	padding: 3px 8px;
	border-radius: 6px;
	text-transform: uppercase;
}

.nf-search-badge.sale {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.nf-search-badge.out-stock {
	background: rgba(15, 23, 42, 0.85);
	color: #e2e8f0;
	backdrop-filter: blur(6px);
}

.nf-search-result-info {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.nf-search-meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.nf-search-result-cat {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #c084fc;
}

.nf-search-star {
	font-size: 0.72rem;
	font-weight: 700;
	color: #fbbf24;
}

.nf-search-result-title {
	font-size: 0.94rem;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 6px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nf-search-result-price-wrap {
	font-size: 0.95rem;
	font-weight: 800;
	color: #ffffff;
	margin-top: auto;
	padding-top: 4px;
}

.nf-search-result-price-wrap del {
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.82rem;
	margin-right: 4px;
}

.nf-search-result-price-wrap ins {
	text-decoration: none;
	color: #f43f5e;
}

.nf-search-item-cta {
	display: block;
	font-size: 0.76rem;
	font-weight: 700;
	color: #c084fc;
	margin-top: 8px;
	opacity: 0;
	transform: translateX(-4px);
	transition: all 0.2s ease;
}

.nf-search-result-item:hover .nf-search-item-cta {
	opacity: 1;
	transform: translateX(0);
}

/* Skeleton State */
.nf-search-skeleton-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	border-radius: 14px;
}

.nf-skeleton-thumb {
	width: 70px;
	height: 70px;
	border-radius: 10px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
	background-size: 200% 100%;
	animation: nfShimmer 1.5s infinite;
	flex-shrink: 0;
}

.nf-skeleton-text {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nf-skeleton-line {
	height: 10px;
	border-radius: 6px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
	background-size: 200% 100%;
	animation: nfShimmer 1.5s infinite;
}

.nf-skeleton-line.short { width: 35%; }
.nf-skeleton-line.title { width: 75%; height: 14px; }
.nf-skeleton-line.price { width: 45%; }

@keyframes nfShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Empty State */
.nf-search-empty-state {
	text-align: center;
	padding: 40px 20px;
}

.nf-empty-icon-bubble {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	margin: 0 auto 16px;
}

.nf-empty-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 6px;
}

.nf-empty-desc {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.65);
	max-width: 420px;
	margin: 0 auto 20px;
}

.nf-empty-label {
	display: block;
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 10px;
}

.nf-empty-chips {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

@media (max-width: 640px) {
	.nf-search-container {
		padding: 30px 18px 24px;
	}
	.nf-search-results-list {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	.nf-search-result-item {
		padding: 8px;
	}
	.nf-search-close {
		top: 14px;
		right: 14px;
		width: 36px;
		height: 36px;
	}
	.nf-search-kbd {
		display: none;
	}
}
