/* =========================================================
   Voltrix — Vendor store header & store directory
   Styles the theme's own dokan/store-header.php and
   dokan/store-lists-loop.php template overrides. Full-markup
   control replaces the earlier approach of patching Dokan's
   default templates with !important overrides.
   White cards on the page ground, blue for the default banner.
   ========================================================= */

/* Shared: featured / open / closed tabs, used on both the single store
   banner and the directory cards. */
.vx-badge {
	position: absolute;
	z-index: 3;
	top: 0;
	font-family: var(--font-body);
	font-size: .8125rem;
	font-weight: 700;
	padding: .5em .85em;
	border-radius: 0;
	line-height: 1;
}
.vx-badge--featured { left: 0; background: var(--navy); color: #fff; border-radius: 0 0 var(--radius) 0; }
.vx-badge--open { right: 0; background: var(--t-mint-bg); color: var(--t-mint-fg); border-radius: 0 0 0 var(--radius); }
.vx-badge--closed { right: 0; background: var(--surface-3); color: var(--text); border-radius: 0 0 0 var(--radius); }

/* A vendor without a banner image gets a flat field of the accent colour. */
.vx-store-banner--default { background-color: var(--brand); }
.vx-store-card-banner--default { background-color: var(--brand); }
.vx-store-card:nth-child(4n+2) .vx-store-card-banner--default { background-color: #a855f7; }
.vx-store-card:nth-child(4n+3) .vx-store-card-banner--default { background-color: #12805c; }
.vx-store-card:nth-child(4n) .vx-store-card-banner--default { background-color: var(--navy-2); }

/* ---------------------------------------------------------------------------
   Single vendor store page
   ------------------------------------------------------------------------- */
.vx-store-breadcrumb { padding: 20px var(--gutter) 0; color: var(--text-faint); font-size: var(--step-small); }
.vx-store-breadcrumb a { color: var(--text-dim); }

.vx-store-header { margin-bottom: 40px; }

.vx-store-banner {
	position: relative;
	height: 220px;
	border-radius: var(--radius-lg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.vx-store-identity {
	position: relative;
	z-index: 2;
	margin-top: -40px;
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 1.5em;
	padding-bottom: 1.5em;
}

.vx-store-avatar {
	flex: 0 0 auto;
	width: 108px;
	height: 108px;
	border-radius: 18px;
	border: 5px solid var(--bg);
	background: var(--surface);
	overflow: hidden;
}
.vx-store-avatar img { width: 100%; height: 100%; object-fit: cover; }

.vx-store-meta { flex: auto; min-width: 0; padding-top: 52px; }
.vx-store-name { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); margin-bottom: .25em; line-height: 1; letter-spacing: -.04em; }
.vx-store-rating { font-size: .92rem; color: var(--text-dim); margin-bottom: .5em; }
.vx-store-rating .fas, .vx-store-rating i { color: var(--accent); margin-right: .3em; }

.vx-store-info {
	display: flex;
	flex-wrap: wrap;
	gap: .4em 1.4em;
	margin: 0 0 .6em;
	padding: 0;
	list-style: none;
}
.vx-store-info li { font-size: .92rem; color: var(--text-dim); }
.vx-store-info i { color: var(--accent); margin-right: .4em; width: 1em; text-align: center; }
.vx-store-info a { color: var(--text-dim); }
.vx-store-info a:hover { color: var(--accent); }

.vx-store-social { display: flex; gap: 6px; }
.vx-store-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: var(--surface);
	color: var(--text-dim);
	box-shadow: var(--shadow-card);
	transition: background .15s ease, color .15s ease;
}
.vx-store-social a:hover { background: var(--brand); color: #fff; }

.vx-store-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: .6em;
	padding-top: 52px;
}
/* Buttons here come from Dokan's own Follow/Support/Share modules (each
   carries its own dokan-btn-theme / dokan-follow-store-button / etc class,
   already themed generically in dokan.css); this just lays the row out. */
.vx-store-actions .dokan-modules-button { display: flex; gap: .6em; list-style: none; margin: 0; padding: 0; }
.vx-store-actions li { list-style: none; }

.vx-store-tabs { margin-top: 1.5em; }
.vx-store-tabs ul {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
}
.vx-store-tabs li { flex: 0 0 auto; }
.vx-store-tabs a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0 1.2em;
	font-weight: 600;
	font-size: .95rem;
	color: var(--text-dim);
	background: var(--surface);
	border-radius: var(--radius);
	white-space: nowrap;
	transition: background .15s ease, color .15s ease;
}
.vx-store-tabs a:hover { color: var(--accent); background: var(--accent-soft); }
.vx-store-tabs li.active a { color: #fff; background: var(--brand); }

.vx-store-empty { padding: 60px 0; color: var(--text-faint); }

@media (max-width: 924px) {
	.vx-store-identity { align-items: center; text-align: center; flex-direction: column; }
	.vx-store-meta, .vx-store-actions { padding-top: 0; }
}

@media (max-width: 700px) {
	.vx-store-banner { height: 150px; }
	.vx-store-identity { align-items: center; text-align: center; flex-direction: column; }
	.vx-store-avatar { width: 84px; height: 84px; }
	.vx-store-info { justify-content: center; }
	.vx-store-social { justify-content: center; }
	.vx-store-actions { padding-bottom: 0; }
}

/* ---------------------------------------------------------------------------
   Store directory (/store-listing/)
   ------------------------------------------------------------------------- */
.vx-store-grid {
	display: grid;
	/* auto-fit (not auto-fill): with only a handful of vendors, auto-fill
	   would leave empty tracks the width of a card, pushing the real cards
	   into a corner instead of letting them stretch to fill the row. */
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--sheet-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}
/* Dokan's own CSS still puts a float-era clearfix (content:" ";display:table)
   on .dokan-seller-wrap's ::before/::after. As a grid container those
   pseudo-elements become two extra *occupied* grid items, which silently eats
   two whole track-widths and strands the real cards off-center. */
.vx-store-grid::before,
.vx-store-grid::after {
	content: none !important;
	display: none !important;
}
.vx-store-card {
	/* Dokan's own bundled CSS still targets this element with a float-based
	   3-column layout; the float survives being a grid item and collapses the
	   card to its content width, so all three properties need a reset. */
	float: none !important;
	display: block !important;
	width: auto !important;
	list-style: none;
	background: var(--surface);
	border: 0;
	border-radius: 14px;
	box-shadow: var(--shadow-card);
	overflow: hidden;
	transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.vx-store-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.vx-store-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }

.vx-store-card-banner {
	position: relative;
	height: 130px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.vx-store-card-avatar {
	position: absolute;
	z-index: 2;
	left: 16px;
	bottom: -28px;
	width: 64px;
	height: 64px;
	border-radius: 16px;
	border: 4px solid var(--surface);
	background: var(--surface-2);
	overflow: hidden;
	display: block;
}
.vx-store-card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.vx-store-card-body {
	flex: 1;
	padding: 40px 1.1em 1.1em;
	display: flex;
	flex-direction: column;
}
.vx-store-card-name {
	font-size: 1.2rem;
	margin: 0 0 .4em;
	color: var(--ink);
	letter-spacing: -.03em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.vx-store-card-body .star-rating { margin-bottom: .5em; }
.vx-store-card-line {
	display: flex;
	align-items: center;
	gap: .4em;
	font-size: .875rem;
	color: var(--text-dim);
	margin: 0 0 .3em;
}
.vx-store-card-line i { color: var(--text-faint); width: 1em; text-align: center; }

.vx-store-card-cta {
	margin-top: auto;
	padding: .9em 1.1em;
	font-size: .92rem;
	font-weight: 600;
	color: var(--ink);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.vx-store-card:hover .vx-store-card-cta { color: var(--accent); }

@media (max-width: 520px) {
	.vx-store-grid { grid-template-columns: 1fr; }
}
