/**
 * pSEO layout polish: store search dropdown, category tiles, page shells.
 */

/* —— Live store search —— */
.wpv-store-search {
	position: relative;
	width: 100%;
}

.wpv-store-search--header {
	max-width: none;
	width: 100%;
	flex: 1 1 320px;
}

.wpv-store-search__dropdown {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	z-index: 200;
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	background: #fff;
	border: 1px solid var(--wpv-border, #dee2e6);
	border-radius: 16px;
	box-shadow: 0 20px 56px rgba(13, 71, 161, 0.18);
	max-height: min(420px, calc(100vh - 120px));
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
	.site-header-custom .wpv-store-search__dropdown {
		max-height: min(280px, 50vh);
	}
}

.wpv-store-search__hit {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.75rem 0.85rem;
	text-decoration: none;
	color: var(--wpv-text, #212529);
	border-radius: 12px;
	border: 1px solid transparent;
	transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.wpv-store-search__hit:hover,
.wpv-store-search__hit:focus {
	background: linear-gradient(90deg, #f0f6ff 0%, #fafcff 100%);
	color: var(--wpv-text, #212529);
	border-color: rgba(26, 115, 232, 0.14);
	box-shadow: 0 8px 22px rgba(13, 71, 161, 0.08);
}

.wpv-store-search__hit-media {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wpv-store-search__logo {
	width: 52px;
	height: 52px;
	object-fit: contain;
	border-radius: 12px;
	flex-shrink: 0;
	background: #f8f9fa;
	border: 1px solid var(--wpv-border-soft, #e9ecef);
	padding: 5px;
	box-sizing: border-box;
}

.wpv-store-search__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	flex-shrink: 0;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: var(--wpv-primary-dark, #0d47a1);
	background: linear-gradient(145deg, #e8f0fe 0%, #f5f9ff 100%);
	border: 1px solid rgba(26, 115, 232, 0.15);
}

.wpv-store-search__hit-text {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem;
	min-width: 0;
	flex: 1;
}

.wpv-store-search__hit-copy {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	flex: 1;
}

.wpv-store-search__hit-name {
	font-weight: 800;
	font-size: 0.98rem;
	line-height: 1.2;
}

.wpv-store-search__hit-hint {
	font-size: 0.78rem;
	line-height: 1.25;
	color: var(--wpv-muted, #6c757d);
}

.wpv-store-search__hit-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.35rem;
	flex-shrink: 0;
}

.wpv-store-search__hit-off {
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
	background: linear-gradient(135deg, var(--wpv-primary, #1a73e8) 0%, var(--wpv-primary-dark, #0d47a1) 100%);
	padding: 0.28rem 0.55rem;
	border-radius: 6px;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(13, 71, 161, 0.22);
}

.wpv-store-search__hit-cta {
	font-size: 0.74rem;
	font-weight: 700;
	color: var(--wpv-primary-dark, #0d47a1);
	white-space: nowrap;
}

.wpv-store-search__hit:hover .wpv-store-search__hit-cta,
.wpv-store-search__hit:focus .wpv-store-search__hit-cta {
	text-decoration: underline;
}

.wpv-store-search__empty {
	padding: 0.85rem 1rem;
	font-size: 0.88rem;
	color: var(--wpv-muted, #6c757d);
}

.wpv-store-search--hero .wpv-store-search__dropdown {
	top: calc(100% + 10px);
	padding: 0.55rem;
}

.wpv-store-search--hero .wpv-store-search__hit {
	padding: 0.8rem 0.9rem;
}

/* —— Category tiles (home) —— */
.wpv-section--top-cats .wpv-cat-grid--tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.85rem;
}

.wpv-section--top-cats .wpv-cat--tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 108px;
	padding: 1rem 0.75rem;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--wpv-border-soft, #e9ecef);
	box-shadow: 0 4px 16px rgba(33, 37, 41, 0.05);
	text-decoration: none;
	color: var(--wpv-text, #212529);
	font-weight: 700;
	font-size: 0.88rem;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.wpv-section--top-cats .wpv-cat--tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(13, 71, 161, 0.12);
	border-color: color-mix(in srgb, var(--wpv-cat-tone, #1a73e8) 35%, transparent);
}

.wpv-section--top-cats .wpv-cat__icon {
	font-size: 1.75rem;
	line-height: 1;
}

.wpv-section--top-cats .wpv-cat__label {
	text-align: center;
	line-height: 1.25;
}

/* —— Hero refresh —— */
.wpv-hero-search-strip .wpv-store-search--hero {
	width: 100%;
	max-width: none;
}

.wpv-category-shell {
	max-width: min(1180px, 100%);
	margin: 0 auto;
}

@media (min-width: 900px) {
	.wpv-section--top-cats .wpv-cat-grid--tiles {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.wpv-section--top-cats .wpv-cat-grid--tiles {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}
