/**
 * /store-listing/ ("Store List" page, `[dokan-stores]` shortcode) --
 * enqueued only when that shortcode is actually present on the current page
 * (see inc/class-zurgle-setup.php's own conditional enqueue block), so this
 * never loads anywhere else. Restyles the theme's own dokan/store-lists-filter.php
 * and dokan/store-lists-loop.php overrides -- see those files' own docblocks
 * for why a template override was used instead of a shortcode replacement
 * (keeps Dokan's real search/sort/pagination/vendor-data logic completely
 * untouched, only markup/classes changed). Reuses the same
 * `--btn-blue`/`--btn-blue-hover`/`--radius`/`--border` custom properties
 * (:root, style.css) and the same `.pagination-pages`/`.pagination-button`
 * component the Shop page's own pagination already uses, so this page reads
 * as part of the same site rather than a bolted-on generic template.
 *
 * @package Zurgle
 */

.zurgle-store-listing {
	padding: 0 0 80px;
}

/* Filter bar (dokan/store-lists-filter.php) -- the always-visible top row
   (result count / Filter toggle / Sort by / grid-list view), plus the
   hidden-until-toggled filter form (search + Dokan Pro's own Featured/Open
   Now checkboxes, still rendered by Pro's own sub-templates via the same
   action hooks -- only restyled generically here, not overridden). */

.zurgle-store-filter-bar-wrap {
	padding-top: 32px;
}

.zurgle-store-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 20px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--border);
}

.zurgle-store-count {
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 500;
}

.zurgle-store-filter-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.zurgle-store-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border: 1px solid var(--btn-blue);
	border-radius: 999px;
	background: #fff;
	color: var(--btn-blue);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.zurgle-store-filter-btn:hover {
	background: var(--btn-blue);
	color: #fff;
}

.zurgle-store-sort {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--text-muted);
}

.zurgle-store-sort select {
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 14px;
	color: var(--text-input);
	background: #fff;
}

.zurgle-store-view-toggle {
	display: flex;
	align-items: center;
	gap: 4px;
}

.zurgle-store-view-toggle .dashicons {
	padding: 6px;
	border-radius: 6px;
	color: var(--text-muted);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.zurgle-store-view-toggle .dashicons:hover {
	background: var(--zurgle-store-accent-soft, #eef4f8);
	color: var(--btn-blue);
}

.zurgle-store-filter-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 20px;
	margin-bottom: 28px;
	background: #f9fafb;
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) * 2);
}

.zurgle-store-filter-search {
	position: relative;
	flex: 1 1 240px;
}

.zurgle-store-filter-search i {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--placeholder);
	font-size: 14px;
	pointer-events: none;
}

.zurgle-store-filter-search .store-search-input {
	width: 100%;
	padding: 10px 16px 10px 40px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 14px;
	color: var(--text-input);
}

.zurgle-store-filter-form .item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--text-dark);
}

.zurgle-store-filter-buttons {
	display: flex;
	gap: 10px;
	margin-left: auto;
}

.zurgle-store-filter-cancel-btn,
.zurgle-store-filter-apply-btn {
	padding: 9px 20px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
	border: 1px solid transparent;
	cursor: pointer;
}

.zurgle-store-filter-cancel-btn {
	background: #fff;
	border-color: var(--border);
	color: var(--text-muted);
}

.zurgle-store-filter-apply-btn {
	background: var(--btn-blue);
	color: #fff;
}

.zurgle-store-filter-apply-btn:hover {
	background: var(--btn-blue-hover);
}

/* Card grid */

.zurgle-store-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #ececec;
	border-top: 4px solid var(--zurgle-store-accent, var(--btn-blue));
	border-radius: calc(var(--radius) * 2);
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
	transition: box-shadow .25s ease, transform .25s ease;
}

.zurgle-store-card:hover {
	box-shadow: 0 16px 32px -6px var(--zurgle-store-accent, var(--btn-blue));
	transform: translateY(-4px);
}

.zurgle-store-banner {
	position: relative;
	aspect-ratio: 16 / 7;
	background: #f3f4f6;
}

.zurgle-store-banner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Shown instead of Dokan's own flat grey default-store-banner.png whenever
   a vendor hasn't uploaded a real banner ($banner_id === 0 in the loop
   template) -- a gradient in that store's own accent color plus a large
   soft icon, rather than every un-customized store looking identical. */
.zurgle-store-banner-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--zurgle-store-accent, var(--btn-blue)), var(--zurgle-store-accent-soft, var(--btn-blue-hover)));
}

.zurgle-store-banner-placeholder i {
	font-size: 42px;
	color: rgba(255, 255, 255, .85);
}

.zurgle-store-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	border-radius: 999px;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
}

.zurgle-store-badge--featured {
	background: linear-gradient(135deg, #f5a623, #d6860a);
}

.zurgle-store-badge i {
	font-size: 10px;
}

.zurgle-store-status {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
}

.zurgle-store-status.is-open {
	background: #edf7ed;
	color: #2e7d32;
}

.zurgle-store-status.is-closed {
	background: #fdecea;
	color: #b91c1c;
}

.zurgle-store-avatar {
	position: absolute;
	left: 20px;
	bottom: -40px;
	width: 88px;
	height: 88px;
	border-radius: 50%;
	border: 4px solid #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	overflow: hidden;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.zurgle-store-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Fallback for a vendor with no real avatar upload ($avatar_id === 0) --
   the store's first initial on its own accent color, instead of Dokan's
   own generic "mystery-person.jpg" silhouette every un-customized store
   otherwise shows identically. */
.zurgle-store-avatar-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--zurgle-store-accent, var(--btn-blue));
	color: #fff;
	font-size: 34px;
	font-weight: 700;
}

.zurgle-store-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 56px 20px 20px;
}

.zurgle-store-name {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.zurgle-store-name a {
	color: var(--text-dark);
}

.zurgle-store-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	color: #e9a207;
	font-size: 13px;
}

.zurgle-store-rating span {
	color: var(--text-muted);
	font-size: 13px;
}

.zurgle-store-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 4px;
	color: var(--text-muted);
	font-size: 13px;
	line-height: 1.5;
}

.zurgle-store-meta i {
	width: 14px;
	color: var(--btn-blue);
	font-size: 12px;
}

.zurgle-store-visit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	padding: 10px 20px;
	border-radius: 999px;
	background: var(--btn-blue);
	color: #fff !important;
	font-weight: 600;
	font-size: 14px;
	box-shadow: 0 4px 10px rgba(70, 155, 194, .3);
	transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.zurgle-store-visit-btn i {
	font-size: 12px;
	transition: transform .2s ease;
}

.zurgle-store-visit-btn:hover {
	background: var(--btn-blue-hover);
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(70, 155, 194, .4);
}

.zurgle-store-visit-btn:hover i {
	transform: translateX(3px);
}

.zurgle-store-empty {
	padding: 60px 20px;
	text-align: center;
	color: var(--text-muted);
	font-size: 16px;
}

.zurgle-store-pagination {
	margin-top: 40px;
}

@media (max-width: 575px) {
	.zurgle-store-search-form {
		max-width: 100%;
	}
}

.dokan-alert {
    margin-left: 289px !important;
    width: 69% !important;
}
