/* Nearest Showroom Finder — Frontend Styles
   Brand matched to OWND! locator screenshot layout */

.nsf-finder,
.nsf-popup {
	--nsf-primary: #582987;
	--nsf-primary-hover: #451e6d;
	--nsf-primary-light: #f6f0fc;
	--nsf-primary-border: #d8b4fe;
	--nsf-text: #1e293b;
	--nsf-muted: #64748b;
	--nsf-border: #dcdfe4;
	--nsf-bg: #ffffff;
	--nsf-radius: 10px;
	--nsf-star: #f59e0b;
	--nsf-success: #16a34a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: var(--nsf-text);
	box-sizing: border-box;
}

.nsf-finder *,
.nsf-popup *,
.nsf-popup *::before,
.nsf-popup *::after {
	box-sizing: border-box;
}

/* ---------- Main Container ---------- */

.nsf-finder {
	max-width: 1240px;
	margin: 24px auto;
	padding: 24px;
	background: var(--nsf-bg);
}

/* Step Headers */
.nsf-step-header {
	text-align: center;
	margin-bottom: 20px;
}

.nsf-step-pill {
	display: inline-block;
	background: var(--nsf-primary-light);
	color: var(--nsf-primary);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 4px 12px;
	border-radius: 20px;
	margin-bottom: 8px;
}

.nsf-step-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--nsf-text);
	margin: 0 0 6px;
}

.nsf-step-desc {
	color: var(--nsf-muted);
	font-size: 0.95rem;
	margin: 0;
}

/* ---------- Step 1: Product Selector ---------- */

.nsf-step-category {
	background: #fafbfc;
	border: 1px solid var(--nsf-border);
	border-radius: 12px;
	padding: 28px 20px;
	margin-bottom: 24px;
}

.nsf-product-selector {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	max-width: 860px;
	margin: 0 auto;
}

@media (max-width: 768px) {
	.nsf-product-selector {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.nsf-product-selector {
		grid-template-columns: 1fr;
	}
}

.nsf-product-btn {
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	position: relative;
	transition: all 0.2s ease;
	color: #334155;
}

.nsf-product-btn:hover {
	border-color: var(--nsf-primary-border);
	background: var(--nsf-primary-light);
	color: var(--nsf-primary);
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(88, 41, 135, 0.08);
}

.nsf-product-btn.is-active {
	border-color: var(--nsf-primary);
	background: var(--nsf-primary-light);
	color: var(--nsf-primary);
	box-shadow: 0 4px 14px rgba(88, 41, 135, 0.15);
}

.nsf-prod-icon {
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nsf-prod-name {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.2px;
}

.nsf-prod-check {
	position: absolute;
	top: 8px;
	right: 10px;
	background: var(--nsf-primary);
	color: #fff;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	font-size: 11px;
	display: none;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.nsf-product-btn.is-active .nsf-prod-check {
	display: flex;
}

/* Prompt before selection */
.nsf-selection-prompt {
	text-align: center;
	padding: 16px 20px;
	background: #fffbeb;
	border: 1px dashed #fcd34d;
	border-radius: 8px;
	margin-bottom: 24px;
}

.nsf-prompt-text {
	margin: 0;
	color: #92400e;
	font-size: 0.95rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

/* ---------- Step 2: Find Store Nearby Section ---------- */

.nsf-step-find {
	background: #ffffff;
	border: 1px solid var(--nsf-border);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 28px;
	animation: nsfFadeIn 0.3s ease;
}

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

.nsf-selected-summary {
	color: var(--nsf-primary);
	font-weight: 600;
}

.nsf-finder-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 16px;
}

.nsf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
	transition: all .15s ease;
}

.nsf-btn:focus-visible {
	outline: 2px solid var(--nsf-primary);
	outline-offset: 2px;
}

.nsf-btn-primary {
	background: var(--nsf-primary);
	color: #fff;
}
.nsf-btn-primary:hover {
	background: var(--nsf-primary-hover);
	box-shadow: 0 3px 8px rgba(88, 41, 135, 0.25);
}

.nsf-btn-secondary {
	background: transparent;
	color: var(--nsf-primary);
	border-color: var(--nsf-primary);
}
.nsf-btn-secondary:hover {
	background: var(--nsf-primary-light);
}

.nsf-btn-outline {
	background: #ffffff;
	color: #334155;
	border-color: #cbd5e1;
}
.nsf-btn-outline:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
}

.nsf-dot {
	width: 8px;
	height: 8px;
	background: var(--nsf-success);
	border-radius: 50%;
	display: inline-block;
}

/* Manual Form */
.nsf-manual-form {
	display: flex;
	gap: 10px;
	margin-top: 18px;
	flex-wrap: wrap;
	justify-content: center;
}

.nsf-manual-input {
	flex: 1 1 280px;
	max-width: 420px;
	padding: 11px 14px;
	border: 1px solid var(--nsf-border);
	border-radius: 6px;
	font-size: 0.95rem;
}

.nsf-manual-input:focus-visible {
	outline: 2px solid var(--nsf-primary);
	outline-offset: 1px;
}

/* Status Notifications */
.nsf-finder-status {
	margin: 20px 0;
	padding: 12px 18px;
	border-radius: 6px;
	background: #f1f5f9;
	color: var(--nsf-text);
	font-size: 0.92rem;
	text-align: center;
}

.nsf-finder-status.nsf-status-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

/* ---------- STEP 3: Store Listing Layout (Matching Screenshot) ---------- */

.nsf-finder-results {
	margin-top: 24px;
}

/* Breadcrumbs */
.nsf-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	color: var(--nsf-primary);
	font-weight: 500;
	margin-bottom: 16px;
}

.nsf-bc-brand {
	color: var(--nsf-primary);
	font-weight: 600;
}

.nsf-bc-sep {
	color: #94a3b8;
	font-size: 0.8rem;
}

.nsf-bc-state {
	color: var(--nsf-primary);
}

.nsf-bc-city {
	color: var(--nsf-primary);
	font-weight: 700;
}

/* Results Header */
.nsf-results-header {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 22px;
	border-bottom: 1px solid #edf2f7;
	padding-bottom: 12px;
}

.nsf-stores-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
}

.nsf-store-count-badge {
	font-size: 0.88rem;
	color: var(--nsf-muted);
}

/* 3-Column Responsive Grid */
.nsf-showroom-container.nsf-showroom-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

@media (max-width: 1060px) {
	.nsf-showroom-container.nsf-showroom-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 680px) {
	.nsf-showroom-container.nsf-showroom-grid {
		grid-template-columns: 1fr;
	}
	.nsf-finder {
		padding: 16px 12px;
	}
}

/* Individual Showroom Card */
.nsf-showroom-card {
	background: #ffffff;
	border: 1px solid #dcdfe4;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.nsf-showroom-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.nsf-card-inner {
	padding: 22px 20px 18px;
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Card Header */
.nsf-card-header {
	margin-bottom: 10px;
}

.nsf-card-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 8px;
	line-height: 1.3;
}

.nsf-badge-group {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.nsf-prod-pill {
	display: inline-block;
	background: #f1f5f9;
	color: #475569;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
	border: 1px solid #e2e8f0;
}

.nsf-card-badge {
	display: inline-block;
	background: var(--nsf-primary);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.4px;
	padding: 3px 10px;
	border-radius: 4px;
}

.nsf-card-distance-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #047857;
	font-size: 0.84rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 6px;
	margin-bottom: 12px;
	align-self: flex-start;
}

.nsf-dist-pin {
	font-size: 14px;
}

/* Rating Row */
.nsf-rating-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 14px;
	font-size: 0.88rem;
}

.nsf-google-badge {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.nsf-rating-score {
	font-weight: 700;
	color: #1e293b;
}

.nsf-rating-stars {
	display: inline-flex;
	gap: 1px;
	color: var(--nsf-star);
	font-size: 13px;
	line-height: 1;
}

.nsf-rating-count {
	color: var(--nsf-muted);
	font-size: 0.85rem;
	margin-left: 2px;
}

/* Address & Landmark */
.nsf-address-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 16px;
}

.nsf-nav-icon {
	flex-shrink: 0;
	margin-top: 2px;
	line-height: 1;
}

.nsf-address-text-wrap {
	flex: 1;
}

.nsf-card-address {
	font-size: 0.88rem;
	line-height: 1.45;
	color: #334155;
	margin: 0 0 6px;
}

.nsf-card-landmark {
	font-size: 0.82rem;
	color: var(--nsf-muted);
	margin: 0 0 6px;
	font-style: normal;
}

.nsf-distance-tag {
	display: inline-block;
	background: #ecfdf5;
	color: #047857;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
}

/* 2x2 Info & Action Meta Grid */
.nsf-card-meta-grid {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid #edf2f7;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 16px;
}

.nsf-meta-col {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nsf-meta-item {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 0.88rem;
	color: #334155;
	text-decoration: none;
	line-height: 1.3;
}

a.nsf-meta-item {
	cursor: pointer;
	transition: color 0.15s ease;
}

a.nsf-meta-item:hover {
	color: var(--nsf-primary);
}

.nsf-meta-icon {
	flex-shrink: 0;
}

.nsf-phone-item .nsf-meta-label {
	font-weight: 500;
}

.nsf-dir-item .nsf-meta-label {
	color: var(--nsf-primary);
	font-weight: 600;
}

.nsf-web-item .nsf-meta-label {
	color: var(--nsf-primary);
	font-weight: 600;
}

.nsf-status-open {
	color: var(--nsf-primary);
	font-weight: 600;
}

/* Fallback Notice */
.nsf-fallback-notice {
	background: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 0.9rem;
	margin-bottom: 16px;
}

.nsf-no-results {
	color: var(--nsf-muted);
	text-align: center;
	padding: 30px;
	font-size: 1rem;
}

/* ---------- Popup Overlay ---------- */
.nsf-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 16px;
}

.nsf-popup-overlay[hidden] { display: none; }

.nsf-popup {
	background: #fff;
	border-radius: 14px;
	max-width: 440px;
	width: 100%;
	padding: 28px 24px;
	text-align: center;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

.nsf-popup-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: var(--nsf-muted);
	padding: 4px 8px;
}

.nsf-popup-icon { font-size: 2rem; margin-bottom: 4px; }
.nsf-popup-title { font-size: 1.15rem; margin: 0 0 8px; color: var(--nsf-text); }
.nsf-popup-text { color: var(--nsf-muted); margin: 0 0 12px; font-size: 0.95rem; }
.nsf-popup-privacy { font-size: 0.78rem; color: var(--nsf-muted); margin-bottom: 16px; }

.nsf-popup-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nsf-popup-manual-form-wrap { margin-top: 14px; }
.nsf-popup-status { margin-top: 14px; }
.nsf-popup-results { margin-top: 14px; text-align: left; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
