/**
 * WholesaleFic front-end styles.
 *
 * A small, reusable design system scoped under `.ws` so it never collides with
 * theme styles. Tokens live in :root for easy white-labelling.
 */

.ws {
	--ws-color-primary: #1f6feb;
	--ws-color-primary-hover: #1a5fd0;
	--ws-color-accent: #0f9d58;
	--ws-color-danger: #d93025;
	--ws-color-text: #1f2328;
	--ws-color-muted: #6b7280;
	--ws-color-border: #e2e5e9;
	--ws-color-surface: #ffffff;
	--ws-color-surface-alt: #f6f8fa;
	--ws-radius: 10px;
	--ws-radius-sm: 6px;
	--ws-gap: 16px;
	--ws-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px rgba(16, 24, 40, 0.05);
	--ws-font: inherit;

	color: var(--ws-color-text);
	font-family: var(--ws-font);
	line-height: 1.5;
	box-sizing: border-box;
}

.ws *,
.ws *::before,
.ws *::after {
	box-sizing: inherit;
}

/* Card -------------------------------------------------------------------- */
.ws-card {
	background: var(--ws-color-surface);
	border: 1px solid var(--ws-color-border);
	border-radius: var(--ws-radius);
	box-shadow: var(--ws-shadow);
	padding: 28px;
	max-width: 640px;
	margin: 0 auto;
}

.ws-card__title {
	margin: 0 0 6px;
	font-size: 1.4rem;
	font-weight: 700;
}

.ws-card__subtitle {
	margin: 0 0 20px;
	color: var(--ws-color-muted);
}

/* Form -------------------------------------------------------------------- */
/*
 * .ws-form__grid is a flex-wrap container so that the per-field
 * ws-field-col-* width classes (output by the Form Builder) control
 * each field's share of the row via flex-basis.
 */
.ws-form__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 20px;
}

/* Column width classes — must mirror wholesalefic-form-builder.css exactly.
 * The gap between siblings is 16px; subtract half of that from each side
 * (8px) to keep columns flush to the full container width.
 */
.ws-field-col-25  { flex: 0 0 calc(25%  - 12px); min-width: 160px; }
.ws-field-col-33  { flex: 0 0 calc(33.3% - 11px); min-width: 180px; }
.ws-field-col-50  { flex: 0 0 calc(50%  - 8px);  min-width: 200px; }
.ws-field-col-66  { flex: 0 0 calc(66.6% - 6px); min-width: 240px; }
.ws-field-col-75  { flex: 0 0 calc(75%  - 4px);  min-width: 260px; }
.ws-field-col-100 { flex: 0 0 100%; }

/* Collapse all partial-width columns to full-width below 640 px */
@media (max-width: 640px) {
	.ws-field-col-25,
	.ws-field-col-33,
	.ws-field-col-50,
	.ws-field-col-66,
	.ws-field-col-75 {
		flex: 0 0 100%;
		min-width: 0;
	}
}

.ws-form__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	/* flex-grow so a lone field on a row stretches to fill remaining space */
	flex-grow: 1;
}

.ws-form__field--full {
	flex: 0 0 100%;
}

.ws-form__label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ws-color-text);
	letter-spacing: 0.01em;
}

.ws-form__required {
	color: var(--ws-color-danger);
	margin-left: 2px;
}

.ws-form__hint {
	font-size: 0.78rem;
	color: var(--ws-color-muted);
	margin: 2px 0 0;
	line-height: 1.4;
}

.ws-input,
.ws-textarea,
.ws-select {
	width: 100%;
	padding: 10px 13px;
	border: 1.5px solid var(--ws-color-border);
	border-radius: var(--ws-radius-sm);
	font-size: 0.93rem;
	background: var(--ws-color-surface);
	color: var(--ws-color-text);
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ws-input:focus,
.ws-textarea:focus,
.ws-select:focus {
	outline: none;
	border-color: var(--ws-color-primary);
	box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

.ws-textarea {
	resize: vertical;
	min-height: 80px;
	line-height: 1.5;
}

/* Checkbox / radio group */
.ws-radio-group,
.ws-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ws-radio-item,
.ws-checkbox-item {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 0.9rem;
	cursor: pointer;
}

.ws-radio-item input,
.ws-checkbox-item input {
	width: 16px;
	height: 16px;
	accent-color: var(--ws-color-primary);
	cursor: pointer;
	flex-shrink: 0;
}

/* Select */
.ws-select-wrap {
	position: relative;
}

.ws-select-wrap::after {
	content: '';
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid var(--ws-color-muted);
	pointer-events: none;
}

.ws-select-wrap .ws-select {
	padding-right: 32px;
}

/* Heading / divider layout fields */
.ws-field-heading {
	font-size: 1rem;
	font-weight: 700;
	color: var(--ws-color-text);
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ws-color-border);
}

.ws-field-divider {
	border: none;
	border-top: 1px solid var(--ws-color-border);
	margin: 4px 0;
}

.ws-field-html {
	font-size: 0.9rem;
	color: var(--ws-color-text);
	line-height: 1.6;
}

/* Buttons ----------------------------------------------------------------- */
.ws-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 20px;
	border: 1px solid transparent;
	border-radius: var(--ws-radius-sm);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ws-btn--primary {
	background: var(--ws-color-primary);
	color: #fff;
}

.ws-btn--primary:hover {
	background: var(--ws-color-primary-hover);
	color: #fff;
}

.ws-btn--ghost {
	background: transparent;
	border-color: var(--ws-color-border);
	color: var(--ws-color-text);
}

.ws-btn--ghost:hover {
	background: var(--ws-color-surface-alt);
}

.ws-btn--block {
	width: 100%;
}

/* Notices ----------------------------------------------------------------- */
.ws-notice {
	padding: 12px 16px;
	border-radius: var(--ws-radius-sm);
	border: 1px solid transparent;
	margin-bottom: 20px;
	font-size: 0.925rem;
}

.ws-notice--success {
	background: #e7f6ec;
	border-color: #b7e1c4;
	color: #1b5e34;
}

.ws-notice--info {
	background: #e8f0fe;
	border-color: #c2d7fb;
	color: #1a4480;
}

.ws-notice--warning {
	background: #fef7e0;
	border-color: #f9e2a3;
	color: #7a5b00;
}

.ws-notice--error {
	background: #fce8e6;
	border-color: #f5c2bd;
	color: #8c1d18;
}


/* Frontend toast notifications -------------------------------------------- */
.ws-toast-region {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 999999;
	display: grid;
	gap: 10px;
	width: min(390px, calc(100vw - 32px));
	pointer-events: none;
}

.ws-toast {
	--toast-color: #2563eb;
	--toast-bg: #eff6ff;
	--toast-border: #bfdbfe;
	position: relative;
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) 28px;
	gap: 12px;
	align-items: start;
	padding: 14px;
	overflow: hidden;
	border: 1px solid var(--toast-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 14px 35px rgba(15, 23, 42, 0.16);
	opacity: 0;
	transform: translate3d(18px, 0, 0);
	transition: opacity .18s ease, transform .18s ease;
	pointer-events: auto;
}

.ws-toast.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
.ws-toast.is-leaving { opacity: 0; transform: translate3d(18px, 0, 0); }
.ws-toast--success { --toast-color: #0f9d58; --toast-bg: #ecfdf3; --toast-border: #a7f3d0; }
.ws-toast--error { --toast-color: #d93025; --toast-bg: #fef2f2; --toast-border: #fecaca; }
.ws-toast--warning { --toast-color: #d97706; --toast-bg: #fffbeb; --toast-border: #fde68a; }

.ws-toast::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 3px;
	background: var(--toast-color);
	transform: scaleX(1);
	transform-origin: left center;
}

.ws-toast.is-visible::after { animation: ws-toast-countdown var(--toast-duration, 4500ms) linear forwards; }
.ws-toast.is-paused::after,
.ws-toast.is-leaving::after { animation-play-state: paused; }

.ws-toast__icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--toast-bg);
	color: var(--toast-color);
}

.ws-toast__icon svg { width: 19px; height: 19px; }
.ws-toast__content { min-width: 0; padding-top: 1px; }
.ws-toast__title { display: block; margin: 0 0 3px; color: #111827; font-size: 14px; line-height: 1.4; }
.ws-toast__message { margin: 0; color: #4b5563; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }

.ws-toast__close {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #667085;
	cursor: pointer;
}

.ws-toast__close:hover { background: #f2f4f7; color: #101828; }
.ws-toast__close:focus-visible { outline: 2px solid #1f6feb; outline-offset: 1px; }
.ws-toast__close svg { width: 15px; height: 15px; }

@keyframes ws-toast-countdown { to { transform: scaleX(0); } }

@media (max-width: 640px) {
	.ws-toast-region { top: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.ws-toast { transition: none; }
	.ws-toast::after { display: none; animation: none !important; }
}

/* Login form --------------------------------------------------------------- */
.ws-login-form { display: grid; gap: 16px; margin-top: 20px; }
.ws-login__remember { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.ws-login__remember input { width: 16px; height: 16px; accent-color: var(--ws-color-primary); }


/* Badges ------------------------------------------------------------------ */
.ws-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ws-badge--accent {
	background: rgba(15, 157, 88, 0.12);
	color: var(--ws-color-accent);
}

.ws-badge--muted {
	background: var(--ws-color-surface-alt);
	color: var(--ws-color-muted);
}

/* ==========================================================================
   Dashboard (.ws-db namespace)
   ========================================================================== */

.ws-db {
	max-width: 900px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Header ------------------------------------------------------------------ */
.ws-db__header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px 28px;
	background: var(--ws-color-surface);
	border: 1px solid var(--ws-color-border);
	border-radius: var(--ws-radius);
	box-shadow: var(--ws-shadow);
}

.ws-db__avatar {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--ws-color-primary);
	color: #fff;
	font-size: 1.1rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	letter-spacing: 0.02em;
}

.ws-db__header-info {
	flex: 1;
	min-width: 0;
}

.ws-db__greeting {
	margin: 0 0 6px;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--ws-color-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ws-db__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ws-db__email {
	font-size: 0.82rem;
	color: var(--ws-color-muted);
}

.ws-db__header-actions {
	flex-shrink: 0;
}

/* Badge extras */
.ws-badge--tier {
	background: rgba(31, 111, 235, 0.1);
	color: var(--ws-color-primary);
}

/* Stats ------------------------------------------------------------------- */
.ws-db__stats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--ws-gap);
}

.ws-db__stat {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px;
	background: var(--ws-color-surface);
	border: 1px solid var(--ws-color-border);
	border-radius: var(--ws-radius);
	box-shadow: var(--ws-shadow);
}

.ws-db__stat-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ws-db__stat-icon--orders  { background: rgba(31,111,235,0.1);  color: var(--ws-color-primary); }
.ws-db__stat-icon--spent   { background: rgba(15,157,88,0.1);   color: var(--ws-color-accent); }
.ws-db__stat-icon--avg     { background: rgba(139,92,246,0.1);  color: #7c3aed; }
.ws-db__stat-icon--pending { background: rgba(245,158,11,0.1);  color: #d97706; }
.ws-db__stat-icon--tier    { background: rgba(15,157,88,0.1);   color: var(--ws-color-accent); }
.ws-db__stat-icon--min     { background: rgba(31,111,235,0.1);  color: var(--ws-color-primary); }

.ws-db__stat-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.ws-db__stat-label {
	font-size: 0.75rem;
	color: var(--ws-color-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.ws-db__stat-value {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ws-color-text);
	white-space: nowrap;
}

/* Section ----------------------------------------------------------------- */
.ws-db__section {
	background: var(--ws-color-surface);
	border: 1px solid var(--ws-color-border);
	border-radius: var(--ws-radius);
	box-shadow: var(--ws-shadow);
	overflow: hidden;
}

.ws-db__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--ws-color-border);
}

.ws-db__section-title {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 700;
	color: var(--ws-color-text);
}

.ws-db__section-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.83rem;
	font-weight: 600;
	color: var(--ws-color-primary);
	text-decoration: none ! important;
}

.ws-db__section-link:hover {
	text-decoration: underline;
}

/* Table ------------------------------------------------------------------- */
.ws-db__table-wrap {
	overflow-x: auto;
}

.ws-db__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.ws-db__thead {
	background: var(--ws-color-surface-alt);
}

.ws-db__th {
	padding: 11px 16px;
	text-align: left;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--ws-color-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.ws-db__th--right {
	text-align: right;
}

.ws-db__td {
	padding: 13px 16px;
	border-top: 1px solid var(--ws-color-border);
	vertical-align: middle;
	color: var(--ws-color-text);
}

.ws-db__td--muted  { color: var(--ws-color-muted); font-size: 0.84rem; }
.ws-db__td--right  { text-align: right; }
.ws-db__td--bold   { font-weight: 700; }

.ws-db__row:hover .ws-db__td {
	background: var(--ws-color-surface-alt);
}

.ws-db__order-num {
	font-weight: 700;
	color: var(--ws-color-primary);
	text-decoration: none ! important;
}

.ws-db__order-num:hover {
	text-decoration: underline;
}

/* Order status badges */
.ws-db__status {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.ws-db__status--completed  { background: rgba(15,157,88,0.1);   color: #0c6b3c; }
.ws-db__status--processing { background: rgba(31,111,235,0.1);  color: var(--ws-color-primary); }
.ws-db__status--pending    { background: rgba(245,158,11,0.1);  color: #92400e; }
.ws-db__status--on-hold    { background: rgba(245,158,11,0.1);  color: #92400e; }
.ws-db__status--cancelled  { background: rgba(217,48,37,0.1);   color: var(--ws-color-danger); }
.ws-db__status--refunded   { background: rgba(107,114,128,0.1); color: var(--ws-color-muted); }
.ws-db__status--failed     { background: rgba(217,48,37,0.1);   color: var(--ws-color-danger); }

.ws-db__view-btn {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border: 1.5px solid var(--ws-color-border);
	border-radius: var(--ws-radius-sm);
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ws-color-text);
	text-decoration: none ! important;
	transition: background 0.12s, border-color 0.12s;
	white-space: nowrap;
}

.ws-db__view-btn:hover {
	background: var(--ws-color-surface-alt);
	border-color: var(--ws-color-muted);
}

/* Empty state ------------------------------------------------------------- */
.ws-db__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 48px 24px;
	text-align: center;
	color: var(--ws-color-muted);
}

.ws-db__empty svg {
	opacity: 0.4;
}

.ws-db__empty p {
	margin: 0;
	font-size: 0.9rem;
}

/* Quick links ------------------------------------------------------------- */
.ws-db__links {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: var(--ws-gap);
}

.ws-db__link-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 20px 16px;
	background: var(--ws-color-surface);
	border: 1px solid var(--ws-color-border);
	border-radius: var(--ws-radius);
	box-shadow: var(--ws-shadow);
	text-decoration: none ! important;
	color: var(--ws-color-text);
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.ws-db__link-card:hover {
	border-color: var(--ws-color-primary);
	box-shadow: 0 0 0 3px rgba(31,111,235,0.08), var(--ws-shadow);
	transform: translateY(-1px);
	color: var(--ws-color-primary);
}

.ws-db__link-card--logout:hover {
	border-color: var(--ws-color-danger);
	box-shadow: 0 0 0 3px rgba(217,48,37,0.08), var(--ws-shadow);
	color: var(--ws-color-danger);
}

.ws-db__link-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--ws-color-surface-alt);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.ws-db__link-card:hover .ws-db__link-icon {
	background: rgba(31,111,235,0.08);
}

.ws-db__link-card--logout:hover .ws-db__link-icon {
	background: rgba(217,48,37,0.08);
}

.ws-db__link-label {
	font-size: 0.82rem;
	font-weight: 600;
}

/* Keep old .ws-stat and .ws-dashboard selectors for any theme overrides --- */
.ws-dashboard { max-width: 900px; margin: 0 auto; }
.ws-dashboard__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.ws-dashboard__greeting { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; }
.ws-dashboard__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ws-gap); margin-bottom: 24px; }
.ws-stat { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--ws-color-surface); border: 1px solid var(--ws-color-border); border-radius: var(--ws-radius); }
.ws-stat__label { font-size: 0.8rem; color: var(--ws-color-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.ws-stat__value { font-size: 1.35rem; font-weight: 700; }
.ws-dashboard__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Login form footer link -------------------------------------------------- */
.ws-login__footer {
	margin-top: 16px;
	font-size: 0.88rem;
	text-align: left;
	color: var(--ws-color-muted);
}

.ws-login__footer a {
	color: var(--ws-color-primary);
	font-weight: 600;
	text-decoration: none;
}

.ws-login__footer a:hover {
	text-decoration: underline;
}

/* Registration form login link -------------------------------------------- */
.ws-registration__login-link {
	margin-top: 14px;
	font-size: 0.88rem;
	text-align: center;
	color: var(--ws-color-muted);
}

.ws-registration__login-link a {
	color: var(--ws-color-primary);
	font-weight: 600;
	text-decoration: none;
}

.ws-registration__login-link a:hover {
	text-decoration: underline;
}

/* Wholesale price display on product pages -------------------------------- */
.ws-price {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
}

.ws-price__retail {
	text-decoration: line-through;
	color: var(--ws-color-muted);
	font-size: 0.9em;
}

.ws-price__wholesale {
	color: var(--ws-color-accent);
	font-weight: 700;
}

.ws-price__save {
	font-size: 0.78rem;
	background: rgba(15, 157, 88, 0.12);
	color: var(--ws-color-accent);
	padding: 2px 8px;
	border-radius: 999px;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 600px) {
	.ws-dashboard__grid {
		grid-template-columns: 1fr;
	}

	.ws-card {
		padding: 20px;
	}

	/* Dashboard mobile */
	.ws-db__header {
		flex-wrap: wrap;
		padding: 18px;
		gap: 12px;
	}

	.ws-db__header-actions {
		width: 100%;
	}

	.ws-db__header-actions .ws-btn {
		width: 100%;
	}

	.ws-db__greeting {
		font-size: 1.1rem;
	}

	.ws-db__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ws-db__links {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ws-db__th,
	.ws-db__td {
		padding: 10px 12px;
	}
}

/* ==========================================================================
   Bulk Order Form (.ws-bof namespace)
   ========================================================================== */

.ws-bof {
	--bof-radius: 10px;
	--bof-radius-sm: 6px;
	--bof-gap: 14px;

	/* Admin-configurable color palette (defaults, may be overridden by inline CSS) */
	--ws-bof-primary: #2563eb;
	--ws-bof-accent: #7c3aed;
	--ws-bof-success: #10b981;
	--ws-bof-danger: #ef4444;
	--ws-bof-text: #1f2937;
	--ws-bof-border: #e5e7eb;
	--ws-bof-surface: #f9fafb;
	--ws-bof-background: #ffffff;

	/* Derived color variables for internal use */
	--bof-primary: var(--ws-bof-primary);
	--bof-primary-dark: color-mix(in srgb, var(--ws-bof-primary) 90%, black);
	--bof-primary-soft: color-mix(in srgb, var(--ws-bof-primary) 8%, white);
	--bof-accent: var(--ws-bof-accent);
	--bof-ink: var(--ws-bof-text);
	--bof-muted: color-mix(in srgb, var(--ws-bof-text) 60%, #f0f0f0);
	--bof-line: var(--ws-bof-border);
	--bof-surface: var(--ws-bof-surface);
	--bof-bg: var(--ws-bof-background);
	--bof-success: var(--ws-bof-success);
	--bof-success-bg: color-mix(in srgb, var(--ws-bof-success) 12%, white);
	--bof-warning: color-mix(in srgb, var(--ws-bof-accent) 100%, #b45309);
	--bof-warning-bg: color-mix(in srgb, var(--ws-bof-accent) 12%, white);
	--bof-danger: var(--ws-bof-danger);
	--bof-danger-bg: color-mix(in srgb, var(--ws-bof-danger) 12%, white);
	--bof-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 14px rgba(15,23,42,0.05);

	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--bof-ink);
	line-height: 1.5;
}

/* Top bar ----------------------------------------------------------------- */
.ws-bof__topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.ws-bof__search-wrap {
	position: relative;
	flex: 1;
	min-width: 200px;
	max-width: 400px;
}

.ws-bof__search-icon {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bof-muted);
	pointer-events: none;
	display: flex;
	align-items: center;
}

.ws-bof .ws-bof__search-input {
	width: 100%;
	padding: 9px 36px 9px 36px;
	border: 1.5px solid var(--bof-line);
	border-radius: var(--bof-radius-sm);
	font-size: 0.92rem;
	background: var(--bof-surface);
	color: var(--bof-ink);
	transition: border-color 0.15s, box-shadow 0.15s;
	box-sizing: border-box;
}

.ws-bof .ws-bof__search-input:focus {
	outline: none;
	border-color: var(--bof-primary);
	box-shadow: 0 0 0 3px rgba(31,111,235,0.12);
}

.ws-bof__search-clear {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--bof-muted);
	padding: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: color 0.15s;
}

.ws-bof__search-clear:hover {
	color: var(--bof-danger);
}

.ws-bof__filter-wrap {
	flex-shrink: 0;
}

.ws-bof__cat-select {
	padding: 9px 12px;
	border: 1.5px solid var(--bof-line);
	border-radius: var(--bof-radius-sm);
	font-size: 0.92rem;
	background: var(--bof-surface);
	color: var(--bof-ink);
	cursor: pointer;
	transition: border-color 0.15s;
}

.ws-bof__cat-select:focus {
	outline: none;
	border-color: var(--bof-primary);
}

/* Price range filter ------------------------------------------------------ */
.ws-bof__price-range {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border: 1.5px solid var(--bof-line);
	border-radius: var(--bof-radius-sm);
	background: var(--bof-surface);
}

.ws-bof__price-range:focus-within {
	border-color: var(--bof-primary);
}

.ws-bof__price-range-symbol {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--bof-muted, #6b7280);
}

.ws-bof__price-range-dash {
	color: var(--bof-muted, #6b7280);
}

.ws-bof__price-input {
	width: 62px;
	padding: 5px 6px;
	border: none;
	background: transparent;
	color: var(--bof-ink);
	font-size: 0.9rem;
	text-align: left;
}

.ws-bof__price-input:focus {
	outline: none;
}

/* Hide number input spinners for a cleaner look */
.ws-bof__price-input::-webkit-outer-spin-button,
.ws-bof__price-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.ws-bof__price-input[type='number'] {
	-moz-appearance: textfield;
	appearance: textfield;
}

/* Bulk actions ------------------------------------------------------------ */
.ws-bof__bulk-actions {
	flex-shrink: 0;
}

#ws-bof-subtotal {
	padding: 7px 12px;
	background: var(--bof-primary);
	border-radius: 4px;
	margin-right: 10px;
}

.ws-bof__bulk-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 16px;
	background: var(--bof-primary);
	color: #fff;
	border: none;
	border-radius: var(--bof-radius-sm);
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
}

.ws-bof__bulk-btn:disabled {
	background: var(--bof-muted);
	opacity: 0.55;
	cursor: not-allowed;
}

.ws-bof__bulk-btn:not(:disabled):hover {
	background: var(--bof-primary-dark);
}

.ws-bof__selected-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.25);
	border-radius: 999px;
	padding: 0 7px;
	font-size: 0.78rem;
	min-width: 20px;
}

/* Results bar ------------------------------------------------------------- */
.ws-bof__results-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 0.85rem;
	color: var(--bof-muted);
	min-height: 24px;
}

/* Spinner ----------------------------------------------------------------- */
@keyframes ws-bof-spin {
	to { transform: rotate(360deg); }
}

.ws-bof__spin {
	animation: ws-bof-spin 0.8s linear infinite;
}

/* Table ------------------------------------------------------------------- */
.ws-bof__table-wrap {
	overflow-x: auto;
	border: 1px solid var(--bof-line);
	border-radius: var(--bof-radius);
	box-shadow: var(--bof-shadow);
	background: var(--bof-surface);
}

.ws-bof__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.ws-bof__thead {
	background: var(--bof-bg);
}

.ws-bof__th {
	padding: 11px 12px;
	text-align: left;
	font-size: 0.74rem;
	font-weight: 700;
	color: var(--bof-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 1.5px solid var(--bof-line);
	white-space: nowrap;
}

.ws-bof__th.ws-bof__th--stock {
	min-width: 90px;
}

.ws-bof__th--check {
	width: 36px;
	text-align: center;
}

.ws-bof__cell {
	padding: 11px 12px;
	border-bottom: 1px solid var(--bof-line);
	vertical-align: middle;
}

.ws-bof__row:last-child .ws-bof__cell {
	border-bottom: none;
}

.ws-bof__row:hover {
	background: var(--bof-bg);
}

.ws-bof__row--oos {
	opacity: 0.6;
}

.ws-bof__row.is-selected {
	background: var(--bof-primary-soft);
}

/* Cells: image ------------------------------------------------------------ */
.ws-bof__cell--image {
	width: 58px;
}

.ws-bof__thumb-link img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: var(--bof-radius-sm);
	display: block;
	border: 1px solid var(--bof-line);
}

.ws-bof__no-img {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--bof-bg);
	border-radius: var(--bof-radius-sm);
	border: 1px solid var(--bof-line);
	color: var(--bof-muted);
	font-size: 0.8rem;
}

/* Product name ------------------------------------------------------------ */
.ws-bof__product-name {
	font-weight: 600;
	color: var(--bof-ink);
	text-decoration: none;
}

.ws-bof__product-name:hover {
	color: var(--bof-primary);
	text-decoration: underline;
}

/* SKU --------------------------------------------------------------------- */
.ws-bof__sku {
	font-family: monospace;
	font-size: 0.82rem;
	color: var(--bof-muted);
}

/* Wholesale price + tags -------------------------------------------------- */
.ws-bof__cell--wholesale {
	white-space: nowrap;
}

.ws-bof__ws-price {
	font-weight: 700;
	color: var(--bof-accent);
	display: block;
	margin-bottom: 4px;
}

.ws-bof__role-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	background: var(--bof-primary-soft);
	color: var(--bof-primary-dark);
	margin-right: 4px;
	letter-spacing: 0.01em;
}

.ws-bof__save-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	background: var(--bof-success-bg);
	color: var(--bof-success);
}

/* Stock ------------------------------------------------------------------- */
.ws-bof__stock {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 0.76rem;
	font-weight: 700;
}

.ws-bof__stock--in {
	background: var(--bof-success-bg);
	color: var(--bof-success);
}

.ws-bof__stock--out {
	background: var(--bof-danger-bg);
	color: var(--bof-danger);
}

/* Qty input --------------------------------------------------------------- */
.ws-bof__qty-wrap {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--bof-line);
	border-radius: var(--bof-radius-sm);
	overflow: hidden;
	background: var(--bof-surface);
}

.ws-bof__qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 32px;
	background: var(--bof-bg);
	border: none;
	cursor: pointer;
	font-size: 1rem;
	color: var(--bof-ink);
	transition: background 0.12s;
	flex-shrink: 0;
}

.ws-bof__qty-btn:hover {
	background: var(--bof-line);
}

.ws-bof__qty-input {
	width: 44px;
	height: 32px;
	text-align: center;
	border: none;
	border-left: 1px solid var(--bof-line);
	border-right: 1px solid var(--bof-line);
	font-size: 0.9rem;
	background: var(--bof-surface);
	color: var(--bof-ink);
	-moz-appearance: textfield;
}

.ws-bof__qty-input::-webkit-outer-spin-button,
.ws-bof__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

.ws-bof__qty-input:focus {
	outline: none;
	box-shadow: none;
}

/* Checkbox ---------------------------------------------------------------- */
.ws-bof__check {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: var(--bof-primary);
}

/* Row-level check cell ---------------------------------------------------- */
.ws-bof__cell--check {
	width: 36px;
	text-align: center;
}

/* Add button -------------------------------------------------------------- */
.ws-bof__add-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 13px;
	background: var(--bof-primary);
	color: #fff;
	border: none;
	border-radius: var(--bof-radius-sm);
	font-size: 0.84rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
	white-space: nowrap;
}

.ws-bof__add-btn:hover {
	background: var(--bof-primary-dark);
}

.ws-bof__add-btn.is-loading {
	opacity: 0.65;
	pointer-events: none;
}

.ws-bof__add-btn.is-added {
	background: var(--bof-accent);
	pointer-events: none;
}

.ws-bof__add-icon {
	font-size: 1rem;
	line-height: 1;
}

/* Empty state ------------------------------------------------------------- */
.ws-bof__empty {
	text-align: center;
	padding: 36px 16px;
	color: var(--bof-muted);
	font-size: 0.92rem;
}

/* Muted text -------------------------------------------------------------- */
.ws-bof__muted {
	color: var(--bof-muted);
}

/* Cart bar ---------------------------------------------------------------- */
.ws-bof__cart-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--bof-success-bg);
	border: 1px solid #a7f3d0;
	border-radius: var(--bof-radius-sm);
	margin-top: 14px;
	font-size: 0.9rem;
	gap: 12px;
	flex-wrap: wrap;
}

.ws-bof__cart-msg {
	color: var(--bof-success);
	font-weight: 500;
}

.ws-bof__cart-link {
	color: var(--bof-primary);
	font-weight: 700;
	text-decoration: none;
}

.ws-bof__cart-link:hover {
	text-decoration: underline;
}

/* Pagination -------------------------------------------------------------- */
.ws-bof__pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	flex-wrap: wrap;
	gap: 10px;
}

.ws-bof__pagination-info {
	font-size: 0.85rem;
	color: var(--bof-muted);
}

.ws-bof__pagination-btns {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ws-bof__page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	border: 1.5px solid var(--bof-line);
	border-radius: var(--bof-radius-sm);
	background: var(--bof-surface);
	color: var(--bof-ink);
	font-size: 0.88rem;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.ws-bof__page-btn:hover:not(:disabled):not(.ws-bof__page-btn--active) {
	background: var(--bof-bg);
	border-color: var(--bof-muted);
}

.ws-bof__page-btn--active {
	background: var(--bof-primary);
	border-color: var(--bof-primary);
	color: #fff;
	font-weight: 700;
}

.ws-bof__page-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ws-bof__page-ellipsis {
	padding: 0 4px;
	color: var(--bof-muted);
	font-size: 0.9rem;
}

/* Responsive -------------------------------------------------------------- */
/* ==========================================================================
   Classic card layout  (.ws-bof__classic-*)
   ========================================================================== */

.ws-bof__classic-wrap {
	display: flex;
	flex-direction: column;
	gap: 0;
	border: 1px solid var(--bof-line);
	border-radius: var(--bof-radius);
	box-shadow: var(--bof-shadow);
	background: var(--bof-surface);
	overflow: hidden;
}

/* Select-all header row inside classic wrap */
.ws-bof__classic-selectall-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	background: var(--bof-bg);
	border-bottom: 1.5px solid var(--bof-line);
	font-size: 0.85rem;
	color: var(--bof-muted);
}

.ws-bof__select-all-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--bof-muted);
}

/* Individual product card */
.ws-bof__classic-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--bof-line);
	background: var(--bof-surface);
	transition: background 0.12s;
}

.ws-bof__classic-card:last-child {
	border-bottom: none;
}

.ws-bof__classic-card:hover {
	background: var(--bof-bg);
}

.ws-bof__classic-card--oos {
	opacity: 0.6;
}

.ws-bof__classic-card.is-selected {
	background: var(--bof-primary-soft);
}

/* Checkbox column */
.ws-bof__classic-check {
	flex-shrink: 0;
	width: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Thumbnail */
.ws-bof__classic-thumb {
	flex-shrink: 0;
}

.ws-bof__classic-thumb-link {
	display: block;
}

.ws-bof__classic-thumb-link img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--bof-radius-sm);
	border: 1px solid var(--bof-line);
	display: block;
}

.ws-bof__classic-no-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	background: var(--bof-bg);
	border-radius: var(--bof-radius-sm);
	border: 1px solid var(--bof-line);
	color: var(--bof-muted);
}

/* Info column (grows) */
.ws-bof__classic-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ws-bof__classic-name-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ws-bof__classic-name {
	font-size: 0.95rem;
	font-weight: 700;
}

.ws-bof__variable-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 7px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 700;
	background: var(--bof-warning-bg);
	color: var(--bof-warning);
	letter-spacing: 0.02em;
}

.ws-bof__classic-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	flex-wrap: wrap;
}

.ws-bof__classic-sep {
	color: var(--bof-line);
}

.ws-bof__classic-cat {
	font-size: 0.8rem;
}

/* Price block */
.ws-bof__classic-price-block {
	display: flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
}

.ws-bof__classic-price-block .ws-bof__ws-price {
	display: inline;
	margin-bottom: 0;
	font-size: 0.95rem;
}

.ws-bof__classic-retail {
	font-size: 0.8rem;
	text-decoration: line-through;
	color: var(--bof-muted);
}

/* Variation selector inside classic info */
.ws-bof__classic-variation {
	margin-top: 2px;
}

.ws-bof__classic-variation .ws-bof__variation-select {
	max-width: 260px;
}

/* Right-side actions column */
.ws-bof__classic-actions {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.ws-bof__classic-stock {
	margin-bottom: 2px;
}

/* Empty state (classic) */
.ws-bof__classic-empty {
	padding: 40px 16px;
}

/* ==========================================================================
   Classic overrides when [data-style-template="classic"]
   (keep the same CSS vars; classic card IS the layout — no table)
   ========================================================================== */

.ws-bof[data-style-template="classic"] .ws-bof__classic-card {
	border-radius: 0;
}

.ws-bof[data-style-template="classic"] .ws-bof__classic-card:first-child {
	border-radius: 0;
}

/* Responsive: stack classic cards fully on mobile */
@media (max-width: 640px) {
	.ws-bof__classic-card {
		flex-wrap: wrap;
		gap: 10px;
	}

	.ws-bof__classic-thumb-link img,
	.ws-bof__classic-no-img {
		width: 48px;
		height: 48px;
	}

	.ws-bof__classic-actions {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		width: 100%;
		justify-content: flex-end;
	}
}

/* Variation filter (topbar) ----------------------------------------------- */
.ws-bof__var-filter-wrap {
	flex-shrink: 0;
}

.ws-bof__var-filter-label {
	display: none; /* hidden – label is provided by the <label> element beside the select */
}

.ws-bof__var-filter-select {
	padding: 9px 12px;
	border: 1.5px solid var(--bof-line);
	border-radius: var(--bof-radius-sm);
	font-size: 0.92rem;
	background: var(--bof-surface);
	color: var(--bof-ink);
	cursor: pointer;
	transition: border-color 0.15s;
	max-width: 180px;
}

.ws-bof__var-filter-select:focus {
	outline: none;
	border-color: var(--bof-primary);
	box-shadow: 0 0 0 3px rgba(31,111,235,0.12);
}

/* Variation selector (per row) -------------------------------------------- */
.ws-bof__var-select-wrap {
	min-width: 140px;
}

.ws-bof__var-select {
	width: 100%;
	padding: 7px 10px;
	border: 1.5px solid var(--bof-line);
	border-radius: var(--bof-radius-sm);
	font-size: 0.85rem;
	background: var(--bof-surface);
	color: var(--bof-ink);
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-bof__var-select:focus {
	outline: none;
	border-color: var(--bof-primary);
	box-shadow: 0 0 0 3px rgba(31,111,235,0.12);
}

.ws-bof__var-select.is-invalid {
	border-color: var(--bof-danger);
	box-shadow: 0 0 0 3px rgba(185,28,28,0.10);
}

/* Add-button disabled state when variation not yet selected */
.ws-bof__add-btn:disabled,
.ws-bof__add-btn.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

/* Subtotal bar ------------------------------------------------------------- */
.ws-bof__subtotal-bar {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--bof-surface);
	border-top: 2px solid var(--bof-line);
	box-shadow: 0 -2px 12px rgba(15,23,42,0.08);
	z-index: 20;
	margin-top: 16px;
}

.ws-bof__subtotal-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	flex-wrap: wrap;
}

.ws-bof__subtotal-items {
	font-size: 0.9rem;
	color: var(--bof-muted);
}

.ws-bof__subtotal-items strong {
	color: var(--bof-ink);
	font-weight: 700;
}

.ws-bof__subtotal-amount {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.ws-bof__subtotal-amount .label {
	font-size: 0.85rem;
	color: var(--bof-muted);
}

.ws-bof__subtotal-amount .value {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--bof-accent);
}

.ws-bof__subtotal-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* ==========================================================================
   Classic style template  (.ws-bof[data-style-template="classic"])
   Overrides the default modern card look with a flatter, more
   traditional WooCommerce table appearance.
   ========================================================================== */

.ws-bof[data-style-template="classic"] {
	--bof-radius: 4px;
	--bof-radius-sm: 3px;
	--bof-shadow: none;
	--bof-primary: #2271b1;       /* WP admin blue */
	--bof-primary-dark: #135e96;
	--bof-primary-soft: #e8f0fa;
	--bof-bg: #f0f0f1;            /* WP surface tint */
	--bof-line: #c3c4c7;          /* WP border */
}

.ws-bof[data-style-template="classic"] .ws-bof__table-wrap {
	border-radius: var(--bof-radius);
	box-shadow: none;
	border: 1px solid var(--bof-line);
}

.ws-bof[data-style-template="classic"] .ws-bof__thead {
	background: #f0f0f1;
}

.ws-bof[data-style-template="classic"] .ws-bof__th {
	font-size: 0.8rem;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 700;
	color: #3c434a;
	border-bottom: 2px solid var(--bof-line);
}

.ws-bof[data-style-template="classic"] .ws-bof__cell {
	padding: 9px 10px;
	border-bottom: 1px solid #ebebeb;
}

.ws-bof[data-style-template="classic"] .ws-bof__row:hover {
	background: #f6f7f7;
}

.ws-bof[data-style-template="classic"] .ws-bof__row.is-selected {
	background: #e8f0fa;
}

.ws-bof[data-style-template="classic"] .ws-bof__search-input,
.ws-bof[data-style-template="classic"] .ws-bof__cat-select,
.ws-bof[data-style-template="classic"] .ws-bof__var-filter-select,
.ws-bof[data-style-template="classic"] .ws-bof__var-select {
	border-radius: var(--bof-radius-sm);
}

.ws-bof[data-style-template="classic"] .ws-bof__add-btn,
.ws-bof[data-style-template="classic"] .ws-bof__bulk-btn,
.ws-bof[data-style-template="classic"] .ws-bof__page-btn {
	border-radius: var(--bof-radius-sm);
}

.ws-bof[data-style-template="classic"] .ws-bof__qty-wrap {
	border-radius: var(--bof-radius-sm);
}

.ws-bof[data-style-template="classic"] .ws-bof__stock {
	border-radius: 3px;           /* pill → badge */
}

.ws-bof[data-style-template="classic"] .ws-bof__role-tag,
.ws-bof[data-style-template="classic"] .ws-bof__save-tag,
.ws-bof[data-style-template="classic"] .ws-bof__ws-price + .ws-bof__role-tag {
	border-radius: 3px;
}

.ws-bof[data-style-template="classic"] .ws-bof__subtotal-bar {
	background: #f0f0f1;
	border-top-color: var(--bof-line);
	box-shadow: 0 -1px 0 var(--bof-line);
}


.ws-bof[data-style-template="classic"] .ws-bof__page-btn--active {
	background: var(--bof-primary);
	border-color: var(--bof-primary);
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 768px) {
	.ws-bof__topbar {
		flex-direction: column;
		align-items: stretch;
	}

	.ws-bof__search-wrap,
	.ws-bof__filter-wrap,
	.ws-bof__var-filter-wrap {
		max-width: 100%;
	}

	.ws-bof__price-range {
		width: 100%;
		justify-content: space-between;
	}

	.ws-bof__price-input {
		flex: 1;
		width: auto;
	}

	.ws-bof__var-filter-select {
		max-width: 100%;
		width: 100%;
	}

	.ws-bof__bulk-actions {
		width: 100%;
	}

	.ws-bof__bulk-btn {
		width: 100%;
		justify-content: center;
	}

	.ws-bof__pagination {
		flex-direction: column;
		align-items: flex-start;
	}

	.ws-bof__th--category,
	.ws-bof__cell--cat {
		display: none;
	}

	.ws-bof__th--variation,
	.ws-bof__cell--variation {
		display: none;
	}

	.ws-bof__subtotal-bar__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.ws-bof__subtotal-actions {
		width: 100%;
	}

	.ws-bof__subtotal-actions .ws-bof__bulk-btn {
		flex: 1;
		justify-content: center;
	}
}

/* ==========================================================================
   Quantity break pricing table (single product page)
   ========================================================================== */
.ws-qty-break-table {
	margin-top: 18px;
	padding: 14px 16px;
	background: #f6f8fa;
	border: 1px solid #e2e5e9;
	border-radius: 8px;
	font-size: 0.88rem;
}

.ws-qty-break-table__heading {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	font-weight: 700;
	font-size: 0.85rem;
	color: #1f2328;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ws-qty-break-table__heading svg {
	color: #1f6feb;
	flex-shrink: 0;
}

.ws-qty-break-table__table {
	width: 100%;
	border-collapse: collapse;
}

.ws-qty-break-table__table th,
.ws-qty-break-table__table td {
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid #e2e5e9;
	color: #1f2328;
}

.ws-qty-break-table__table th {
	font-weight: 600;
	color: #6b7280;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.ws-qty-break-table__table tbody tr:last-child td {
	border-bottom: none;
}

.ws-qty-break-table__table tbody tr:hover td {
	background: #eef2f7;
}

/* Active tier row — highlighted when qty input reaches that tier */
.ws-qty-break-table__table tbody tr.ws-qty-break-table__row--active td {
	background: #dbeafe;
	border-bottom-color: #93c5fd;
}

.ws-qty-break-table__table tbody tr.ws-qty-break-table__row--active td:first-child {
	border-left: 3px solid #2563eb;
}

/* "Price each" column header — slightly bolder to hint it's interactive */
.ws-qty-break-table__col-price {
	white-space: nowrap;
}

/* Active price cell — pulsed highlight when row becomes active */
.ws-qty-break-table__price-cell--active {
	color: #1d4ed8;
	font-weight: 700;
	transition: color 0.2s ease, font-weight 0.1s ease;
}

/* Product page price element — turns blue when a tier is active */
.woocommerce-Price-amount.ws-tier-price-active,
.woocommerce-Price-amount.ws-tier-price-active bdi {
	color: #1d4ed8;
	transition: color 0.2s ease;
}

/* BOF — tier price active cell */
.ws-bof__cell--tier-active .ws-bof__ws-price {
	color: #1d4ed8;
	font-weight: 700;
}

.ws-bof__tier-tag {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 6px;
	font-size: 0.72rem;
	font-weight: 600;
	border-radius: 4px;
	background: #dbeafe;
	color: #1d4ed8;
	border: 1px solid #93c5fd;
	white-space: nowrap;
	vertical-align: middle;
	transition: opacity 0.15s;
}

/* ==========================================================================
   Min-qty discount notice (single product page, pricing rules)
   ========================================================================== */
.ws-pricing-rule-notice {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 10px 0 4px;
	padding: 9px 13px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #1e40af;
	line-height: 1.4;
}

.ws-pricing-rule-notice svg {
	flex-shrink: 0;
	color: #2563eb;
}