/*
 * Fila compartida: «Comprar» + botón stock (inline-flex).
 */
.sync-bsale-cart-actions-inline {
	display: inline-flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	width: auto;
	max-width: 100%;
	vertical-align: middle;
}

.sync-bsale-cart-actions-inline .single_add_to_cart_button,
.sync-bsale-cart-actions-inline .sync-bsale-store-stock-btn {
	width: auto;
	flex: 0 1 auto;
	max-width: 100%;
	margin: unset;
}

/* Temas que fuerzan botón a ancho completo en form.cart */
.woocommerce div.product form.cart .sync-bsale-cart-actions-inline > .button {
	width: auto !important;
	max-width: 100%;
	margin: unset !important;
}

.sync-bsale-store-stock-btn {
	margin-inline-start: 0;
	vertical-align: middle;
}

/* ——— Modal: tema claro, estilo actual ——— */
.sync-bsale-store-dialog {
	color-scheme: light;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	max-width: min(32rem, 94vw);
	width: 100%;
	padding: 0;
	border: none;
	border-radius: 1rem;
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.06),
		0 32px 64px -16px rgba(15, 23, 42, 0.22),
		0 12px 24px -8px rgba(15, 23, 42, 0.12);
	background: #fafafa;
	color: #0f172a;
}

.sync-bsale-store-dialog::backdrop {
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(4px);
}

.sync-bsale-store-dialog__inner {
	padding: 1.35rem 1.35rem 1.25rem;
	position: relative;
	max-height: min(86vh, 680px);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.sync-bsale-store-dialog__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 999px;
	background: #fff;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.sync-bsale-store-dialog__close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.sync-bsale-store-dialog__close:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

.sync-bsale-store-dialog__title {
	margin: 0 2.75rem 1rem 0;
	padding-bottom: 0.65rem;
	font-size: 1.125rem;
	font-weight: 650;
	letter-spacing: -0.03em;
	border-bottom: 1px solid #e2e8f0;
	color: #0f172a;
}

.sync-bsale-store-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.sync-bsale-store-item__card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	padding: 1rem 1rem 0.95rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sync-bsale-store-item__name {
	font-weight: 650;
	font-size: 0.98rem;
	margin-bottom: 0.6rem;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.sync-bsale-store-item__stock-line {
	margin: 0 0 0.5rem;
	font-size: 0.9375rem;
}

.sync-bsale-store-item__stock-label {
	font-weight: 600;
	color: #475569;
	margin-right: 0.35rem;
}

.sync-bsale-store-item__qty {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: #0f172a;
}

.sync-bsale-variation-stock-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.8125rem;
	margin: 0.35rem 0 0;
	border-radius: 0.5rem;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}

.sync-bsale-variation-stock-table thead th {
	text-align: left;
	padding: 0.45rem 0.65rem;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	font-weight: 600;
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
}

.sync-bsale-variation-stock-table tbody td {
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: top;
	background: #fff;
}

.sync-bsale-variation-stock-table tbody tr:last-child td {
	border-bottom: none;
}

.sync-bsale-variation-stock-table__name {
	color: #1e293b;
	font-weight: 500;
	line-height: 1.35;
}

.sync-bsale-variation-stock-table__qty {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: nowrap;
	color: #0f172a;
}

.sync-bsale-store-item__matrix-wrap {
	overflow-x: auto;
	overflow-y: visible;
	margin: 0;
	max-width: 100%;
	border-radius: 0.5rem;
}

.sync-bsale-store-item__empty {
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	color: #64748b;
}

/* Dirección + WhatsApp en una fila */
.sync-bsale-store-item__location-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem 0.75rem;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #f1f5f9;
}

.sync-bsale-store-item__address {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
}

.sync-bsale-store-item__address a {
	text-decoration: none;
	color: #2563eb;
	border-bottom: 1px solid rgba(37, 99, 235, 0.35);
	word-break: break-word;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.sync-bsale-store-item__address a:hover {
	color: #1d4ed8;
	border-bottom-color: #1d4ed8;
}

.sync-bsale-store-item__address--empty {
	flex: 1;
	min-height: 0;
}

/* Botón WhatsApp: verde marca, aspecto clicable */
.sync-bsale-store-wa-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 0.65rem;
	background: #25d366;
	color: #fff;
	text-decoration: none;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.08),
		0 2px 8px rgba(37, 211, 102, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.22);
	border: 1px solid rgba(15, 23, 42, 0.06);
	transition:
		background 0.15s ease,
		transform 0.12s ease,
		box-shadow 0.15s ease;
	cursor: pointer;
}

.sync-bsale-store-wa-btn:hover {
	background: #20bd5a;
	box-shadow:
		0 2px 4px rgba(0, 0, 0, 0.1),
		0 4px 14px rgba(37, 211, 102, 0.45);
	transform: translateY(-1px);
}

.sync-bsale-store-wa-btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.sync-bsale-store-wa-btn:focus-visible {
	outline: 2px solid #16a34a;
	outline-offset: 2px;
}

.sync-bsale-store-wa-btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.sync-bsale-store-wa-btn__icon svg {
	display: block;
}

.sync-bsale-store-item__notice {
	margin: 0.75rem 0 0;
	padding-top: 0.65rem;
	border-top: 1px dashed #e2e8f0;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #64748b;
}
