/**
 * Pedidos Suite — CSS público, mobile-first.
 * Solo variables de la paleta dinámica: cero colores hardcodeados
 * (excepto blanco puro sobre colores de marca).
 */

/* Lección v1 #1: base fija en el contenedor raíz (Bricks usa html{font-size:62.5%}),
   tamaños internos SIEMPRE en em. */
.ps {
	font-size: 1.8rem;
	line-height: 1.45;
	color: var(--ps-text);
	font-family: inherit;
	box-sizing: border-box;
}
@supports (font-size: max(16px, 1rem)) {
	.ps { font-size: max(16px, 1.8rem); }
}
.ps *, .ps *::before, .ps *::after { box-sizing: border-box; }

/* Lección v1 #2: [hidden] SIEMPRE gana. */
.ps [hidden], .ps[hidden] { display: none !important; }

.ps-no-scroll { overflow: hidden; }

/* ---------- Tipos base ---------- */

.ps-titulo { font-size: 1.3em; font-weight: 700; margin: 0 0 0.7em; color: var(--ps-text); }
.ps h4.ps-modal-titulo { font-size: 1.15em; margin: 0 0 0.6em; }
.ps .ps-vacio, .ps .ps-cargando { color: var(--ps-bg-d-5); padding: 1em 0; text-align: center; }
.ps .ps-aviso {
	background: var(--ps-tertiary-t-1);
	border: 1px solid var(--ps-tertiary-t-3);
	color: var(--ps-tertiary-d-2);
	padding: 0.9em 1em;
	border-radius: 0.6em;
}

/* ---------- Botones ---------- */

.ps-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 2.6em;
	padding: 0.55em 1.2em;
	border-radius: 0.6em;
	border: 2px solid transparent;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: filter 0.15s, background 0.15s;
	line-height: 1;
}
.ps-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ps-btn-primary { background: var(--ps-primary); color: #fff; }
.ps-btn-primary:hover:not(:disabled) { background: var(--ps-primary-d-2); }
.ps-btn-ghost { background: transparent; color: var(--ps-primary); border-color: var(--ps-primary); }
.ps-btn-ghost:hover:not(:disabled) { background: var(--ps-primary-t-1); }
.ps-btn-danger { background: var(--ps-tertiary); color: #fff; }
.ps-btn-danger:hover:not(:disabled) { background: var(--ps-tertiary-d-2); }
.ps-btn-mini { min-height: 2.2em; padding: 0.3em 0.8em; font-size: 0.85em; background: var(--ps-secondary); color: #fff; }
.ps-btn-mini.ps-btn-ghost { background: transparent; color: var(--ps-secondary); border-color: var(--ps-secondary); }

/* Lección v1 #5: glifos × y steppers centrados con flexbox, área táctil >= 40px. */
.ps-x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	width: 2.2em;
	height: 2.2em;
	min-width: 40px;
	min-height: 40px;
	border: none;
	border-radius: 50%;
	background: var(--ps-tertiary-t-1);
	color: var(--ps-tertiary);
	font-size: 1.1em;
	cursor: pointer;
}
.ps-x:hover { background: var(--ps-tertiary-t-2); }

.ps-stepper {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
}
.ps-stepper button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid var(--ps-primary);
	background: var(--ps-bg);
	color: var(--ps-primary);
	font-size: 1.2em;
	cursor: pointer;
}
.ps-stepper button:hover { background: var(--ps-primary-t-1); }
.ps-step-n { min-width: 1.6em; text-align: center; font-weight: 700; }
.ps-step-input {
	width: 3.2em;
	text-align: center;
	font-weight: 700;
	border: 1px solid var(--ps-border);
	border-radius: 0.4em;
	min-height: 40px;
	background: var(--ps-surface);
	color: var(--ps-text);
	font-size: 1em;
}

/* ---------- Formularios ---------- */

.ps-campo { margin-bottom: 0.9em; }
.ps-campo > label { display: block; font-weight: 600; margin-bottom: 0.3em; font-size: 0.9em; }
.ps-input {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid var(--ps-border);
	border-radius: 0.5em;
	background: var(--ps-surface);
	color: var(--ps-text);
	font-size: 1em;
	min-height: 2.6em;
}
.ps-input:focus { outline: 2px solid var(--ps-primary-t-4); border-color: var(--ps-primary); }
.ps-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8em; }
@media (max-width: 480px) { .ps-form-grid { grid-template-columns: 1fr; } }

/* ---------- Chips ---------- */

.ps-chips { display: flex; flex-wrap: wrap; gap: 0.4em; margin-bottom: 1em; }
.ps-chip {
	display: inline-flex;
	align-items: center;
	min-height: 2.4em;
	padding: 0.35em 1em;
	border-radius: 99px;
	border: 2px solid var(--ps-primary);
	background: var(--ps-bg);
	color: var(--ps-primary);
	font-weight: 600;
	font-size: 0.9em;
	cursor: pointer;
}
.ps-chip.is-active { background: var(--ps-primary); color: #fff; }

/* ---------- Tienda: menú ---------- */

.ps-pill {
	display: inline-block;
	background: var(--ps-tertiary);
	color: #fff;
	font-size: 1em;
	font-weight: 700;
	padding: 0.35em 1.1em;
	border-radius: 99px;
	margin: 1em 0 0.4em;
}
.ps-prod {
	display: flex;
	align-items: center;
	gap: 0.6em;
	width: 100%;
	min-height: 60px;
	padding: 0.6em 0.2em;
	background: none;
	border: none;
	border-bottom: 1px solid var(--ps-bg-d-1);
	cursor: pointer;
	text-align: left;
	font-size: 1em;
	color: var(--ps-text);
}
.ps-prod:hover { background: var(--ps-primary-t-1); }
.ps-prod-main { display: flex; flex-direction: column; min-width: 0; flex-shrink: 1; }
.ps-prod-nombre { font-weight: 600; }
.ps-prod-desc { font-size: 0.78em; color: var(--ps-bg-d-5); }
.ps-dots { flex: 1; border-bottom: 2px dotted var(--ps-bg-d-3); margin: 0 0.2em; min-width: 1em; }
.ps-prod-precio { font-weight: 700; white-space: nowrap; }
.ps-prod-precio del { color: var(--ps-bg-d-4); font-weight: 400; }
.ps-oferta, ins.ps-oferta { color: var(--ps-tertiary); text-decoration: none; }
.ps-plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	width: 1.8em;
	height: 1.8em;
	border-radius: 50%;
	background: var(--ps-primary);
	color: #fff;
	font-weight: 700;
	flex-shrink: 0;
}

/* ---------- Modal / drawer ---------- */

.ps-overlay {
	position: fixed;
	inset: 0;
	background: var(--ps-bg-d-9);
	background: rgba(0, 0, 0, 0.55);
	z-index: 99990;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.ps-modal {
	position: relative;
	background: var(--ps-surface);
	color: var(--ps-text);
	width: 100%;
	max-width: 560px;
	max-height: 92vh;
	overflow-y: auto;
	border-radius: 1em 1em 0 0;
	padding: 1.2em;
	animation: ps-up 0.22s ease;
}
@media (min-width: 641px) {
	.ps-overlay { align-items: center; }
	.ps-modal { border-radius: 1em; }
}
@keyframes ps-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ps-modal-close {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: var(--ps-bg-d-1);
	color: var(--ps-text);
	font-size: 1.2em;
	cursor: pointer;
	z-index: 2;
}
.ps-modal-botones { display: flex; gap: 0.6em; justify-content: flex-end; margin-top: 1em; flex-wrap: wrap; }
.ps-confirm-msg { font-size: 1em; }

/* Drawer del carrito: entra desde la izquierda. */
.ps-drawer { justify-content: flex-start; align-items: stretch; }
.ps-drawer .ps-modal {
	max-width: 400px;
	height: 100%;
	max-height: 100vh;
	border-radius: 0 1em 1em 0;
	animation: ps-left 0.22s ease;
}
@keyframes ps-left { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Producto en modal ---------- */

.ps-prod-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 0.7em; margin-bottom: 0.6em; }
.ps-prod-modal-desc { color: var(--ps-bg-d-5); font-size: 0.9em; }
.ps-prod-modal-precio { font-size: 1.2em; font-weight: 700; }
.ps-prod-modal-precio del { color: var(--ps-bg-d-4); font-weight: 400; }

.ps-var-grupo { border: 1px solid var(--ps-border); border-radius: 0.6em; padding: 0.6em 0.9em; margin: 0.7em 0; }
.ps-var-grupo legend { font-weight: 700; font-size: 0.9em; padding: 0 0.4em; }
.ps-var-op {
	display: flex;
	align-items: center;
	gap: 0.6em;
	min-height: 40px;
	cursor: pointer;
	font-size: 0.95em;
}
.ps-var-op input { width: 1.2em; height: 1.2em; accent-color: var(--ps-primary); }
.ps-var-op em { margin-left: auto; font-style: normal; color: var(--ps-primary-d-2); font-weight: 600; font-size: 0.85em; }
.ps-modal-add { display: flex; align-items: center; justify-content: space-between; gap: 0.8em; margin-top: 1em; flex-wrap: wrap; }

/* ---------- Carrito ---------- */

/* Flotante abajo a la IZQUIERDA. */
.ps-cart-fab {
	position: fixed;
	left: 1em;
	bottom: 1em;
	z-index: 99980;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: none;
	background: var(--ps-primary);
	color: #fff;
	font-size: 1.5em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px var(--ps-primary-t-5);
}
.ps-cart-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: var(--ps-tertiary);
	color: #fff;
	font-size: 0.55em;
	font-weight: 700;
	min-width: 1.7em;
	height: 1.7em;
	border-radius: 99px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.3em;
}
.ps-cart-item {
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.7em 0;
	border-bottom: 1px solid var(--ps-bg-d-1);
}
.ps-cart-item-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ps-cart-item-info small { color: var(--ps-bg-d-5); }
.ps-cart-item-precio { font-weight: 700; color: var(--ps-primary-d-2); }
.ps-cart-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.15em;
	font-weight: 700;
	padding: 0.8em 0;
	border-top: 2px solid var(--ps-primary);
	margin-top: 0.6em;
}

/* ---------- Checkout ---------- */

.ps-zonas { display: grid; gap: 0.7em; }
.ps-zona-card {
	padding: 1.1em;
	border: 2px solid var(--ps-primary);
	border-radius: 0.8em;
	background: var(--ps-primary-t-1);
	color: var(--ps-primary-d-3);
	font-size: 1.05em;
	font-weight: 700;
	cursor: pointer;
	min-height: 60px;
}
.ps-zona-card:hover { background: var(--ps-primary-t-2); }

/* ---------- Badges de estado ---------- */

.ps-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2em 0.8em;
	border-radius: 99px;
	font-size: 0.75em;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
}
.ps-badge-pedido { background: var(--ps-tertiary); }
.ps-badge-enviado { background: var(--ps-secondary); }
.ps-badge-entregado { background: var(--ps-primary-l-2); color: var(--ps-primary-d-6); }
.ps-badge-pagado { background: var(--ps-primary); }
.ps-badge-low {
	display: inline-flex;
	padding: 0.15em 0.6em;
	border-radius: 99px;
	background: var(--ps-tertiary);
	color: #fff;
	font-size: 0.7em;
	font-weight: 700;
}

/* ---------- Filtros / paginación ---------- */

.ps-filtros { display: flex; flex-wrap: wrap; gap: 0.5em; margin-bottom: 0.8em; align-items: center; }
.ps-filtros .ps-input { width: auto; flex: 1 1 8em; min-width: 7em; }
.ps-acciones { display: flex; gap: 0.5em; margin-bottom: 0.8em; }
.ps-paginacion { display: flex; flex-wrap: wrap; gap: 0.35em; margin-top: 1em; }
.ps-pag {
	min-width: 40px;
	min-height: 40px;
	border-radius: 0.5em;
	border: 1px solid var(--ps-border);
	background: var(--ps-surface);
	color: var(--ps-text);
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ps-pag.is-active { background: var(--ps-primary); color: #fff; border-color: var(--ps-primary); }

/* ---------- Tabla escritorio / lista móvil (lección v1 #6) ---------- */

.ps-tabla { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.ps-tabla th {
	background: var(--ps-primary);
	color: #fff;
	text-align: left;
	padding: 0.6em 0.7em;
	font-size: 0.85em;
}
.ps-tabla td { padding: 0.6em 0.7em; border-bottom: 1px solid var(--ps-bg-d-1); vertical-align: top; }
.ps-tabla tr:hover td { background: var(--ps-primary-t-1); }
.ps-sub-desc { display: block; color: var(--ps-bg-d-5); font-size: 0.85em; }
.ps-item-linea { font-size: 0.95em; }

.ps-lista-movil { display: none; }
.ps-ped-card {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.15em 0.6em;
	width: 100%;
	text-align: left;
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 0.7em;
	padding: 0.8em 1em;
	margin-bottom: 0.6em;
	cursor: pointer;
	font-size: 1em;
	color: var(--ps-text);
	min-height: 60px;
	align-items: center;
}
.ps-ped-cliente { font-weight: 700; }
.ps-ped-meta { grid-row: 2; color: var(--ps-bg-d-5); font-size: 0.8em; }
.ps-ped-total { font-weight: 700; color: var(--ps-primary-d-2); justify-self: end; }
.ps-ped-card .ps-badge { grid-row: 2; justify-self: end; }

@media (max-width: 782px) {
	.ps-tabla { display: none; }
	.ps-lista-movil { display: block; }
}

/* ---------- Tarjetas apiladas con data-label (clientes/gastos/inventario) ---------- */

.ps-cards { display: flex; flex-direction: column; gap: 0.5em; }
.ps-card-row {
	display: grid;
	grid-template-columns: auto repeat(5, 1fr) auto auto auto;
	gap: 0.5em;
	align-items: center;
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 0.7em;
	padding: 0.7em 1em;
	font-size: 0.9em;
}
.ps-card-row small { display: block; color: var(--ps-bg-d-5); }
@media (max-width: 782px) {
	.ps-card-row { grid-template-columns: 1fr 1fr; }
	.ps-card-row > [data-label]::before {
		content: attr(data-label);
		display: block;
		font-size: 0.72em;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: var(--ps-bg-d-4);
	}
}
.ps-inv-row { grid-template-columns: 2fr 1fr 1fr auto auto; }
@media (max-width: 782px) {
	.ps-inv-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Avatares ---------- */

.ps-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ps-secondary-t-2);
	color: var(--ps-secondary-d-3);
	font-weight: 700;
	flex-shrink: 0;
}
.ps-sin-url { color: var(--ps-bg-d-4); font-size: 0.85em; }

/* ---------- Buscador de clientes (agentes) ---------- */

.ps-buscador { position: relative; }
.ps-resultados {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 0.5em;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
	z-index: 50;
	max-height: 16em;
	overflow-y: auto;
}
.ps-resultado {
	display: flex;
	flex-direction: column;
	width: 100%;
	text-align: left;
	padding: 0.6em 0.9em;
	background: none;
	border: none;
	border-bottom: 1px solid var(--ps-bg-d-1);
	cursor: pointer;
	min-height: 44px;
	font-size: 1em;
	color: var(--ps-text);
}
.ps-resultado:hover { background: var(--ps-primary-t-1); }
.ps-resultado small { color: var(--ps-bg-d-5); }
.ps-cliente-card {
	position: relative;
	background: var(--ps-primary-t-1);
	border: 1px solid var(--ps-primary-t-3);
	border-radius: 0.6em;
	padding: 0.8em 3em 0.8em 1em;
	margin: 0.6em 0;
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	font-size: 0.95em;
}
.ps-cliente-card .ps-x { position: absolute; top: 0.5em; right: 0.5em; }

/* ---------- Repeater de productos (agentes) ---------- */

.ps-repeater .ps-rep-row {
	border: 1px solid var(--ps-border);
	border-radius: 0.6em;
	padding: 0.7em;
	margin-bottom: 0.6em;
	background: var(--ps-surface);
}
.ps-rep-main { display: flex; gap: 0.5em; align-items: center; flex-wrap: wrap; }
.ps-rep-main .ps-rep-prod { flex: 1; min-width: 10em; width: auto; }

/* ---------- Descuentos y resumen ---------- */

.ps-descuentos { margin: 1em 0; }
.ps-desc-panel {
	border: 1px dashed var(--ps-secondary);
	border-radius: 0.6em;
	padding: 0.8em;
	margin-top: 0.6em;
}
.ps-desc-bloque { margin-bottom: 0.7em; }
.ps-desc-label { display: block; font-size: 0.85em; font-weight: 600; margin-bottom: 0.3em; }
.ps-desc-chips { display: flex; gap: 0.4em; flex-wrap: wrap; }
.ps-desc-ganancia { max-width: 10em; }

.ps-resumen, .ps-det { margin: 1em 0; }
.ps-res-linea {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	padding: 0.35em 0;
	border-bottom: 1px dashed var(--ps-bg-d-1);
	font-size: 0.95em;
}
.ps-res-desc strong { color: var(--ps-tertiary); }
.ps-res-total { font-size: 1.1em; border-bottom: 2px solid var(--ps-primary); }
.ps-res-total strong { color: var(--ps-primary-d-2); }
.ps-det-items { padding: 0.5em 0; border-bottom: 1px dashed var(--ps-bg-d-1); }

.ps-log { margin-top: 0.8em; font-size: 0.85em; }
.ps-log summary { cursor: pointer; font-weight: 600; }
.ps-log-linea { padding: 0.25em 0; color: var(--ps-bg-d-5); }

.ps-hist-lista { margin-top: 0.8em; max-height: 40vh; overflow-y: auto; }
.ps-hist-linea {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6em;
	padding: 0.45em 0;
	border-bottom: 1px solid var(--ps-bg-d-1);
	font-size: 0.9em;
}

/* ---------- Contabilidad ---------- */

.ps-metricas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6em; margin: 1em 0; }
@media (min-width: 783px) { .ps-metricas { grid-template-columns: repeat(4, 1fr); } }
.ps-metric {
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 0.7em;
	padding: 0.8em 1em;
	display: flex;
	flex-direction: column;
	gap: 0.2em;
}
.ps-metric span { font-size: 0.75em; color: var(--ps-bg-d-5); text-transform: uppercase; letter-spacing: 0.03em; }
.ps-metric strong { font-size: 1.15em; }
.ps-metric.is-primary { border-color: var(--ps-primary); }
.ps-metric.is-primary strong { color: var(--ps-primary-d-2); }
.ps-metric.is-danger strong { color: var(--ps-tertiary); }
.ps-metric.is-warn { border-color: var(--ps-secondary); }
.ps-metric.is-warn strong { color: var(--ps-secondary-d-2); }

/* Gráfica de barras CSS pura. */
.ps-grafica {
	display: flex;
	align-items: flex-end;
	gap: 2%;
	height: 11em;
	padding: 0.8em 0.4em 0;
	border-bottom: 2px solid var(--ps-bg-d-2);
}
.ps-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 0.3em; }
.ps-bar { width: 100%; max-width: 2.2em; background: var(--ps-primary); border-radius: 0.25em 0.25em 0 0; min-height: 2px; transition: height 0.3s; }
.ps-bar-col:hover .ps-bar { background: var(--ps-primary-d-2); }
.ps-bar-label { font-size: 0.65em; color: var(--ps-bg-d-5); }

.ps-top-linea {
	display: flex;
	justify-content: space-between;
	padding: 0.4em 0;
	border-bottom: 1px solid var(--ps-bg-d-1);
	font-size: 0.95em;
}
.ps-gasto-form { display: flex; flex-wrap: wrap; gap: 0.5em; margin-bottom: 0.8em; }
.ps-gasto-form .ps-input { flex: 1 1 9em; width: auto; }
.ps-grafica-wrap h4, .ps-top-wrap h4, .ps-gastos-wrap h4 { margin: 1.2em 0 0.5em; font-size: 1.05em; }

/* ---------- Inventario ---------- */

.ps-agregar-stock {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	background: var(--ps-secondary-t-1);
	border: 1px solid var(--ps-secondary-t-3);
	border-radius: 0.7em;
	padding: 0.8em;
	margin-bottom: 1em;
	align-items: center;
}
.ps-agregar-stock .ps-as-producto { flex: 2 1 12em; width: auto; }
.ps-agregar-stock .ps-as-cant { flex: 1 1 6em; width: auto; }
.ps-totales { display: flex; gap: 0.6em; margin-bottom: 1em; flex-wrap: wrap; }
.ps-totales .ps-metric { flex: 1; }

/* ---------- Toast ---------- */

.ps-toast {
	position: fixed;
	left: 50%;
	bottom: 1.2em;
	transform: translate(-50%, 20px);
	background: var(--ps-primary-d-3);
	color: #fff;
	padding: 0.7em 1.4em;
	border-radius: 0.6em;
	z-index: 99999;
	opacity: 0;
	transition: all 0.25s;
	max-width: 92vw;
	text-align: center;
	font-size: 0.95em;
}
.ps-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.ps-toast.is-error { background: var(--ps-tertiary-d-2); }

/* ---------- Navegación ---------- */

.ps-nav {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 0.5em 1em;
	background: var(--ps-surface);
	border-bottom: 1px solid var(--ps-border);
	position: relative;
}
.ps-nav-logo img { max-height: 2.4em; width: auto; display: block; }
.ps-nav-links { display: flex; gap: 0.4em; list-style: none; margin: 0 0 0 auto; padding: 0; }
.ps-nav-links a {
	display: inline-flex;
	align-items: center;
	min-height: 2.4em;
	padding: 0.3em 0.9em;
	border-radius: 0.5em;
	text-decoration: none;
	color: var(--ps-text);
	font-weight: 600;
	font-size: 0.95em;
}
.ps-nav-links a:hover { background: var(--ps-primary-t-1); color: var(--ps-primary-d-2); }
.ps-nav-links a.is-active { background: var(--ps-primary); color: #fff; }
.ps-nav-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	cursor: pointer;
	margin-left: auto;
	padding: 8px;
}
.ps-nav-burger span { height: 3px; border-radius: 2px; background: var(--ps-text); display: block; }
.ps-nav-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 99960; }

@media (max-width: 782px) {
	.ps-nav-burger { display: flex; }
	.ps-nav-links {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: min(78vw, 320px);
		background: var(--ps-surface);
		flex-direction: column;
		padding: 4em 1em 1em;
		margin: 0;
		transform: translateX(-100%);
		transition: transform 0.22s ease;
		z-index: 99970;
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
	}
	.ps-nav.is-open .ps-nav-links { transform: none; }
	.ps-nav-links a { min-height: 48px; font-size: 1.05em; }
}

/* ---------- Footer ---------- */

.ps-footer {
	text-align: center;
	padding: 2em 1em;
	background: var(--ps-bg-d-1);
	color: var(--ps-text);
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	align-items: center;
	font-size: 0.95em;
}
.ps-footer a { color: var(--ps-primary-d-2); text-decoration: none; }
.ps-footer-logo { max-height: 3.5em; width: auto; }
.ps-footer-nombre { font-weight: 700; font-size: 1.1em; }
.ps-footer-redes { display: flex; gap: 1em; flex-wrap: wrap; justify-content: center; }

/* ---------- Edición de pedido ---------- */

.ps-e-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6em;
	padding: 0.45em 0;
	border-bottom: 1px solid var(--ps-bg-d-1);
	flex-wrap: wrap;
}
.ps-e-item-nombre { flex: 1; min-width: 8em; font-size: 0.95em; }
.ps-e-nuevo .ps-e-prod { flex: 1; width: auto; min-width: 9em; }

/* ---------- Login ---------- */

.ps-login { display: flex; justify-content: center; padding: 2em 1em; }
.ps-login-card {
	width: 100%;
	max-width: 400px;
	background: var(--ps-surface);
	border: 1px solid var(--ps-border);
	border-radius: 1em;
	padding: 1.5em;
	box-shadow: 0 10px 30px var(--ps-primary-t-1);
}
.ps-login-sub { color: var(--ps-bg-d-5); font-size: 0.9em; margin: 0 0 1em; }
.ps-login form p { margin: 0 0 0.9em; }
.ps-login label { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 0.3em; }
.ps-login input[type="text"],
.ps-login input[type="password"] {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid var(--ps-border);
	border-radius: 0.5em;
	background: var(--ps-surface);
	color: var(--ps-text);
	font-size: 1em;
	min-height: 2.6em;
}
.ps-login input[type="submit"] {
	width: 100%;
	min-height: 2.8em;
	border: none;
	border-radius: 0.6em;
	background: var(--ps-primary);
	color: #fff;
	font-weight: 700;
	font-size: 1em;
	cursor: pointer;
}
.ps-login input[type="submit"]:hover { background: var(--ps-primary-d-2); }
.ps-login .login-remember { display: flex; align-items: center; gap: 0.4em; }
.ps-login .login-remember label { display: flex; align-items: center; gap: 0.4em; margin: 0; font-weight: 400; }

/* ---------- Dashboard tipo app ---------- */

.ps-dash { padding-bottom: 5.5em; min-height: 70vh; position: relative; }
.ps-dash-head {
	display: flex;
	align-items: center;
	gap: 0.8em;
	padding: 0.8em 1em;
	background: var(--ps-surface);
	border-bottom: 1px solid var(--ps-border);
	border-radius: 0.8em 0.8em 0 0;
	position: sticky;
	top: 0;
	z-index: 30;
}
.ps-dash-logo { max-height: 2.2em; width: auto; border-radius: 0.4em; }
.ps-dash-user { display: flex; flex-direction: column; line-height: 1.2; }
.ps-dash-user small { color: var(--ps-bg-d-5); font-size: 0.75em; }
.ps-dash-salir { margin-left: auto; color: var(--ps-tertiary); text-decoration: none; font-weight: 600; font-size: 0.9em; }
.ps-dash-panel { padding: 1em 0.5em; }

/* Barra inferior fija (móvil) → lateral en escritorio. */
.ps-dash-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: space-around;
	background: var(--ps-surface);
	border-top: 1px solid var(--ps-border);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	z-index: 99950;
	padding: 0.3em 0.2em calc(0.3em + env(safe-area-inset-bottom, 0));
	overflow-x: auto;
}
.ps-dash-tab {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15em;
	min-width: 56px;
	min-height: 52px;
	padding: 0.3em 0.5em;
	background: none;
	border: none;
	border-radius: 0.6em;
	cursor: pointer;
	color: var(--ps-bg-d-5);
	font-size: 0.7em;
	font-weight: 600;
	justify-content: center;
}
.ps-dash-ico { font-size: 1.7em; line-height: 1; }
.ps-dash-tab.is-active { color: var(--ps-primary-d-2); background: var(--ps-primary-t-1); }

@media (min-width: 1024px) {
	.ps-dash { padding-bottom: 0; padding-left: 8.5em; }
	.ps-dash-nav {
		position: absolute;
		left: 0;
		top: 4.2em;
		bottom: auto;
		right: auto;
		width: 8em;
		flex-direction: column;
		justify-content: flex-start;
		gap: 0.3em;
		border: 1px solid var(--ps-border);
		border-radius: 0.8em;
		box-shadow: none;
		padding: 0.5em;
	}
	.ps-dash-tab { width: 100%; flex-direction: row; gap: 0.5em; min-height: 44px; font-size: 0.8em; justify-content: flex-start; }
	.ps-dash-ico { font-size: 1.3em; }
}

/* ---------- Editor de productos (frontend) ---------- */

.ps-prod-img-mini { max-height: 70px; border-radius: 0.5em; margin-top: 0.4em; display: block; }
.ps-prod-row { grid-template-columns: auto 2fr 1fr 1fr 1fr auto; }
@media (max-width: 782px) { .ps-prod-row { grid-template-columns: auto 1fr; } }
.ps-var-editor {
	border: 1px dashed var(--ps-secondary);
	border-radius: 0.6em;
	padding: 0.7em;
	margin-bottom: 0.7em;
}
.ps-var-editor-head { display: flex; gap: 0.4em; align-items: center; flex-wrap: wrap; margin-bottom: 0.5em; }
.ps-var-editor-head .ps-vg-nombre { flex: 1; min-width: 8em; width: auto; }
.ps-var-editor-head .ps-vg-tipo { width: auto; }
.ps-var-editor-op { display: flex; gap: 0.4em; align-items: center; margin-bottom: 0.4em; }
.ps-var-editor-op .ps-vo-nombre { flex: 1; }
.ps-var-editor-op .ps-vo-precio { max-width: 8em; }

/* ---------- Usuarios y ajustes (dashboard) ---------- */

.ps-user-row { grid-template-columns: auto 2fr 1fr auto; }
@media (max-width: 782px) { .ps-user-row { grid-template-columns: auto 1fr; } }
.ps-perm-mods { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2em 1em; margin: 0.6em 0 1em; }
@media (max-width: 480px) { .ps-perm-mods { grid-template-columns: 1fr; } }
.ps-dash-ajustes h4 { margin: 1.2em 0 0.5em; font-size: 1.05em; }
.ps-aj-campo { display: flex; gap: 0.4em; align-items: center; flex-wrap: wrap; margin-bottom: 0.5em; }
.ps-aj-campo .ps-ajf-label { flex: 1; min-width: 8em; width: auto; }
.ps-aj-campo .ps-ajf-tipo { width: auto; }
.ps-aj-campo .ps-ajf-ops { flex: 1; min-width: 8em; width: auto; }

/* ---------- Footer con colores personalizados ---------- */

.ps-footer.is-custom {
	background: var(--ps-footer-bg);
	color: var(--ps-footer-text);
}
.ps-footer.is-custom a { color: var(--ps-footer-text); text-decoration: underline; }
.ps-footer.is-custom .ps-footer-nombre { color: var(--ps-footer-text); }

/* ---------- Dashboard de ajustes (v2.2) ---------- */

.ps-aj-form { max-width: 640px; }
.ps-colores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em; margin: 0.6em 0; }
@media (max-width: 480px) { .ps-colores-grid { grid-template-columns: 1fr; } }
.ps-color-campo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8em;
	border: 1px solid var(--ps-border);
	border-radius: 0.6em;
	padding: 0.6em 0.9em;
	background: var(--ps-surface);
	font-size: 0.9em;
	font-weight: 600;
}
.ps-color-campo input[type="color"] {
	width: 3em;
	height: 2.2em;
	min-height: 40px;
	min-width: 52px;
	border: 1px solid var(--ps-border);
	border-radius: 0.4em;
	padding: 2px;
	background: var(--ps-surface);
	cursor: pointer;
}
.ps-chip-radio { cursor: pointer; }
.ps-chip-radio input { position: absolute; opacity: 0; pointer-events: none; }

.ps-rep-zone { display: flex; flex-direction: column; gap: 0.5em; margin-bottom: 0.5em; }
.ps-rep-fila { display: flex; gap: 0.4em; align-items: center; }
.ps-rep-fila .ps-input { flex: 1; width: auto; min-width: 6em; }

.ps-nav-fila {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6em;
	padding: 0.25em 0;
	border-bottom: 1px dashed var(--ps-bg-d-1);
}
.ps-nav-fila .ps-input { max-width: 5em; }

.ps-import-front {
	border: 1px solid var(--ps-border);
	border-radius: 0.7em;
	padding: 0.9em 1em;
	margin-bottom: 0.8em;
	background: var(--ps-surface);
}
.ps-import-front h4 { margin: 0 0 0.5em; }

.ps-qr-front {
	display: inline-block;
	background: #fff;
	padding: 0.7em;
	border: 1px solid var(--ps-border);
	border-radius: 0.7em;
}
.ps-sc-row { grid-template-columns: 1fr auto; }
.ps-sc-row code {
	background: var(--ps-primary-t-1);
	color: var(--ps-primary-d-3);
	padding: 0.1em 0.5em;
	border-radius: 0.3em;
	font-size: 0.9em;
}
.ps-sc-row small { display: block; }

/* ---------- Iconos SVG minimalistas (v2.3) ---------- */

.ps-ico-svg { width: 1.35em; height: 1.35em; display: inline-block; vertical-align: -0.28em; }
.ps-dash-ico { display: inline-flex; align-items: center; justify-content: center; }
.ps-dash-ico .ps-ico-svg { width: 1.55em; height: 1.55em; vertical-align: 0; }
.ps-cart-fab .ps-ico-svg { width: 1.15em; height: 1.15em; vertical-align: 0; }
.ps-ico-ok { color: var(--ps-primary); }
.ps-ico-ok .ps-ico-svg { width: 1.1em; height: 1.1em; }
.ps-avatar-ini .ps-ico-svg { width: 1.2em; height: 1.2em; vertical-align: 0; }

/* ---------- Ojo de contraseña ---------- */

.ps-pass-wrap { position: relative; display: block; }
.ps-pass-wrap input { padding-right: 3em !important; width: 100%; }
.ps-pass-eye {
	position: absolute;
	right: 0.15em;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--ps-bg-d-5);
	padding: 0;
}
.ps-pass-eye:hover { color: var(--ps-primary); }

/* ---------- Tienda en tarjetas (cards) ---------- */

.ps-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.7em;
	margin: 0.5em 0 1.2em;
}
@media (min-width: 641px) { .ps-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .ps-grid { grid-template-columns: repeat(4, 1fr); } }

.ps-prod--card {
	flex-direction: column;
	align-items: stretch;
	gap: 0.25em;
	padding: 0 0 3em;
	border: 1px solid var(--ps-border);
	border-bottom: 1px solid var(--ps-border);
	border-radius: 0.8em;
	background: var(--ps-surface);
	overflow: hidden;
	position: relative;
	min-height: 0;
}
.ps-prod--card:hover { background: var(--ps-surface); border-color: var(--ps-primary); }
.ps-card-img {
	width: 100%;
	height: 110px;
	object-fit: cover;
	display: block;
	background: var(--ps-bg-d-1);
	margin-bottom: 0.4em;
}
span.ps-card-img-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ps-bg-d-4);
}
span.ps-card-img-ph .ps-ico-svg { width: 2em; height: 2em; }
.ps-prod--card .ps-prod-nombre,
.ps-prod--card .ps-prod-desc,
.ps-prod--card .ps-prod-precio { padding: 0 0.7em; white-space: normal; }
.ps-prod--card .ps-prod-precio { margin-top: 0.2em; }
.ps-prod--card .ps-plus { position: absolute; right: 0.6em; bottom: 0.6em; }

/* ============================================================
   v2.4 — Dashboard estilo FluentCart + pestañas 100% CSS
   (radios + labels: funcionan aunque el JavaScript no cargue)
   ============================================================ */

.ps-dash-radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}
.ps-dash .ps-dash-panel { display: none; }

.ps-dash-radio[value="marca"]:checked ~ .ps-dash-panel[data-panel="marca"],
.ps-dash-radio[value="colores"]:checked ~ .ps-dash-panel[data-panel="colores"],
.ps-dash-radio[value="navegacion"]:checked ~ .ps-dash-panel[data-panel="navegacion"],
.ps-dash-radio[value="ventas"]:checked ~ .ps-dash-panel[data-panel="ventas"],
.ps-dash-radio[value="permisos"]:checked ~ .ps-dash-panel[data-panel="permisos"],
.ps-dash-radio[value="agentes"]:checked ~ .ps-dash-panel[data-panel="agentes"],
.ps-dash-radio[value="formularios"]:checked ~ .ps-dash-panel[data-panel="formularios"],
.ps-dash-radio[value="utilidades"]:checked ~ .ps-dash-panel[data-panel="utilidades"],
.ps-dash-radio[value="importar"]:checked ~ .ps-dash-panel[data-panel="importar"] { display: block; }

.ps-dash-radio[value="marca"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="marca"],
.ps-dash-radio[value="colores"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="colores"],
.ps-dash-radio[value="navegacion"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="navegacion"],
.ps-dash-radio[value="ventas"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="ventas"],
.ps-dash-radio[value="permisos"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="permisos"],
.ps-dash-radio[value="agentes"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="agentes"],
.ps-dash-radio[value="formularios"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="formularios"],
.ps-dash-radio[value="utilidades"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="utilidades"],
.ps-dash-radio[value="importar"]:checked ~ .ps-dash-nav .ps-dash-tab[data-panel="importar"] {
	color: var(--ps-primary-d-2);
	background: var(--ps-primary-t-1);
	font-weight: 700;
}

/* ---------- Look FluentCart: fondo gris, tarjetas blancas ---------- */

.ps-dash {
	background: var(--ps-bg-d-1);
	border-radius: 14px;
}
.ps-dash-head {
	background: var(--ps-surface);
	border: none;
	border-bottom: 1px solid var(--ps-bg-d-2);
	border-radius: 14px 14px 0 0;
	padding: 0.85em 1.2em;
	position: static;
}
.ps-dash-panel { padding: 1.2em; }
.ps-set-card {
	background: var(--ps-surface);
	border: 1px solid var(--ps-bg-d-2);
	border-radius: 12px;
	padding: 1.3em 1.5em 1.5em;
	max-width: 920px;
	margin: 0 auto;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ps-set-head { border-bottom: 1px solid var(--ps-bg-d-1); padding-bottom: 0.9em; }
.ps-set-titulo { font-size: 1.12em; font-weight: 700; margin: 0; }
.ps-set-sub { color: var(--ps-bg-d-5); font-size: 0.82em; margin: 0.25em 0 0; line-height: 1.45; }

/* Filas de ajuste a dos columnas (etiqueta + descripción | control). */
.ps-set-row {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 0.5em 2em;
	padding: 1.05em 0;
	border-bottom: 1px solid var(--ps-bg-d-1);
	align-items: start;
}
.ps-set-row:last-of-type { border-bottom: none; }
.ps-set-info strong { font-size: 0.92em; }
.ps-set-info span {
	display: block;
	font-size: 0.8em;
	color: var(--ps-bg-d-5);
	margin-top: 0.2em;
	line-height: 1.45;
}
.ps-set-field { min-width: 0; }
.ps-set-field > .ps-input,
.ps-set-field > select.ps-input { max-width: 430px; }
.ps-set-field .ps-var-op { min-height: 34px; font-size: 0.9em; }
@media (max-width: 782px) {
	.ps-set-row { grid-template-columns: 1fr; gap: 0.4em; }
}

/* Botón de guardar oscuro (estilo FluentCart), derivado de la paleta. */
.ps-set-save { display: flex; justify-content: flex-end; padding-top: 1.1em; }
.ps-btn-dark { background: var(--ps-bg-d-9); color: var(--ps-bg-l-10); border-radius: 0.45em; }
.ps-btn-dark:hover:not(:disabled) { background: var(--ps-bg-d-7); }

/* Inputs más compactos y sobrios dentro del dashboard. */
.ps-dash .ps-input { font-size: 0.92em; min-height: 2.5em; border-radius: 0.45em; }
.ps-dash .ps-btn { border-radius: 0.45em; }
.ps-dash .ps-rep-fila { display: flex; gap: 0.5em; margin-bottom: 0.5em; align-items: center; }
.ps-dash .ps-nav-fila { display: flex; gap: 0.6em; align-items: center; margin-bottom: 0.35em; }
.ps-dash .ps-nav-fila .ps-var-op { flex: 1; }
.ps-dash .ps-nav-fila .ps-input { width: 5.5em; }
.ps-colores-grid { display: flex; flex-wrap: wrap; gap: 0.8em; margin: 0.5em 0; }
.ps-color-campo {
	display: inline-flex;
	flex-direction: column;
	gap: 0.3em;
	font-size: 0.82em;
	font-weight: 600;
	color: var(--ps-bg-d-6);
}
.ps-color-campo input[type="color"] {
	width: 64px;
	height: 40px;
	border: 1px solid var(--ps-bg-d-2);
	border-radius: 0.45em;
	background: var(--ps-surface);
	padding: 2px;
	cursor: pointer;
}
.ps-chip-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.ps-chip-radio { position: relative; }

/* Sidebar izquierda en escritorio (grid-areas), barra inferior en móvil. */
@media (min-width: 1024px) {
	.ps-dash {
		display: grid;
		grid-template-columns: 225px minmax(0, 1fr);
		grid-template-areas: "head head" "side main";
		align-items: start;
		padding: 0 0 1.2em;
	}
	.ps-dash-head { grid-area: head; }
	.ps-dash-panel { grid-area: main; }
	.ps-dash-nav {
		grid-area: side;
		position: static;
		width: auto;
		top: auto;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		gap: 0.25em;
		background: transparent;
		border: none;
		border-radius: 0;
		box-shadow: none;
		padding: 1.2em 0.8em;
		overflow: visible;
	}
	.ps-dash-tab {
		flex-direction: row;
		justify-content: flex-start;
		gap: 0.6em;
		width: 100%;
		min-height: 42px;
		font-size: 0.86em;
		border-radius: 8px;
		padding: 0.5em 0.85em;
		color: var(--ps-bg-d-6);
		cursor: pointer;
	}
	.ps-dash-tab .ps-dash-ico .ps-ico-svg { width: 1.25em; height: 1.25em; }
}

/* ============================================================
   v2.5 — Anchos de escritorio (mín. 1280px útiles)
   ============================================================ */

/* El dashboard usa hasta 1280px centrado dentro de su contenedor. En temas
   FSE el plugin además amplía --wp--style--global--content-size (inline,
   solo en páginas con módulos del plugin), así el contenedor deja de limitar. */
@media (min-width: 1024px) {
	.ps-dash {
		width: 100%;
		max-width: 1280px;
		margin-left: auto;
		margin-right: auto;
	}
}

/* Módulos de gestión: aprovechan hasta 1280px si el contenedor lo permite.
   Para romper el límite del tema en páginas FSE, usa el bloque con
   alineación «Ancho completo». */
.ps-pedidos,
.ps-contab,
.ps-clientes,
.ps-inventario,
.ps-productos,
.ps-agentes {
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
}

/* ============================================================
   v2.6 — Pulido visual (tipografía y controles nativos)
   ============================================================ */

/* Las interfaces de gestión usan tipografía de sistema (estilo FluentCart),
   independiente de la fuente del tema. La tienda/nav/footer siguen heredando
   la fuente del sitio. */
.ps-dash,
.ps-pedidos,
.ps-contab,
.ps-clientes,
.ps-inventario,
.ps-productos,
.ps-agentes,
.ps-usuarios,
.ps-login,
.ps-overlay,
.ps-toast {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

/* Input de archivo nativo con aspecto integrado. */
.ps input[type="file"].ps-input {
	border-style: dashed;
	background: var(--ps-bg-d-1);
	cursor: pointer;
	padding: 0.45em 0.6em;
}
.ps input[type="file"].ps-input::file-selector-button {
	border: none;
	border-radius: 0.35em;
	padding: 0.55em 1em;
	margin-right: 0.8em;
	background: var(--ps-bg-d-9);
	color: var(--ps-bg-l-10);
	font-weight: 600;
	font-family: inherit;
	font-size: 0.82em;
	width: auto;
	cursor: pointer;
}
.ps input[type="file"].ps-input { font-size: 0.9em; }

/* Bordes redondeados limpios del panel (la barra móvil es fixed: no se recorta). */
.ps-dash { overflow: hidden; }

/* Código de shortcodes en Utilidades. */
.ps-sc-row code {
	background: var(--ps-bg-d-1);
	padding: 0.15em 0.55em;
	border-radius: 0.35em;
	font-size: 0.85em;
	color: var(--ps-primary-d-2);
}

/* El header del panel alinea con el resto y el enlace Salir es discreto. */
.ps-dash-head { border-radius: 14px 14px 0 0; }
.ps-dash-salir {
	font-size: 0.85em;
	padding: 0.45em 0.9em;
	border: 1px solid var(--ps-bg-d-2);
	border-radius: 0.45em;
	color: var(--ps-tertiary);
}
.ps-dash-salir:hover { background: var(--ps-tertiary-t-1); }

/* ============================================================
   v2.9 — Producto no disponible
   ============================================================ */

.ps-prod-row.is-nodisp { opacity: 0.55; }
.ps-prod-row.is-nodisp .ps-avatar { filter: grayscale(1); }

/* ============================================================
   v3.0 — Tienda estilo app de delivery
   ============================================================ */

/* Cabecera del negocio. */
.ps-tienda-head {
	display: flex;
	align-items: center;
	gap: 0.8em;
	padding: 0.9em 0 0.7em;
}
.ps-tienda-logo { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.ps-tienda-id { display: flex; flex-direction: column; }
.ps-tienda-nombre { font-size: 1.35em; font-weight: 800; color: var(--ps-primary-d-1); line-height: 1.2; }
.ps-tienda-horario { font-size: 0.82em; color: var(--ps-bg-d-5); }

/* Chips sticky con estilo píldora. */
.ps-chips-tienda {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--ps-bg);
	padding: 0.6em 0;
	margin-bottom: 0.4em;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.ps-chips-tienda::-webkit-scrollbar { display: none; }
.ps-chips-tienda .ps-chip {
	border: 1px solid var(--ps-bg-d-2);
	background: var(--ps-surface);
	color: var(--ps-text);
	white-space: nowrap;
	flex-shrink: 0;
}
.ps-chips-tienda .ps-chip.is-active {
	background: var(--ps-primary);
	border-color: var(--ps-primary);
	color: #fff;
}

/* Buscador en vivo. */
.ps-tienda-buscar {
	position: relative;
	margin-bottom: 1em;
}
.ps-tienda-buscar .ps-ico-svg {
	position: absolute;
	left: 0.8em;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ps-bg-d-4);
	pointer-events: none;
}
.ps-tienda-buscar .ps-input {
	border-radius: 99px;
	padding-left: 2.6em;
	background: var(--ps-surface);
}

/* Título de sección: texto plano en negrita (antes pill). */
.ps-tienda .ps-pill {
	background: none;
	color: var(--ps-text);
	font-size: 1.2em;
	font-weight: 800;
	padding: 0;
	border-radius: 0;
	margin: 1.2em 0 0.6em;
	display: block;
}

/* Tarjeta horizontal de producto (layout lista). */
.ps-prod--fila {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.4em 0.9em;
	background: var(--ps-surface);
	border: 1px solid var(--ps-bg-d-1);
	border-bottom: 1px solid var(--ps-bg-d-1);
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	padding: 0.9em;
	margin-bottom: 0.8em;
	min-height: 0;
	align-items: start;
}
.ps-prod--fila:hover { background: var(--ps-surface); border-color: var(--ps-primary-t-4); }
.ps-prod-thumb {
	width: 74px;
	height: 74px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--ps-bg-d-1);
	flex-shrink: 0;
}
span.ps-prod-thumb-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ps-bg-d-4);
}
.ps-prod--fila .ps-prod-main { min-width: 0; }
.ps-prod--fila .ps-prod-nombre { font-size: 1.02em; font-weight: 700; }
.ps-prod--fila .ps-prod-desc { white-space: normal; }
.ps-prod--fila .ps-prod-precio {
	color: var(--ps-primary-d-1);
	font-size: 1.08em;
	margin-top: 0.25em;
	display: block;
}
.ps-prod-acciones {
	grid-column: 1 / -1;
	display: flex;
	justify-content: flex-end;
	gap: 0.5em;
	align-items: center;
	flex-wrap: wrap;
}
.ps-prod-opciones {
	display: inline-flex;
	align-items: center;
	background: var(--ps-bg-d-1);
	color: var(--ps-bg-d-6);
	border-radius: 8px;
	padding: 0.5em 0.9em;
	font-size: 0.82em;
	font-weight: 600;
}
.ps-prod-agregar {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	background: var(--ps-primary);
	color: #fff;
	border-radius: 8px;
	padding: 0.55em 1em;
	font-size: 0.88em;
	font-weight: 700;
	min-height: 40px;
}
.ps-prod-agregar:hover { background: var(--ps-primary-d-2); }
.ps-prod--fila .ps-prod-precio del { display: inline; }

/* En cards el precio también va en color de marca. */
.ps-prod--card .ps-prod-precio { color: var(--ps-primary-d-1); }

/* ---------- Modal de producto renovado ---------- */

.ps-modal-producto { padding-top: 0; }
.ps-modal-producto .ps-prod-img {
	width: calc(100% + 2.4em);
	max-width: none;
	margin: -1.2em -1.2em 0.9em;
	height: 230px;
	max-height: none;
	object-fit: cover;
	border-radius: 1em 1em 0 0;
	display: block;
}
.ps-modal-producto .ps-modal-titulo { font-size: 1.25em; }
.ps-modal-producto .ps-prod-modal-precio { color: var(--ps-primary-d-1); font-size: 1.35em; }

/* Grupos de variación: filas bordeadas con el adicional destacado. */
.ps-modal-producto .ps-var-grupo { border: none; padding: 0; margin: 1.1em 0; }
.ps-modal-producto .ps-var-grupo legend { font-size: 1em; padding: 0; margin-bottom: 0.45em; }
.ps-modal-producto .ps-var-op {
	border: 1px solid var(--ps-bg-d-2);
	border-radius: 10px;
	padding: 0.55em 0.85em;
	margin-bottom: 0.5em;
	min-height: 48px;
	background: var(--ps-surface);
}
.ps-modal-producto .ps-var-op em { color: var(--ps-secondary-d-1); font-weight: 700; font-size: 0.92em; }

/* Barra inferior fija del modal. */
.ps-modal-producto .ps-modal-add {
	display: block;
	position: sticky;
	bottom: -1.2em;
	background: var(--ps-surface);
	margin: 1.2em -1.2em -1.2em;
	padding: 0.9em 1.2em calc(0.9em + env(safe-area-inset-bottom, 0));
	border-top: 1px solid var(--ps-bg-d-1);
	box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
}
.ps-add-fila {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1em;
	margin-bottom: 0.8em;
}
.ps-add-label {
	display: block;
	font-size: 0.78em;
	font-weight: 600;
	color: var(--ps-bg-d-5);
	margin-bottom: 0.25em;
}
.ps-add-cant .ps-add-label { text-align: center; }
.ps-add-cant .ps-stepper { background: var(--ps-bg-d-1); border-radius: 99px; padding: 0.15em 0.3em; }
.ps-add-cant .ps-stepper button { border: none; background: var(--ps-surface); }
.ps-add-total { text-align: right; }
.ps-add-monto { color: var(--ps-primary-d-1); font-size: 1.25em; }
.ps-modal-producto .ps-agregar { width: 100%; min-height: 3em; border-radius: 0.7em; }

/* ============================================================
   v3.1 — Logo: modo imagen/texto y formas (rect/cuadrado/circular)
   ============================================================ */

.ps .ps-logo-img { display: block; }
.ps .ps-logo--rect {
	height: 2.4em;
	width: auto;
	max-width: 200px;
	object-fit: contain;
	border-radius: 6px;
}
.ps .ps-logo--cuadrado {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 10px;
}
.ps .ps-logo--circular {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 50%;
}
.ps .ps-logo-texto {
	font-weight: 800;
	font-size: 1.15em;
	color: var(--ps-primary-d-1);
	line-height: 1.2;
	white-space: nowrap;
}

/* Tamaños por contexto. */
.ps-tienda-head .ps-logo--rect { height: 3em; }
.ps-tienda-head .ps-logo--cuadrado,
.ps-tienda-head .ps-logo--circular { width: 54px; height: 54px; }
.ps-footer .ps-logo--rect { height: 3.2em; }
.ps-footer .ps-logo--cuadrado,
.ps-footer .ps-logo--circular { width: 64px; height: 64px; }
.ps-nav .ps-nav-logo { display: inline-flex; align-items: center; text-decoration: none; }

/* ============================================================
   v3.2 — Gestor de categorías y cargos extra
   ============================================================ */

.ps-cat-fila {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 0.5em;
}
.ps-cat-fila .ps-cat-nombre { flex: 1; }
.ps-cat-count {
	background: var(--ps-bg-d-1);
	color: var(--ps-bg-d-6);
	border-radius: 99px;
	padding: 0.15em 0.7em;
	font-size: 0.8em;
	font-weight: 700;
}
.ps-cats-nueva {
	display: flex;
	gap: 0.5em;
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--ps-bg-d-1);
}
.ps-cats-nueva .ps-cat-nueva { flex: 1; }
.ps-p-cats { margin-bottom: 0.5em; }

/* ============================================================
   v3.3 — Popup de contacto (llamar / WhatsApp)
   ============================================================ */

.ps-tel {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--ps-primary-d-1);
	font-weight: 600;
	text-decoration: underline;
	font-size: 1em;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
}
.ps-contacto {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7em;
	margin-top: 1em;
}
.ps-contacto .ps-btn { min-height: 3em; }

/* ============================================================
   v3.4 — Horario dinámico (Abierto/Cerrado ahora) y filas de horario
   ============================================================ */

.ps-estado {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.8em;
	font-weight: 700;
	margin-top: 0.25em;
}
.ps-estado-dot {
	width: 0.65em;
	height: 0.65em;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
}
.ps-estado.is-abierto { color: var(--ps-primary-d-2); }
.ps-estado.is-abierto .ps-estado-dot { background: var(--ps-primary); }
.ps-estado.is-cerrado { color: var(--ps-tertiary-d-1); }
.ps-estado.is-cerrado .ps-estado-dot {
	background: var(--ps-tertiary);
	animation: ps-parpadeo 1.1s ease-in-out infinite;
}
@keyframes ps-parpadeo {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.15; }
}

/* Aviso de cerrado en el checkout. */
.ps-aviso-cerrado {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin-bottom: 0.9em;
	font-size: 0.9em;
}
.ps-aviso-cerrado .ps-estado-dot {
	background: var(--ps-tertiary);
	animation: ps-parpadeo 1.1s ease-in-out infinite;
}

/* Filas del editor de horario (dashboard). */
.ps-hora-fila {
	display: flex;
	gap: 0.5em;
	align-items: center;
	margin-bottom: 0.4em;
}
.ps-hora-fila .ps-var-op { min-width: 8.5em; }
.ps-hora-fila .ps-input { width: auto; }
