/* ==========================================================================
   B2B Portal — Frontend Styles
   ========================================================================== */

:root {
	--b2bp-color-primary: #2196f3;
	--b2bp-color-primary-dark: #1976d2;
	--b2bp-color-primary-alpha: rgba(33, 150, 243, 0.15);
	--b2bp-color-success: #4caf50;
	--b2bp-color-success-bg: #e8f5e9;
	--b2bp-color-success-text: #2e7d32;
	--b2bp-color-warning-bg: #fff8e1;
	--b2bp-color-warning-border: #ffc107;
	--b2bp-color-warning-text: #f57f17;
	--b2bp-color-error: #e53935;
	--b2bp-color-error-bg: #fce4ec;
	--b2bp-color-error-text: #c62828;
	--b2bp-color-info-bg: #e8f4fd;
	--b2bp-color-info-border: #2196f3;
	--b2bp-color-info-text: #1565c0;
	--b2bp-color-border: #e0e0e0;
	--b2bp-color-border-light: #eee;
	--b2bp-color-input-border: #ccc;
	--b2bp-color-text: #333;
	--b2bp-color-text-muted: #888;
	--b2bp-color-text-label: #666;
	--b2bp-color-bg: #fff;
	--b2bp-color-bg-muted: #f5f5f5;
	--b2bp-color-bg-hover: #e0e0e0;
	--b2bp-radius: 4px;
	--b2bp-radius-lg: 6px;
	--b2bp-radius-xl: 8px;
}

/* ---------- Main Menu: B2B Dropdown ---------- */

.b2bp-menu-item--logout {
	border-top: 1px solid var(--b2bp-color-border-light);
}

/* ---------- Focus & Accessibility ---------- */

.b2bp-catalog a:focus-visible,
.b2bp-catalog button:focus-visible,
.b2bp-catalog input:focus-visible,
.b2bp-catalog select:focus-visible,
.b2bp-register a:focus-visible,
.b2bp-register button:focus-visible,
.b2bp-register input:focus-visible,
.b2bp-register select:focus-visible,
.b2bp-login a:focus-visible,
.b2bp-login button:focus-visible,
.b2bp-login input:focus-visible,
.b2bp-account a:focus-visible,
.b2bp-account button:focus-visible,
.b2bp-account select:focus-visible,
.b2bp-catalog .b2bp-product-card__tiers .b2bp-tiers-toggle:focus-visible,
.b2bp-catalog .b2bp-product-card__actions .b2bp-add-to-cart:focus-visible,
.b2bp-account__tab:focus-visible,
.b2bp-link-btn:focus-visible {
	outline: 2px solid var(--b2bp-color-primary);
	outline-offset: 2px;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

/* ---------- Notices ---------- */

.b2bp-notice {
	padding: 1em 1.5em;
	border-radius: var(--b2bp-radius-lg);
	margin-bottom: 1.5em;
	font-size: 0.95em;
	line-height: 1.5;
}

.b2bp-notice--info {
	background: var(--b2bp-color-info-bg);
	border-left: 4px solid var(--b2bp-color-info-border);
	color: var(--b2bp-color-info-text);
}

.b2bp-notice--warning {
	background: var(--b2bp-color-warning-bg);
	border-left: 4px solid var(--b2bp-color-warning-border);
	color: var(--b2bp-color-warning-text);
}

.b2bp-notice--success {
	background: var(--b2bp-color-success-bg);
	border-left: 4px solid var(--b2bp-color-success);
	color: var(--b2bp-color-success-text);
}

.b2bp-notice--error {
	background: var(--b2bp-color-error-bg);
	border-left: 4px solid var(--b2bp-color-error);
	color: var(--b2bp-color-error-text);
}

.b2bp-notice p {
	margin: 0 0 0.5em;
}

.b2bp-notice p:last-child {
	margin-bottom: 0;
}

.b2bp-notice a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

/* ---------- Catalog ---------- */

.b2bp-catalog {
	position: relative;
	max-width: 1600px;
	margin: 0 auto;
	padding: 40px 20px;
}

.b2bp-catalog__filters {
	display: flex;
	flex-direction: column;
	gap: 1em;
	margin-bottom: 1em;
	align-items: stretch;
}

.b2bp-catalog__filter-search {
	flex: 1;
	min-width: 200px;
}

.b2bp-select,
.b2bp-input {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid var(--b2bp-color-input-border);
	border-radius: var(--b2bp-radius);
	font-size: 0.95em;
	background: var(--b2bp-color-bg);
	transition: border-color 0.2s;
	margin: 0!important;
}

.b2bp-select:focus,
.b2bp-input:focus {
	border-color: var(--b2bp-color-primary);
	outline: none;
	box-shadow: 0 0 0 2px var(--b2bp-color-primary-alpha);
}

/* ---------- Catalog: element resets ---------- */

.b2bp-catalog *,
.b2bp-catalog *::before,
.b2bp-catalog *::after {
	box-sizing: border-box;
}

.b2bp-catalog button,
.b2bp-catalog input {
	font-family: inherit;
	line-height: normal;
	margin: 0!important;
}

/* ---------- Product Grid (mobile-first) ---------- */

.b2bp-catalog .b2bp-grid {
	display: grid;
	gap: 1.5em;
	grid-template-columns: 1fr;
}

@media (min-width: 481px) {
	.b2bp-catalog .b2bp-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 769px) {
	.b2bp-catalog .b2bp-catalog__filters {
		flex-direction: row;
		align-items: center;
	}

	.b2bp-catalog .b2bp-grid--cols-3,
	.b2bp-catalog .b2bp-grid--cols-4,
	.b2bp-catalog .b2bp-grid--cols-5,
	.b2bp-catalog .b2bp-grid--cols-6 {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1025px) {
	.b2bp-catalog .b2bp-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
	.b2bp-catalog .b2bp-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
	.b2bp-catalog .b2bp-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
	.b2bp-catalog .b2bp-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
	.b2bp-catalog .b2bp-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Product Card ---------- */

.b2bp-catalog .b2bp-product-card {
	display: flex;
	flex-direction: column;
	background: var(--b2bp-color-bg);
	border: 1px solid var(--b2bp-color-border);
	border-radius: var(--b2bp-radius-xl);
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}

.b2bp-catalog .b2bp-product-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.b2bp-catalog .b2bp-product-card__image {
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--b2bp-color-bg-muted);
}

.b2bp-catalog .b2bp-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s;
}

.b2bp-catalog .b2bp-product-card__info {
	padding: 1em 1em 0.5em;
	flex: 1;
}

.b2bp-catalog .b2bp-product-card__title {
	font-size: 1em;
	font-weight: 600;
	margin: 0 0 0.25em;
	padding: 0;
	line-height: 1.3;
	color: var(--b2bp-color-text);
	text-transform: none;
	letter-spacing: normal;
}

.b2bp-catalog .b2bp-product-card__sku {
	display: block;
	font-size: 0.8em;
	color: var(--b2bp-color-text-muted);
	margin-bottom: 0.5em;
}

.b2bp-catalog .b2bp-product-card__price {
	font-size: 1.1em;
	font-weight: 700;
	color: var(--b2bp-color-text);
	margin-bottom: 0.25em;
}

.b2bp-catalog .b2bp-price-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
}

.b2bp-catalog .b2bp-tiered-hint {
	font-size: 0.75em;
	font-weight: 400;
	color: var(--b2bp-color-primary);
}

/* ---------- Tiered pricing ---------- */

.b2bp-catalog .b2bp-product-card__tiers {
	margin-top: 0.5em;
}

.b2bp-catalog .b2bp-product-card__tiers .b2bp-tiers-toggle {
	all: unset;
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.25em 0;
	font-size: 0.8em;
	font-weight: 500;
	color: var(--b2bp-color-primary);
	cursor: pointer;
	background: none;
	border: none;
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.4;
}

.b2bp-catalog .b2bp-tiers-toggle:hover {
	text-decoration: underline;
}

.b2bp-catalog .b2bp-tiers-toggle__icon {
	font-size: 0.65em;
	transition: transform 0.2s;
}

.b2bp-catalog .b2bp-tiers-toggle[aria-expanded="true"] .b2bp-tiers-toggle__icon {
	transform: rotate(180deg);
}

.b2bp-catalog .b2bp-tiers-table {
	width: 100%;
	margin-top: 0.5em;
	border-collapse: collapse;
	font-size: 0.8em;
}

.b2bp-catalog .b2bp-tiers-table th,
.b2bp-catalog .b2bp-tiers-table td {
	padding: 0.35em 0.5em;
	text-align: left;
	border-bottom: 1px solid var(--b2bp-color-border-light);
}

.b2bp-catalog .b2bp-tiers-table th {
	font-weight: 600;
	color: var(--b2bp-color-text-label);
}

/* ---------- Product Actions ---------- */

.b2bp-catalog .b2bp-product-card__actions {
	padding: 0.75em 1em 1em;
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.b2bp-catalog .b2bp-product-card__actions .b2bp-add-to-cart {
	all: unset;
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55em 1em!important;
	font-size: 0.85em!important;
	font-weight: 600!important;
	text-align: center!important;
	color: var(--b2bp-color-bg)!important;
	border: 2px solid var(--b2bp-color-text)!important;
	cursor: pointer!important;
	transition: background 0.2s, border-color 0.2s, color 0.2s!important;
	text-transform: none!important;
	letter-spacing: normal!important;
	line-height: 1.4!important;
	white-space: nowrap!important;
}

.b2bp-catalog .b2bp-product-card__actions .b2bp-add-to-cart:hover {
	background: white!important;
	border-color: black!important;
	color: black!important;
}

.b2bp-catalog .b2bp-product-card__actions .b2bp-add-to-cart.adding {
	opacity: 0.6;
	pointer-events: none;
}

.b2bp-catalog .b2bp-product-card__actions .b2bp-add-to-cart.added {
	background: var(--b2bp-color-success);
	border-color: var(--b2bp-color-success);
	color: #fff;
}

.b2bp-catalog .b2bp-out-of-stock {
	color: var(--b2bp-color-error);
	font-size: 0.85em;
	font-weight: 600;
}

.b2bp-catalog .b2bp-card-notice {
	margin: 0;
	border-radius: 0;
	border-left: none;
	border-top: 1px solid var(--b2bp-color-border-light);
	font-size: 0.85em;
	padding: 0.6em 1em;
}

/* ---------- Pagination ---------- */

.b2bp-catalog .b2bp-catalog__pagination {
	margin-top: 2em;
	text-align: center;
}

.b2bp-catalog .b2bp-catalog__pagination ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: center;
	gap: 0.3em;
}

.b2bp-catalog .b2bp-catalog__pagination li {
	display: inline;
}

.b2bp-catalog .b2bp-catalog__pagination a,
.b2bp-catalog .b2bp-catalog__pagination span {
	display: inline-block;
	padding: 0.4em 0.8em;
	border: 1px solid var(--b2bp-color-input-border);
	border-radius: var(--b2bp-radius);
	text-decoration: none;
	color: var(--b2bp-color-text);
	font-size: 0.9em;
	background: var(--b2bp-color-bg);
	transition: background 0.15s, border-color 0.15s;
}

.b2bp-catalog .b2bp-catalog__pagination a:hover {
	background: var(--b2bp-color-bg-muted);
	border-color: var(--b2bp-color-text-muted);
}

.b2bp-catalog .b2bp-catalog__pagination .current {
	background: var(--b2bp-color-primary);
	border-color: var(--b2bp-color-primary);
	color: #fff;
}

/* ---------- Loading Spinner ---------- */

.b2bp-catalog .b2bp-catalog__loading {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.b2bp-catalog .b2bp-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--b2bp-color-border);
	border-top-color: var(--b2bp-color-primary);
	border-radius: 50%;
	animation: b2bp-spin 0.6s linear infinite;
}

@keyframes b2bp-spin {
	to { transform: rotate(360deg); }
}

/* ---------- Registration Form ---------- */

.b2bp-register {
	padding: 20px 0 40px 0;
	max-width: 700px;
}

.b2bp-register__success {
	padding: 0.5em 0;
}

.b2bp-register__success .b2bp-notice {
	padding: 1.5em;
}

.b2bp-register__success-title {
	margin: 0 0 0.5em 0;
	font-size: 1.25em;
	font-weight: 600;
}

.b2bp-register__success p {
	margin: 0;
}

.b2bp-form__fieldset {
	border: 1px solid var(--b2bp-color-border);
	border-radius: var(--b2bp-radius-lg);
	padding: 1.5em;
	margin-bottom: 1.5em;
}

.b2bp-form__fieldset legend {
	font-weight: 600;
	font-size: 1em;
	padding: 0 0.5em;
}

.b2bp-form__row {
	display: flex;
	flex-direction: column;
	gap: 1em;
	margin-bottom: 1em;
}

.b2bp-form__field {
	flex: 1;
}

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

.b2bp-form__field label {
	display: block;
	margin-bottom: 0.3em;
	font-size: 0.9em;
	font-weight: 500;
}

.b2bp-form__field .required {
	color: var(--b2bp-color-error);
}

.b2bp-form__field input,
.b2bp-form__field select {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid var(--b2bp-color-input-border);
	border-radius: var(--b2bp-radius);
	font-size: 0.95em;
}

.b2bp-form__field input:focus,
.b2bp-form__field select:focus {
	border-color: var(--b2bp-color-primary);
	outline: none;
	box-shadow: 0 0 0 2px var(--b2bp-color-primary-alpha);
}

.b2bp-form__field input.error {
	border-color: var(--b2bp-color-error);
}

/* ---------- Password strength meter ---------- */

.b2bp-password-hint {
	display: block;
	margin-top: 0.3em;
	font-size: 0.8em;
	color: var(--b2bp-color-text-muted, #666);
	line-height: 1.4;
}

.b2bp-password-meter {
	margin-top: 0.5em;
	height: 4px;
	background: var(--b2bp-color-input-border, #ddd);
	border-radius: 2px;
	overflow: hidden;
}

.b2bp-password-meter__bar {
	height: 100%;
	width: 0;
	background: transparent;
	transition: width 0.2s, background 0.2s;
}

.b2bp-password-meter__bar[data-score="-1"],
.b2bp-password-meter__bar[data-score="5"] { /* short */
	width: 15%;
	background: #d63638;
}

.b2bp-password-meter__bar[data-score="0"],
.b2bp-password-meter__bar[data-score="1"] { /* very weak / weak */
	width: 30%;
	background: #d63638;
}

.b2bp-password-meter__bar[data-score="2"] { /* medium */
	width: 55%;
	background: #dba617;
}

.b2bp-password-meter__bar[data-score="3"] { /* good */
	width: 80%;
	background: #8eb05c;
}

.b2bp-password-meter__bar[data-score="4"] { /* strong */
	width: 100%;
	background: #00a32a;
}

.b2bp-password-meter__label {
	margin: 0.35em 0 0;
	font-size: 0.8em;
	min-height: 1.1em;
	line-height: 1.3;
}

.b2bp-password-meter__label.is-short,
.b2bp-password-meter__label.is-bad {
	color: #d63638;
}

.b2bp-password-meter__label.is-weak {
	color: #dba617;
}

.b2bp-password-meter__label.is-good,
.b2bp-password-meter__label.is-strong {
	color: #1d7a3a;
}

.b2bp-password-requirements {
	margin: 0.5em 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8em;
	line-height: 1.5;
	color: var(--b2bp-color-text-muted, #666);
}

.b2bp-password-requirements li {
	padding-left: 1.4em;
	position: relative;
}

.b2bp-password-requirements li::before {
	content: "○";
	position: absolute;
	left: 0;
	top: 0;
	color: currentColor;
	opacity: 0.6;
}

.b2bp-password-requirements li.is-met {
	color: #1d7a3a;
}

.b2bp-password-requirements li.is-met::before {
	content: "✓";
	opacity: 1;
	font-weight: 700;
}

.b2bp-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	font-size: 0.9em;
	cursor: pointer;
}

.b2bp-checkbox-label input[type="checkbox"] {
	margin-top: 0.2em;
	width: auto;
}

.b2bp-form__submit {
	margin-top: 1em;
}

.b2bp-btn {
	padding: 0.7em 2em;
	border: none;
	border-radius: var(--b2bp-radius);
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

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

.b2bp-btn--primary:hover {
	background: var(--b2bp-color-primary-dark);
}

.b2bp-btn--primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.b2bp-form__messages {
	margin-bottom: 1em;
}

@media (min-width: 601px) {
	.b2bp-form__row {
		flex-direction: row;
	}
}

/* ---------- Account Dashboard ---------- */

.b2bp-account {
	max-width: 900px;
}

.b2bp-account__header {
	display: flex;
	align-items: center;
	gap: 1em;
	margin-bottom: 1.5em;
	flex-wrap: wrap;
}

.b2bp-badge {
	display: inline-block;
	padding: 0.25em 0.75em;
	border-radius: 99px;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
}

.b2bp-badge--approved {
	background: var(--b2bp-color-success-bg);
	color: var(--b2bp-color-success-text);
}

.b2bp-badge--pending {
	background: var(--b2bp-color-warning-bg);
	color: var(--b2bp-color-warning-text);
}

.b2bp-badge--rejected {
	background: var(--b2bp-color-error-bg);
	color: var(--b2bp-color-error-text);
}

/* Tabs */

.b2bp-account__tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid var(--b2bp-color-border);
	margin-bottom: 1.5em;
}

.b2bp-account__tab {
	all: unset;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.75em 1.25em;
	font-size: 0.95em;
	font-weight: 500;
	color: var(--b2bp-color-text-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.2s, border-color 0.2s;
}

.b2bp-account__tab:hover {
	color: var(--b2bp-color-text);
}

.b2bp-account__tab--active {
	color: var(--b2bp-color-primary);
	border-bottom-color: var(--b2bp-color-primary);
	font-weight: 600;
}

.b2bp-account__tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4em;
	height: 1.4em;
	padding: 0 0.4em;
	font-size: 0.75em;
	font-weight: 600;
	background: var(--b2bp-color-bg-muted);
	color: var(--b2bp-color-text-muted);
	border-radius: 99px;
}

.b2bp-account__tab--active .b2bp-account__tab-count {
	background: var(--b2bp-color-primary-alpha);
	color: var(--b2bp-color-primary);
}

/* Panels */

.b2bp-account__panel[hidden] {
	display: none;
}

/* Stats */

.b2bp-account__stats {
	display: flex;
	gap: 1.5em;
	margin-bottom: 2em;
	flex-wrap: wrap;
}

.b2bp-account__stat {
	flex: 1;
	min-width: 140px;
	background: var(--b2bp-color-bg-muted);
	border-radius: var(--b2bp-radius-lg);
	padding: 1.25em 1em;
	text-align: center;
}

.b2bp-account__stat-value {
	display: block;
	font-size: 1.4em;
	font-weight: 700;
	color: var(--b2bp-color-text);
	margin-bottom: 0.15em;
}

.b2bp-account__stat-label {
	display: block;
	font-size: 0.8em;
	color: var(--b2bp-color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Account info table */

.b2bp-account__info {
	margin-bottom: 2em;
}

.b2bp-account__table {
	width: 100%;
	max-width: 500px;
	border-collapse: collapse;
}

.b2bp-account__table th,
.b2bp-account__table td {
	padding: 0.6em 1em;
	text-align: left;
	border-bottom: 1px solid var(--b2bp-color-border-light);
}

.b2bp-account__table th {
	font-weight: 600;
	color: var(--b2bp-color-text-label);
	width: 150px;
}

/* Orders table */

.b2bp-account__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.b2bp-account__orders-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.b2bp-account__orders-table th,
.b2bp-account__orders-table td {
	padding: 0.75em 1em;
	text-align: left;
	border-bottom: 1px solid var(--b2bp-color-border-light);
	white-space: nowrap;
}

.b2bp-account__orders-table thead th {
	font-weight: 600;
	color: var(--b2bp-color-text-label);
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.b2bp-account__orders-table a {
	color: var(--b2bp-color-primary);
	text-decoration: none;
	font-weight: 600;
}

.b2bp-account__orders-table a:hover {
	text-decoration: underline;
}

/* Order status badges */

.b2bp-order-status {
	display: inline-block;
	padding: 0.2em 0.6em;
	border-radius: 99px;
	font-size: 0.8em;
	font-weight: 600;
}

.b2bp-order-status--completed {
	background: var(--b2bp-color-success-bg);
	color: var(--b2bp-color-success-text);
}

.b2bp-order-status--processing {
	background: var(--b2bp-color-info-bg);
	color: var(--b2bp-color-info-text);
}

.b2bp-order-status--on-hold {
	background: var(--b2bp-color-warning-bg);
	color: var(--b2bp-color-warning-text);
}

.b2bp-order-status--pending {
	background: var(--b2bp-color-warning-bg);
	color: var(--b2bp-color-warning-text);
}

.b2bp-order-status--cancelled,
.b2bp-order-status--failed,
.b2bp-order-status--refunded {
	background: var(--b2bp-color-error-bg);
	color: var(--b2bp-color-error-text);
}

/* View all link */

.b2bp-account__view-all {
	margin-top: 0.75em;
}

.b2bp-link-btn {
	all: unset;
	color: var(--b2bp-color-primary);
	font-weight: 500;
	font-size: 0.9em;
	cursor: pointer;
}

.b2bp-link-btn:hover {
	text-decoration: underline;
}

/* Small button variant */

.b2bp-btn--small {
	padding: 0.35em 0.9em;
	font-size: 0.8em;
	border-radius: var(--b2bp-radius);
	background: var(--b2bp-color-bg-muted);
	color: var(--b2bp-color-text);
	border: 1px solid var(--b2bp-color-border);
	text-decoration: none;
	font-weight: 500;
	transition: background 0.15s, border-color 0.15s;
	display: inline-block;
}

.b2bp-btn--small:hover {
	background: var(--b2bp-color-bg-hover);
	border-color: var(--b2bp-color-text-muted);
	text-decoration: none;
}

@media (max-width: 600px) {
	.b2bp-hide-mobile {
		display: none;
	}

	.b2bp-account__stats {
		flex-direction: column;
	}

	.b2bp-account__stat {
		min-width: 0;
	}

	.b2bp-account__orders-table th,
	.b2bp-account__orders-table td {
		padding: 0.5em 0.6em;
		font-size: 0.85em;
	}
}

/* ---------- No Results ---------- */

.b2bp-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3em 1em;
	color: var(--b2bp-color-text-muted);
	font-size: 1em;
}

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

.b2bp-login {
	max-width: 440px;
}

.b2bp-login__footer {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
}

.b2bp-login__lost-password {
	font-size: 0.875em;
	color: var(--b2bp-color-primary);
	text-decoration: none;
}

.b2bp-login__lost-password:hover,
.b2bp-login__lost-password:focus-visible {
	text-decoration: underline;
}

.b2bp-login__register-link {
	margin-top: 1.25em;
	font-size: 0.9em;
	color: var(--b2bp-color-text-muted);
}

.b2bp-login__register-link a {
	color: var(--b2bp-color-primary);
	text-decoration: none;
}

.b2bp-login__register-link a:hover,
.b2bp-login__register-link a:focus-visible {
	text-decoration: underline;
}

@media (max-width: 480px) {
	.b2bp-login__footer {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ---------- View Order ---------- */

.b2bp-view-order {
	display: flex;
	flex-direction: column;
	gap: 1.75em;
}

.b2bp-view-order__back {
	margin: 0;
}

.b2bp-view-order__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1em;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--b2bp-color-border);
	padding-bottom: 1em;
}

.b2bp-view-order__title {
	margin: 0 0 0.35em;
	font-size: 1.5em;
}

.b2bp-view-order__meta {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.75em;
	flex-wrap: wrap;
	color: var(--b2bp-color-text-muted);
}

.b2bp-view-order__date {
	font-size: 0.95em;
}

.b2bp-view-order__note {
	background: var(--b2bp-color-surface-muted, #f7f7f7);
	padding: 1em 1.25em;
	border-radius: var(--b2bp-radius, 4px);
}

.b2bp-view-order__note h3 {
	margin-top: 0;
	margin-bottom: 0.5em;
	font-size: 1em;
}

.b2bp-view-order__items h3,
.b2bp-view-order__address h3 {
	margin: 0 0 0.75em;
	font-size: 1.1em;
}

.b2bp-view-order__items-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.b2bp-view-order__items-table th,
.b2bp-view-order__items-table td {
	padding: 0.75em 0.5em;
	text-align: left;
	border-bottom: 1px solid var(--b2bp-color-border);
	vertical-align: top;
}

.b2bp-view-order__items-table thead th {
	font-weight: 600;
	color: var(--b2bp-color-text-muted);
	text-transform: uppercase;
	font-size: 0.8em;
	letter-spacing: 0.04em;
}

.b2bp-view-order__items-table tfoot th,
.b2bp-view-order__items-table tfoot td {
	padding: 0.65em 0.5em;
	border-bottom: none;
	text-align: right;
}

.b2bp-view-order__items-table tfoot th {
	font-weight: 500;
	color: var(--b2bp-color-text-muted);
}

.b2bp-view-order__total-row--order_total th,
.b2bp-view-order__total-row--order_total td {
	border-top: 2px solid var(--b2bp-color-border);
	padding-top: 1em;
	font-weight: 700;
	color: var(--b2bp-color-text, inherit);
	font-size: 1.05em;
}

.b2bp-view-order__addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5em;
}

.b2bp-view-order__address address {
	font-style: normal;
	line-height: 1.6;
	color: var(--b2bp-color-text);
}

@media (max-width: 640px) {
	.b2bp-view-order__addresses {
		grid-template-columns: 1fr;
	}

	.b2bp-view-order__items-table thead {
		display: none;
	}

	.b2bp-view-order__items-table,
	.b2bp-view-order__items-table tbody,
	.b2bp-view-order__items-table tr,
	.b2bp-view-order__items-table td {
		display: block;
		width: 100%;
	}

	.b2bp-view-order__items-table tbody tr {
		border-bottom: 1px solid var(--b2bp-color-border);
		padding: 0.75em 0;
	}

	.b2bp-view-order__items-table tbody td {
		border: none;
		padding: 0.25em 0;
	}

	.b2bp-view-order__items-table tfoot {
		display: table-footer-group;
	}
}
