/**
 * Store Scout – Frontend (product page popup)
 * Minimal styling, inherits theme.
 *
 * @package BloomStack\StoreScout
 * @since 1.0.0
 */

/* Button next to add to cart */
.store-scout-product-actions {
	margin-top: 0.75em;
}

.store-scout-see-in-store-btn {
	font-size: inherit;
	cursor: pointer;
}

/* Popup overlay */
.store-scout-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.store-scout-popup[hidden] {
	display: none !important;
}

.store-scout-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	cursor: pointer;
}

.store-scout-popup__panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.store-scout-popup__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.store-scout-popup__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.store-scout-popup__close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	padding: 0.25rem;
	cursor: pointer;
	opacity: 0.7;
}

.store-scout-popup__close:hover {
	opacity: 1;
}

.store-scout-popup__postcode {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.store-scout-popup__postcode-input {
	flex: 1;
	min-width: 120px;
	padding: 0.5rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: inherit;
}

.store-scout-popup__postcode-btn {
	padding: 0.5rem 1rem;
	background: #4f46e5;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: inherit;
	cursor: pointer;
}

.store-scout-popup__postcode-btn:hover {
	background: #4338ca;
}

.store-scout-popup__postcode-status {
	font-size: 0.875rem;
	color: #6b7280;
	width: 100%;
}

.store-scout-popup__list {
	overflow-y: auto;
	padding: 1rem 1.25rem;
}

/* Showroom cards */
.store-scout-popup-card {
	padding: 1rem 0;
	border-bottom: 1px solid #e5e7eb;
}

.store-scout-popup-card:last-child {
	border-bottom: none;
}

.store-scout-popup-card__name {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
}

.store-scout-popup-card__address,
.store-scout-popup-card__hours,
.store-scout-popup-card__contact {
	margin: 0.25rem 0;
	font-size: 0.875rem;
	color: #4b5563;
}

.store-scout-popup-card__link {
	font-size: 0.875rem;
}

/* Body scroll lock when open */
body.store-scout-popup-open {
	overflow: hidden;
}

/* ==========================================================================
   Archive & shortcode
   ========================================================================== */

.store-scout-archive {
	max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.store-scout-archive__title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
}

/* Primary showroom — full width at top of archive */
.store-scout-archive__primary {
	width: 100%;
	margin-bottom: 1.5rem;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e5e7eb;
}

.store-scout-archive__primary-link {
	display: flex;
	flex-wrap: wrap;
	text-decoration: none;
	color: inherit;
}

.store-scout-archive__primary-link:hover {
	color: inherit;
}

.store-scout-archive__primary-image {
	flex: 1 1 300px;
	min-height: 180px;
	background: #f3f4f6;
}

.store-scout-archive__primary-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	min-height: 180px;
}

.store-scout-archive__primary-body {
	flex: 1 1 280px;
	padding: 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.store-scout-archive__primary-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6d28d9;
	margin-bottom: 0.5rem;
}

.store-scout-archive__primary-name {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
}

.store-scout-archive__primary-address,
.store-scout-archive__primary-hours {
	margin: 0.25rem 0;
	font-size: 0.875rem;
	color: #4b5563;
}

.store-scout-archive__primary-more {
	font-size: 0.875rem;
	margin-top: 0.5rem;
	color: #4f46e5;
	font-weight: 500;
}

.store-scout-archive__primary-link:hover .store-scout-archive__primary-more {
	text-decoration: underline;
}

.store-scout-archive__postcode {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 1.5rem;
}

.store-scout-archive__postcode-input {
	flex: 1;
	min-width: 140px;
	padding: 0.5rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: inherit;
}

.store-scout-archive__postcode-btn {
	padding: 0.5rem 1rem;
	background: #4f46e5;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: inherit;
	cursor: pointer;
}

.store-scout-archive__postcode-btn:hover {
	background: #4338ca;
}

.store-scout-archive__postcode-status {
	font-size: 0.875rem;
	color: #6b7280;
	width: 100%;
}

.store-scout-archive__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.store-scout-archive-card {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.store-scout-archive-card__image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f3f4f6;
}

.store-scout-archive-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.store-scout-archive-card__body {
	padding: 1rem;
}

.store-scout-archive-card__name {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.store-scout-archive-card__name a {
	text-decoration: none;
}

.store-scout-archive-card__name a:hover {
	text-decoration: underline;
}

.store-scout-archive-card__address,
.store-scout-archive-card__hours {
	margin: 0.25rem 0;
	font-size: 0.875rem;
	color: #4b5563;
}

.store-scout-archive-card__more {
	margin: 0.75rem 0 0;
}

.store-scout-archive-card__link {
	font-size: 0.875rem;
}

/* Shortcode wrapper - columns overridden via inline style or class */
.store-scout-shortcode .store-scout-archive__grid {
	display: grid;
}

/* ==========================================================================
   Single showroom
   ========================================================================== */

.store-scout-single {
	margin: 0 auto;
}

.store-scout-single__hero,
.store-scout-single__body {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.store-scout-single__hero {
	padding-top: 20px;
}

.store-scout-single__body {
	padding-bottom: 20px;
}

/* ── Hero: image + key info side by side ──────────────────────────────── */

.store-scout-single__hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: start;
	margin-bottom: 2rem;
}

.store-scout-single__hero-image {
	border-radius: 8px;
	overflow: hidden;
	background: #f3f4f6;
}

.store-scout-single__hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	min-height: 280px;
	max-height: 480px;
}

.store-scout-single__hero-info {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding: 0.5rem 0;
}

.store-scout-single__title {
	margin: 0;
	font-size: 1.75rem;
	line-height: 1.2;
}

.store-scout-single__info-block {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.store-scout-single__address {
	margin: 0;
	line-height: 1.5;
}

.store-scout-single__directions-link {
	font-size: 0.875rem;
	font-weight: 500;
	color: #4f46e5;
	text-decoration: none;
	margin-top: 0.25rem;
	display: inline-block;
}

.store-scout-single__directions-link:hover {
	text-decoration: underline;
}

.store-scout-single__contact {
	list-style: none;
	margin: 0;
	padding: 0;
}

.store-scout-single__contact li {
	margin: 0.25rem 0;
	font-size: 0.9375rem;
}

.store-scout-single__hours {
	border-collapse: collapse;
	width: 100%;
	max-width: 320px;
	font-size: 0.875rem;
}

.store-scout-single__hours th,
.store-scout-single__hours td {
	padding: 0.2rem 0.5rem 0.2rem 0;
	text-align: left;
}

.store-scout-single__hours th {
	font-weight: 500;
	color: #374151;
}

.store-scout-single__hours td {
	color: #6b7280;
}

/* ── Sticky section navigation bar ────────────────────────────────────── */

.store-scout-single__section-nav {
	border-top: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 2rem;
	background: #fff;
	z-index: 100;
}

.store-scout-single__section-nav-inner {
	display: flex;
	gap: 0.25rem;
	padding: 0.75rem 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.store-scout-single__section-nav--stuck {
	position: fixed;
	left: 0;
	right: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.store-scout-single__section-nav-placeholder {
	display: none;
}

.store-scout-single__section-nav-link {
	padding: 0.375rem 1rem;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #6b7280;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

.store-scout-single__section-nav-link:hover {
	background: #f3f4f6;
	color: #1f2937;
}

.store-scout-single__section-nav-link--active {
	background: #f5f3ff;
	color: #7c3aed;
}

/* ── Body sections ────────────────────────────────────────────────────── */

.store-scout-single__section {
	margin-bottom: 2.5rem;
}

.store-scout-single__section-title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 600;
}

.store-scout-single__content {
	line-height: 1.7;
}

.store-scout-single__map-embed {
	max-width: 100%;
	overflow: hidden;
	border-radius: 8px;
}

.store-scout-single__map-embed iframe {
	width: 100%;
	height: 400px;
	border: 0;
	display: block;
}

/* ── FAQ accordion ─────────────────────────────────────────────────────── */

.store-scout-single__faq-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.store-scout-single__faq-item {
	border-bottom: 1px solid #e5e7eb;
}

.store-scout-single__faq-item:first-child {
	border-top: 1px solid #e5e7eb;
}

.store-scout-single__faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 0;
	font-weight: 500;
	font-size: 1rem;
	cursor: pointer;
	list-style: none;
	color: #1f2937;
}

.store-scout-single__faq-question::-webkit-details-marker {
	display: none;
}

.store-scout-single__faq-question::after {
	content: '+';
	font-size: 1.25rem;
	font-weight: 300;
	color: #9ca3af;
	flex-shrink: 0;
	margin-left: 1rem;
	transition: transform 0.2s;
}

.store-scout-single__faq-item[open] > .store-scout-single__faq-question::after {
	content: '−';
}

.store-scout-single__faq-answer {
	padding: 0 0 1rem;
	color: #4b5563;
	line-height: 1.6;
}

.store-scout-single__faq-answer p:first-child {
	margin-top: 0;
}

.store-scout-single__faq-answer p:last-child {
	margin-bottom: 0;
}

/* ── Products ─────────────────────────────────────────────────────────── */

.store-scout-single__products .products {
	margin-top: 0.5rem;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.store-scout-single__hero {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.store-scout-single__hero-image img {
		min-height: 200px;
		max-height: 300px;
	}

	.store-scout-single__title {
		font-size: 1.5rem;
	}

	.store-scout-single__section-nav-inner {
		gap: 0.125rem;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		flex-wrap: nowrap;
	}

	.store-scout-single__section-nav-link {
		padding: 0.375rem 0.75rem;
		font-size: 0.8125rem;
		white-space: nowrap;
	}

	.store-scout-single__map-embed iframe {
		height: 280px;
	}
}
