/* ============================================================
   Dokan Store Redesign — tokens de diseño (independiente)
   ============================================================ */
:root {
	--wdsr-bg: #ffffff;
	--wdsr-bg-soft: #f6f7f8;
	--wdsr-ink: #14181f;
	--wdsr-muted: #6b7280;
	--wdsr-border: #e4e6ea;
	--wdsr-accent: #2c5f6f;
	--wdsr-display-font: "Fraunces", "Iowan Old Style", serif;
	--wdsr-body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   Override agresivo del morado por defecto de Dokan.
   Si después de instalar el plugin el morado sigue apareciendo en
   botones/elementos puntuales, es casi seguro que ese elemento usa una
   clase distinta a las que cubrimos abajo. En ese caso, dinos el color
   exacto (código hex) que ves y en qué botón/zona aparece, para agregar
   una regla específica.
   ============================================================ */
.dokan-btn-theme,
.dokan-btn.dokan-btn-theme,
a.dokan-btn-theme,
button.dokan-btn-theme,
.dokan-btn-primary,
input.dokan-btn-theme {
	background-color: var(--wdsr-accent) !important;
	border-color: var(--wdsr-accent) !important;
	color: #fff !important;
}

.dokan-btn-theme:hover,
.dokan-btn.dokan-btn-theme:hover,
a.dokan-btn-theme:hover,
button.dokan-btn-theme:hover {
	background-color: #234a56 !important;
	border-color: #234a56 !important;
}


/* ============================================================
   Directorio de tiendas — CONTENEDOR REAL CONFIRMADO:
   #dokan-seller-listing-wrap (con clase .grid-view o .list-view).
   Las reglas de .dokan-seller-wrap más abajo se dejan como respaldo
   por si alguna instalación usa la plantilla antigua.
   ============================================================ */
#dokan-seller-listing-wrap {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 32px 24px;
	list-style: none;
	padding: 0;
	margin: 32px 0;
}

#dokan-seller-listing-wrap.list-view {
	grid-template-columns: 1fr;
}

#dokan-seller-listing-wrap > * {
	border: none !important;
	box-shadow: none !important;
	background-color: transparent !important;
	background-image: none !important;
	padding: 0 !important;
	font-family: var(--wdsr-body-font);
	text-align: left;
}

#dokan-seller-listing-wrap img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	object-fit: cover;
	background: var(--wdsr-bg-soft);
	filter: grayscale(35%);
	transition: filter 0.35s ease, transform 0.35s ease;
}

#dokan-seller-listing-wrap > *:hover img {
	filter: grayscale(0%);
	transform: scale(1.015);
}

#dokan-seller-listing-wrap h1,
#dokan-seller-listing-wrap h2,
#dokan-seller-listing-wrap h3,
#dokan-seller-listing-wrap h4,
#dokan-seller-listing-wrap h5 {
	font-family: var(--wdsr-display-font) !important;
	font-weight: 480 !important;
	font-size: 17px !important;
	color: var(--wdsr-ink) !important;
	margin: 12px 0 4px !important;
}

/* Captura cualquier botón/enlace de acción (como el círculo con flecha
   "Visitar tienda") sin importar el nombre exacto de su clase, incluyendo
   los que traigan el color morado como estilo inline. */
#dokan-seller-listing-wrap a,
#dokan-seller-listing-wrap button {
	color: var(--wdsr-accent) !important;
}

#dokan-seller-listing-wrap a[class*="btn"],
#dokan-seller-listing-wrap button[class*="btn"],
#dokan-seller-listing-wrap a[class*="visit"],
#dokan-seller-listing-wrap button[class*="visit"],
#dokan-seller-listing-wrap [style*="background"] {
	background-color: var(--wdsr-accent) !important;
	border-color: var(--wdsr-accent) !important;
	color: #fff !important;
}

#dokan-seller-listing-wrap a[class*="btn"]:hover,
#dokan-seller-listing-wrap button[class*="btn"]:hover {
	background-color: #234a56 !important;
}

/* ============================================================
   Barra de filtro/orden/vista (#dokan-store-listing-filter-wrap)
   ============================================================ */
#dokan-store-listing-filter-wrap {
	font-family: var(--wdsr-body-font) !important;
	border-bottom: 1px solid var(--wdsr-border);
	padding-bottom: 20px !important;
	margin-bottom: 8px;
}

#dokan-store-listing-filter-wrap .dokan-store-list-filter-button,
#dokan-store-listing-filter-wrap button.dokan-btn-theme,
#dokan-store-listing-filter-wrap a.dokan-btn-theme {
	background-color: var(--wdsr-accent) !important;
	border-color: var(--wdsr-accent) !important;
	color: #fff !important;
	border-radius: 3px !important;
}

#dokan-store-listing-filter-wrap .dokan-store-list-filter-button:hover {
	background-color: #234a56 !important;
}

#dokan-store-listing-filter-wrap select {
	font-family: var(--wdsr-body-font) !important;
	border-color: var(--wdsr-border) !important;
	color: var(--wdsr-ink) !important;
}

/* ============================================================
   Directorio de tiendas (respaldo: plantilla antigua .dokan-seller-wrap)
   ============================================================ */
.dokan-seller-wrap {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 32px 24px;
	list-style: none;
	padding: 0;
	margin: 32px 0;
}

.dokan-seller-wrap li {
	float: none;
	width: auto;
	border: none;
	box-shadow: none;
	background: none !important;
	padding: 0;
	text-align: left;
	font-family: var(--wdsr-body-font);
}

.dokan-seller-wrap li img.dokan-store-img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 4px;
	background: var(--wdsr-bg-soft) !important;
	filter: grayscale(35%);
	transition: filter 0.35s ease, transform 0.35s ease;
}

.dokan-seller-wrap li:hover img.dokan-store-img {
	filter: grayscale(0%);
	transform: scale(1.015);
}

.dokan-seller-wrap li h4,
.dokan-seller-wrap li h3,
.dokan-seller-wrap li .store-name {
	font-family: var(--wdsr-display-font);
	font-weight: 480;
	font-size: 17px;
	color: var(--wdsr-ink) !important;
	margin: 12px 0 4px;
}

.dokan-seller-wrap li a.dokan-btn-theme {
	display: inline-block;
	margin-top: 10px;
	background: var(--wdsr-accent) !important;
	border-color: var(--wdsr-accent) !important;
	border-radius: 3px;
	font-family: var(--wdsr-body-font);
	font-weight: 500;
	font-size: 13px;
	padding: 8px 16px;
	color: #fff !important;
	text-decoration: none;
	transition: background 0.2s ease;
}

.dokan-seller-wrap li a.dokan-btn-theme:hover {
	background: #234a56 !important;
}

@media (prefers-reduced-motion: reduce) {
	.dokan-seller-wrap li img.dokan-store-img {
		transition: none;
	}
}

/* ============================================================
   Página individual de tienda (store-header.php)
   ============================================================ */
.profile-frame {
	position: relative;
	background-color: #eef1f2 !important;
	background-size: cover;
	background-position: center;
	border-radius: 6px;
	min-height: 200px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.profile-frame::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(20, 24, 31, 0.6), rgba(20, 24, 31, 0) 65%) !important;
}

.profile-info-box {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 24px 28px;
	width: 100%;
	box-sizing: border-box;
}

.profile-img img {
	border-radius: 50%;
	border: 3px solid #fff;
}

.profile-info ul.dokan-store-info {
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var(--wdsr-body-font);
}

.profile-info li.store-name {
	font-family: var(--wdsr-display-font);
	font-weight: 480;
	font-size: 26px;
	color: #fff !important;
	line-height: 1.2;
}

.profile-info li.dokan-store-address,
.profile-info li.dokan-store-phone,
.profile-info li.dokan-store-email {
	display: inline-block;
	color: rgba(255, 255, 255, 0.85) !important;
	font-size: 13px;
	margin-top: 4px;
	margin-right: 14px;
}

.store-social {
	display: flex;
	gap: 10px;
	list-style: none;
	padding: 0;
	margin-top: 10px;
}

.store-social a {
	color: #fff !important;
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.store-social a:hover {
	opacity: 1;
}

.dokan-store-tabs {
	border-bottom: 1px solid var(--wdsr-border);
	margin: 28px 0 32px;
}

.dokan-store-tabs ul.dokan-list-inline {
	display: flex;
	gap: 28px;
	list-style: none;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}

.dokan-store-tabs ul.dokan-list-inline li a {
	font-family: var(--wdsr-body-font);
	font-size: 14px;
	color: var(--wdsr-muted) !important;
	padding: 10px 0;
	display: inline-block;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.dokan-store-tabs ul.dokan-list-inline li a:hover,
.dokan-store-tabs ul.dokan-list-inline li.active a {
	color: var(--wdsr-ink) !important;
	border-bottom-color: var(--wdsr-accent) !important;
}

.dokan-store-sidebar .widget-title,
.dokan-store-sidebar h3 {
	font-family: var(--wdsr-display-font);
	font-weight: 480;
	font-size: 16px;
	color: var(--wdsr-ink) !important;
	margin-bottom: 12px;
}

.dokan-store-sidebar {
	font-family: var(--wdsr-body-font);
	font-size: 14px;
	color: var(--wdsr-muted) !important;
}

/* ============================================================
   Tarjetas de producto por defecto de WooCommerce — para que se
   vean consistentes dentro de la tienda del proveedor y en
   Tienda/Categoría (Dokan reutiliza el loop nativo de WooCommerce).
   ============================================================ */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wdsr-body-font);
	font-size: 14.5px;
	color: var(--wdsr-ink) !important;
	line-height: 1.35;
}

.woocommerce ul.products li.product .price {
	font-family: var(--wdsr-body-font);
	font-weight: 600;
	color: var(--wdsr-ink) !important;
	font-variant-numeric: tabular-nums;
}

.woocommerce ul.products li.product img {
	border-radius: 4px;
	transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover img {
	transform: scale(1.02);
}

@media (max-width: 640px) {
	.profile-info-box {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.dokan-store-tabs ul.dokan-list-inline {
		gap: 16px;
	}
}
