/**
 * Dobbiz buyer-facing front-end styles.
 *
 * Covers the vendor directory (shortcode) and the single vendor detail page.
 */

.dobbiz-directory,
.dobbiz-vendor-single {
	--dobbiz-border: #e6e6e6;
	--dobbiz-muted: #6b7280;
	--dobbiz-text: #1f2933;
	--dobbiz-accent: #111827;
	box-sizing: border-box;
	color: var(--dobbiz-text);
}

.dobbiz-directory *,
.dobbiz-vendor-single * {
	box-sizing: border-box;
}

/* Themes routinely underline every link in the content area, and they usually
   do it with a more specific selector than anything here — so the product views
   state it outright: no underlines, in any state. */
.dobbiz-vendor-single a,
.dobbiz-vendor-single a:link,
.dobbiz-vendor-single a:visited,
.dobbiz-vendor-single a:hover,
.dobbiz-vendor-single a:focus,
.dobbiz-vendor-single a:active,
.dobbiz-products-block a,
.dobbiz-products-block a:link,
.dobbiz-products-block a:visited,
.dobbiz-products-block a:hover,
.dobbiz-products-block a:focus,
.dobbiz-products-block a:active {
	text-decoration: none !important;
}

/* -------------------------------------------------------------------------
 * Directory: layout
 * ---------------------------------------------------------------------- */

.dobbiz-directory {
	display: flex;
	align-items: flex-start;
	gap: 48px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 0 48px;
}

.dobbiz-directory-filters {
	flex: 0 0 240px;
	position: sticky;
	top: 24px;
}

.dobbiz-directory-main {
	flex: 1 1 auto;
	min-width: 0;
}

.dobbiz-directory-heading,
.dobbiz-directory-filters h3 {
	margin: 0 0 20px;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--dobbiz-accent);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

/* -------------------------------------------------------------------------
 * Directory: filters
 * ---------------------------------------------------------------------- */

.dobbiz-directory-filters ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dobbiz-directory-filters li {
	margin: 0;
	border-bottom: 1px solid var(--dobbiz-border);
}

.dobbiz-directory-filters label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 2px;
	font-size: 15px;
	color: var(--dobbiz-text);
	cursor: pointer;
	transition: color 0.15s ease;
}

.dobbiz-directory-filters label:hover {
	color: #000;
}

.dobbiz-directory-filters input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--dobbiz-accent);
	flex: 0 0 auto;
}

/* -------------------------------------------------------------------------
 * Directory: vendor cards
 * ---------------------------------------------------------------------- */

.dobbiz-vendor-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 32px;
}

.dobbiz-vendor-card {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.dobbiz-vendor-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	margin-bottom: 18px;
	border-radius: 14px;
	overflow: hidden;
}

.dobbiz-vendor-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dobbiz-vendor-card__initial {
	font-size: 56px;
	font-weight: 700;
	color: #c3c8ce;
	line-height: 1;
}

.dobbiz-vendor-card__title {
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
}

.dobbiz-vendor-card__title a {
	color: var(--dobbiz-text);
	text-decoration: none;
}

.dobbiz-vendor-card__title a:hover {
	opacity: 0.7;
}

.dobbiz-vendor-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px;
}

.dobbiz-vendor-card__tag {
	padding: 3px 10px;
	background: #f0f1f3;
	border-radius: 999px;
	font-size: 12px;
	color: var(--dobbiz-muted);
	line-height: 1.6;
}

.dobbiz-vendor-card__intro {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--dobbiz-muted);
}

.dobbiz-vendor-card__btn {
	align-self: flex-start;
	margin-top: auto;
	padding: 9px 22px;
	background: #e9eaec;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	color: #4b5563;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.dobbiz-vendor-card__btn:hover {
	background: var(--dobbiz-accent);
	color: #fff;
}

.dobbiz-empty {
	padding: 48px 0;
	color: var(--dobbiz-muted);
	font-size: 16px;
}

/* -------------------------------------------------------------------------
 * Directory: pagination
 * ---------------------------------------------------------------------- */

.dobbiz-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px;
}

.dobbiz-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--dobbiz-border);
	border-radius: 8px;
	font-size: 14px;
	color: var(--dobbiz-text);
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dobbiz-page:hover {
	border-color: var(--dobbiz-accent);
}

.dobbiz-page.is-current {
	background: var(--dobbiz-accent);
	border-color: var(--dobbiz-accent);
	color: #fff;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
 * Single vendor: hero (two columns)
 * ---------------------------------------------------------------------- */

.dobbiz-vendor-single {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 24px 64px;
}

.dobbiz-vendor-hero {
	display: flex;
	align-items: flex-start;
	gap: 64px;
}

.dobbiz-vendor-hero__aside {
	flex: 0 0 360px;
	max-width: 360px;
	position: sticky;
	top: 24px;
	align-self: flex-start;
}

.dobbiz-vendor-hero__main {
	flex: 1 1 auto;
	min-width: 0;
}

.dobbiz-vendor-logo {
	margin-bottom: 24px;
}

.dobbiz-vendor-logo img {
	max-width: 200px;
	height: auto;
	display: block;
}

.dobbiz-vendor-title {
	margin: 0 0 16px;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.25;
}

.dobbiz-vendor-lead {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.8;
	color: var(--dobbiz-muted);
}

.dobbiz-vendor-hero__aside .dobbiz-vendor-meta {
	margin: 24px 0;
	padding-top: 24px;
	border-top: 1px solid var(--dobbiz-border);
}

.dobbiz-vendor-meta table {
	width: 100%;
	border-collapse: collapse;
}

.dobbiz-vendor-meta th,
.dobbiz-vendor-meta td {
	padding: 8px 0;
	font-size: 14px;
	text-align: left;
	vertical-align: top;
	border: 0;
}

.dobbiz-vendor-meta th {
	width: 84px;
	color: var(--dobbiz-muted);
	font-weight: 600;
	white-space: nowrap;
}

.dobbiz-vendor-meta td a {
	color: var(--dobbiz-text);
	word-break: break-all;
}

.dobbiz-vendor-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

.dobbiz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 28px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.15s ease, background 0.15s ease;
}

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

.dobbiz-btn--primary:hover {
	opacity: 0.85;
	color: #fff;
}

.dobbiz-btn--ghost {
	background: transparent;
	border: 1px solid var(--dobbiz-border);
	color: var(--dobbiz-text);
}

.dobbiz-btn--ghost:hover {
	border-color: var(--dobbiz-accent);
}

/* -------------------------------------------------------------------------
 * Single vendor: main column (intro + goods)
 * ---------------------------------------------------------------------- */

.dobbiz-vendor-section-title {
	margin: 0 0 24px;
	font-size: 26px;
	font-weight: 700;
}

.dobbiz-vendor-intro {
	font-size: 16px;
	line-height: 1.9;
}

.dobbiz-vendor-intro img {
	max-width: 100%;
	height: auto;
}

.dobbiz-vendor-goods {
	margin-top: 48px;
}

.dobbiz-vendor-articles {
	margin-top: 48px;
}

.dobbiz-article-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.dobbiz-article-card {
	margin: 0;
}

.dobbiz-article-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid #e6e9ee;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dobbiz-article-card__link:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.dobbiz-article-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	background: #f4f6f8;
	overflow: hidden;
}

.dobbiz-article-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dobbiz-article-card__ph {
	font-size: 14px;
	color: #b6bcc3;
}

.dobbiz-article-card__title {
	padding: 14px 16px 16px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

.dobbiz-article-back {
	margin: 0 0 12px;
	font-size: 14px;
}

.dobbiz-article-back a {
	color: var(--dobbiz-muted);
	text-decoration: none;
}

.dobbiz-article-back a:hover {
	color: inherit;
}

.dobbiz-article-title {
	margin: 0 0 24px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.3;
}

.dobbiz-article-terms {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 28px;
}

.dobbiz-article-terms__row {
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.dobbiz-article-terms__label {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--dobbiz-muted);
}

.dobbiz-article-terms__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dobbiz-article-chip {
	display: inline-block;
	padding: 3px 12px;
	font-size: 13px;
	line-height: 1.6;
	border-radius: 999px;
	background: #eef1f5;
	color: #3a4048;
}

.dobbiz-article-chip.dobbiz-article-tag {
	background: transparent;
	border: 1px solid #d7dce2;
	color: var(--dobbiz-muted);
}

.dobbiz-article-content {
	font-size: 16px;
	line-height: 1.9;
}

.dobbiz-article-content img {
	max-width: 100%;
	height: auto;
}

.dobbiz-vendor-goods ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.dobbiz-vendor-goods li {
	padding: 16px 20px;
	background: #f7f8f9;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 500;
}

/* -------------------------------------------------------------------------
 * Products: category sidebar + list (member edition)
 * ---------------------------------------------------------------------- */

.dobbiz-products-layout {
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

.dobbiz-products-sidebar {
	flex: 0 0 260px;
	max-width: 260px;
	position: sticky;
	top: 24px;
	align-self: flex-start;
}

.dobbiz-products-main {
	flex: 1 1 auto;
	min-width: 0;
}

/* Both columns start at the same line: drop the leading margin a theme puts on
   the first heading / list of each column. */
.dobbiz-vendor-single .dobbiz-products-sidebar > :first-child,
.dobbiz-vendor-single .dobbiz-products-main > :first-child,
.dobbiz-vendor-single .dobbiz-products-main .dobbiz-vendor-goods,
.dobbiz-vendor-single .dobbiz-products-main .dobbiz-vendor-cards,
.dobbiz-vendor-single .dobbiz-products-main .dobbiz-article-cards {
	margin-top: 0;
}

.dobbiz-products-layout .dobbiz-vendor-cards,
.dobbiz-products-layout .dobbiz-cat-list,
.dobbiz-products-layout .dobbiz-cat-children {
	margin: 0;
	padding-left: 0;
	list-style: none;
}

.dobbiz-products-sidebar__title {
	margin: 0;
	padding: 22px 24px;
	background: #33475b;
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.dobbiz-cat-list,
.dobbiz-cat-children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dobbiz-cat-list {
	background: #f4f5f6;
	padding: 8px 0;
}

.dobbiz-cat {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.dobbiz-cat-list > .dobbiz-cat + .dobbiz-cat,
.dobbiz-cat-children > .dobbiz-cat + .dobbiz-cat {
	border-top: 1px solid #e2e5e8;
}

.dobbiz-cat > a,
.dobbiz-cat__label {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	padding: 14px 24px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--dobbiz-text);
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: background 0.15s ease, color 0.15s ease;
}

.dobbiz-cat > a:hover {
	background: #eceef1;
	color: #000;
}

.dobbiz-cat__label {
	color: var(--dobbiz-muted);
	font-weight: 600;
	cursor: default;
}

/* Expand / collapse control for a branch with sub-categories. */
.dobbiz-cat__toggle {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}

.dobbiz-cat__toggle::before {
	content: '';
	width: 7px;
	height: 7px;
	margin-left: -3px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.15s ease;
	opacity: 0.55;
}

.dobbiz-cat.is-open > .dobbiz-cat__toggle::before {
	transform: rotate(45deg);
	margin-left: 0;
	margin-top: -3px;
}

.dobbiz-cat__toggle:hover::before {
	opacity: 1;
}

/* The sub-list takes a full row under its parent. */
.dobbiz-cat-children {
	flex: 1 0 100%;
}

.dobbiz-cat-children.is-collapsed {
	display: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Child levels are indented under their parent. */
.dobbiz-cat--depth-1 > a,
.dobbiz-cat--depth-1 > .dobbiz-cat__label {
	padding-left: 44px;
}

.dobbiz-cat--depth-2 > a,
.dobbiz-cat--depth-2 > .dobbiz-cat__label {
	padding-left: 64px;
}

.dobbiz-cat--depth-3 > a,
.dobbiz-cat--depth-3 > .dobbiz-cat__label {
	padding-left: 84px;
}

.dobbiz-cat.is-active > a {
	background: #fff;
	font-weight: 600;
	color: #000;
	/* Follows whatever colour the item ends up with, so a custom active /
	   sidebar text colour carries the accent bar with it. */
	border-left-color: currentColor;
}

/* -------------------------------------------------------------------------
 * Products block: inner blocks
 * ---------------------------------------------------------------------- */

/* Clip the heading and the menu to the sidebar's own border radius, so the
   core border support rounds the whole column. */
.dobbiz-products-sidebar {
	overflow: hidden;
	/* The default frame: the core border support writes an inline style on this
	   same element, so anything set in the editor simply wins. */
	border: 1px solid var(--dobbiz-border);
}

/* In the editor each inner block is wrapped by its own block props element,
   which takes over as the flex column. */
.dobbiz-products-layout > .dobbiz-products-sidebar-edit {
	flex: 0 0 260px;
	max-width: 260px;
}

.dobbiz-products-layout > .dobbiz-products-main-edit {
	flex: 1 1 auto;
	min-width: 0;
}

.dobbiz-products-sidebar-edit .dobbiz-products-sidebar {
	position: static;
	max-width: none;
}

/* Editor only: the parent's toolbar picks which state is being edited, so the
   blocks belonging to the other state step out of the way. */
.dobbiz-products-layout.is-editing-list > [data-type="dobbiz/product-detail"],
.dobbiz-products-detail.is-editing-detail > [data-type="dobbiz/products-sidebar"],
.dobbiz-products-detail.is-editing-detail > [data-type="dobbiz/products-list"] {
	display: none;
}

.dobbiz-products-detail.is-editing-detail > .dobbiz-product-detail-edit {
	width: 100%;
}

/* Editor only: section headings on the detail preview are editable in place. */
.dobbiz-product-detail-edit [data-heading][contenteditable='true'] {
	cursor: text;
}

.dobbiz-product-detail-edit [data-heading][contenteditable='true']:hover,
.dobbiz-product-detail-edit [data-heading][contenteditable='true']:focus {
	outline: 1px dashed currentColor;
	outline-offset: -6px;
}

.dobbiz-block-placeholder {
	padding: 24px;
	background: #f4f5f6;
	border: 1px dashed #c3c8ce;
	color: #6b7280;
	text-align: center;
}

/* -------------------------------------------------------------------------
 * Products block wrapper (block supports)
 * ---------------------------------------------------------------------- */

/* The block wrapper owns the box, so the core background / text / spacing
   supports (inline styles) win over these defaults. */
.dobbiz-products-block {
	box-sizing: border-box;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding: 48px 24px 64px;
	color: #1f2933;
}

.dobbiz-products-block.alignwide,
.dobbiz-products-block.alignfull {
	max-width: none;
}

/* The shared single-view box is neutralised inside the block: its padding,
   width and colour now come from the wrapper above. */
.dobbiz-products-block > .dobbiz-vendor-single {
	max-width: none;
	margin: 0;
	padding: 0;
	color: inherit;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
	.dobbiz-directory,
	.dobbiz-vendor-hero,
	.dobbiz-products-layout {
		flex-direction: column;
		gap: 32px;
	}

	.dobbiz-directory-filters,
	.dobbiz-vendor-hero__aside,
	.dobbiz-products-sidebar {
		flex: 1 1 auto;
		max-width: none;
		width: 100%;
		position: static;
	}
}

/* -------------------------------------------------------------------------
 * Dashboard + auth: shared tokens
 * ---------------------------------------------------------------------- */

.dobbiz-dashboard,
.dobbiz-auth {
	--dobbiz-border: #e6e6e6;
	--dobbiz-muted: #6b7280;
	--dobbiz-text: #1f2933;
	--dobbiz-accent: #111827;
	/* Match the directory: own the width so the theme's content-size constraint
	   (a low-specificity :where() rule on .entry-content > *) does not box us in. */
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
	color: var(--dobbiz-text);
}

.dobbiz-dashboard *,
.dobbiz-auth * {
	box-sizing: border-box;
}

.dobbiz-dashboard__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 0 48px;
}

.dobbiz-dashboard__layout {
	display: flex;
	align-items: flex-start;
	gap: 48px;
}

/* -------------------------------------------------------------------------
 * Dashboard: sidebar nav
 * ---------------------------------------------------------------------- */

.dobbiz-dash-nav {
	flex: 0 0 220px;
	position: sticky;
	top: 24px;
}

.dobbiz-dash-main {
	flex: 1 1 auto;
	min-width: 0;
}

.dobbiz-dash-nav__brand {
	margin-bottom: 12px;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--dobbiz-accent);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	word-break: break-word;
}

.dobbiz-dash-nav ul {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.dobbiz-dash-nav li {
	border-bottom: 1px solid var(--dobbiz-border);
}

.dobbiz-dash-nav__item {
	display: block;
	padding: 12px 2px;
	font-size: 15px;
	color: var(--dobbiz-text);
	text-decoration: none;
	transition: color 0.15s ease;
}

.dobbiz-dash-nav__item:hover {
	color: #000;
}

.dobbiz-dash-nav__item.is-active {
	font-weight: 700;
}

.dobbiz-dash-nav__logout {
	display: inline-block;
	font-size: 14px;
	color: var(--dobbiz-muted);
	text-decoration: none;
}

.dobbiz-dash-nav__logout:hover {
	color: var(--dobbiz-accent);
}

.dobbiz-dashboard__lead {
	margin: 0;
	font-size: 16px;
	line-height: 1.8;
	color: var(--dobbiz-muted);
}

.dobbiz-dashboard__lead a {
	color: var(--dobbiz-accent);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Dashboard: sections
 * ---------------------------------------------------------------------- */

.dobbiz-dash-section {
	margin-top: 0;
}

.dobbiz-dash-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--dobbiz-accent);
}

.dobbiz-dash-section__title {
	margin: 0 0 24px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--dobbiz-accent);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	flex: 1 1 auto;
}

/* Inside a head row the border lives on the row, so the underline spans full width. */
.dobbiz-dash-section__head .dobbiz-dash-section__title {
	margin: 0;
	padding: 0;
	border-bottom: 0;
}

.dobbiz-back {
	flex: 0 0 auto;
	color: var(--dobbiz-muted);
	font-size: 14px;
	text-decoration: none;
	white-space: nowrap;
}

.dobbiz-back:hover {
	color: var(--dobbiz-accent);
}

/* -------------------------------------------------------------------------
 * Dashboard: forms
 * ---------------------------------------------------------------------- */

.dobbiz-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* -------------------------------------------------------------------------
 * Dashboard: field tabs (mirrors the admin meta-box tabs)
 * ---------------------------------------------------------------------- */

.dobbiz-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--dobbiz-border);
}

.dobbiz-tabs__tab {
	appearance: none;
	margin: 0 0 -1px;
	padding: 10px 16px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	font-size: 15px;
	color: var(--dobbiz-muted);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.dobbiz-tabs__tab:hover {
	color: var(--dobbiz-text);
}

.dobbiz-tabs__tab.is-active {
	color: var(--dobbiz-accent);
	font-weight: 700;
	border-bottom-color: var(--dobbiz-accent);
}

.dobbiz-tabs__panel {
	display: none;
}

.dobbiz-tabs__panel.is-active {
	display: block;
}

.dobbiz-form__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
}

.dobbiz-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.dobbiz-form__field--wide {
	grid-column: 1 / -1;
}

/* Media (single image) + gallery fields. */
.dobbiz-media-preview img {
	border-radius: 8px;
	margin-bottom: 10px;
}

.dobbiz-media-actions,
.dobbiz-gallery-field p {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 0;
}

.dobbiz-gallery-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dobbiz-gallery-item {
	position: relative;
	width: 90px;
	height: 90px;
	border: 1px solid var(--dobbiz-border);
	border-radius: 8px;
	overflow: hidden;
}

.dobbiz-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dobbiz-gallery-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 17, 24, 39, 0.75 );
	color: #fff;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
}

.dobbiz-gallery-remove:hover {
	background: #b32d2e;
}

/* Rich-editor field: keep the wp_editor within the field column. */
.dobbiz-form__field--editor .wp-editor-wrap {
	margin-top: 6px;
}

.dobbiz-form__field--editor .wp-editor-area {
	width: 100%;
	box-sizing: border-box;
}

.dobbiz-form__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--dobbiz-text);
}

.dobbiz-form input[type="text"],
.dobbiz-form textarea,
.dobbiz-form select {
	box-sizing: border-box;
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--dobbiz-border);
	border-radius: 8px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--dobbiz-text);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Keep the native dropdown arrow while matching the text-input box height. */
.dobbiz-form select {
	height: calc( 1.5em + 22px + 2px );
	appearance: auto;
}

.dobbiz-form textarea {
	resize: vertical;
}

.dobbiz-form input[type="text"]:focus,
.dobbiz-form textarea:focus,
.dobbiz-form select:focus {
	border-color: var(--dobbiz-accent);
	box-shadow: 0 0 0 1px var(--dobbiz-accent);
	outline: none;
}

.dobbiz-form__check {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	cursor: pointer;
}

.dobbiz-form__check input {
	width: 16px;
	height: 16px;
	accent-color: var(--dobbiz-accent);
}

.dobbiz-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 6px;
}

.dobbiz-btn--sm {
	padding: 8px 20px;
	font-size: 14px;
}

/* -------------------------------------------------------------------------
 * Dashboard: notices + product cards
 * ---------------------------------------------------------------------- */

.dobbiz-notice {
	margin: 24px 0 0;
	padding: 12px 18px;
	border-radius: 8px;
	font-size: 14px;
}

.dobbiz-notice--ok {
	background: #edf7ed;
	color: #1e6b2a;
}

.dobbiz-notice--error {
	background: #fceceb;
	color: #a3271f;
}

.dobbiz-goods-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.dobbiz-goods-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--dobbiz-border);
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.dobbiz-goods-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 2;
	background: #f4f5f6;
	overflow: hidden;
}

.dobbiz-goods-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dobbiz-goods-card__ph {
	font-size: 14px;
	color: #b6bcc3;
}

.dobbiz-goods-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding: 16px 20px 18px;
}

.dobbiz-goods-card__name {
	font-size: 16px;
	font-weight: 600;
}

.dobbiz-goods-card__sku {
	font-size: 13px;
	color: var(--dobbiz-muted);
}

.dobbiz-goods-card__edit {
	align-self: flex-start;
	margin-top: 12px;
}

.dobbiz-goods-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.dobbiz-inline-form {
	display: inline;
	margin: 0;
}

.dobbiz-btn--danger {
	color: #c0392b;
	border-color: #e2b6b0;
}

.dobbiz-btn--danger:hover {
	background: #fbeae7;
	border-color: #c0392b;
}

.dobbiz-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
}

.dobbiz-checkboxes .dobbiz-form__check {
	flex: 0 0 auto;
}

@media (max-width: 640px) {
	.dobbiz-goods-cards {
		grid-template-columns: 1fr;
	}
}

.dobbiz-table-wrap {
	overflow-x: auto;
}

.dobbiz-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.dobbiz-table th,
.dobbiz-table td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid #e6e9ee;
}

.dobbiz-table thead th {
	font-size: 13px;
	font-weight: 600;
	color: var(--dobbiz-muted);
	background: #f7f9fb;
	white-space: nowrap;
}

.dobbiz-table tbody tr:hover {
	background: #fafbfc;
}

.dobbiz-articles-table__thumb {
	width: 72px;
}

.dobbiz-articles-table__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	font-size: 12px;
	color: #b6bcc3;
	background: #f4f6f8;
	border-radius: 6px;
}

.dobbiz-articles-table__actions {
	white-space: nowrap;
}

.dobbiz-articles-table__actions .dobbiz-btn {
	vertical-align: middle;
}

.dobbiz-articles-table__actions .dobbiz-inline-form {
	margin-left: 6px;
}

/* -------------------------------------------------------------------------
 * Auth: login form
 * ---------------------------------------------------------------------- */

.dobbiz-auth__inner {
	max-width: 1000px;
	margin: 0 auto;
	padding: 8px 0 48px;
}

.dobbiz-auth__inner--narrow {
	max-width: 440px;
}

.dobbiz-auth__title {
	margin: 0 0 8px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
}

.dobbiz-auth__lead {
	margin: 0 0 28px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--dobbiz-muted);
}

.dobbiz-auth__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.dobbiz-login {
	padding: 28px;
	border: 1px solid var(--dobbiz-border);
	border-radius: 14px;
	background: #fff;
}

.dobbiz-login p {
	margin: 0 0 18px;
}

.dobbiz-login label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--dobbiz-text);
}

.dobbiz-login input[type="text"],
.dobbiz-login input[type="password"] {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--dobbiz-border);
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dobbiz-login input[type="text"]:focus,
.dobbiz-login input[type="password"]:focus {
	border-color: var(--dobbiz-accent);
	box-shadow: 0 0 0 1px var(--dobbiz-accent);
	outline: none;
}

.dobbiz-login .login-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-weight: 400;
	color: var(--dobbiz-muted);
}

.dobbiz-login .login-remember input {
	width: auto;
}

.dobbiz-login .login-submit {
	margin-bottom: 0;
}

.dobbiz-login #wp-submit {
	width: 100%;
	padding: 12px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--dobbiz-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.dobbiz-login #wp-submit:hover {
	opacity: 0.85;
}

@media (max-width: 900px) {
	.dobbiz-dashboard__inner,
	.dobbiz-auth__inner {
		padding-left: 16px;
		padding-right: 16px;
	}

	.dobbiz-dashboard__layout {
		flex-direction: column;
		gap: 24px;
	}

	.dobbiz-dash-nav {
		flex: 1 1 auto;
		width: 100%;
		position: static;
	}
}

/* -------------------------------------------------------------------------
 * Member edition: products / company / articles (reuses the directory look)
 * ---------------------------------------------------------------------- */

.dobbiz-products,
.dobbiz-articles,
.dobbiz-product,
.dobbiz-company,
.dobbiz-article {
	--dobbiz-border: #e6e6e6;
	--dobbiz-muted: #6b7280;
	--dobbiz-text: #1f2933;
	--dobbiz-accent: #111827;
	box-sizing: border-box;
	color: var(--dobbiz-text);
	max-width: 1200px;
	margin: 0 auto;
}

.dobbiz-products *,
.dobbiz-articles *,
.dobbiz-product *,
.dobbiz-company *,
.dobbiz-article * {
	box-sizing: border-box;
}

/* Product list: same card grid as the directory. */
.dobbiz-products {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 32px;
}

.dobbiz-product-item {
	margin: 0;
}

.dobbiz-product-item > a {
	display: flex;
	flex-direction: column;
	color: var(--dobbiz-text);
	text-decoration: none;
}

.dobbiz-product-item img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: #f4f5f6;
	border-radius: 14px;
	margin-bottom: 14px;
	display: block;
}

.dobbiz-product-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
}

.dobbiz-product-item > a:hover .dobbiz-product-title {
	opacity: 0.7;
}

/* Single product / company / article detail. */
.dobbiz-product,
.dobbiz-company,
.dobbiz-article {
	max-width: 820px;
	padding: 8px 0 48px;
}

.dobbiz-product h2,
.dobbiz-company h2,
.dobbiz-article h2 {
	margin: 0 0 20px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
}

.dobbiz-product img,
.dobbiz-company img,
.dobbiz-article img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
	margin-bottom: 20px;
}

.dobbiz-content {
	font-size: 16px;
	line-height: 1.8;
	color: var(--dobbiz-text);
}

/* Article list: clean stacked links. */
.dobbiz-articles {
	list-style: none;
	padding: 0;
}

.dobbiz-article-item {
	margin: 0;
	border-bottom: 1px solid var(--dobbiz-border);
}

.dobbiz-article-item a {
	display: block;
	padding: 16px 0;
	font-size: 17px;
	font-weight: 500;
	color: var(--dobbiz-text);
	text-decoration: none;
}

.dobbiz-article-item a:hover {
	color: var(--dobbiz-accent);
}

/* Not-found message mirrors the empty-state style. */
.dobbiz-not-found {
	padding: 48px 0;
	color: var(--dobbiz-muted);
	font-size: 16px;
}

/* Member: product detail back link. */
.dobbiz-back {
	margin: 0 0 20px;
	font-size: 14px;
}

.dobbiz-back a {
	color: var(--dobbiz-muted, #6b7280);
	text-decoration: none;
}

.dobbiz-back a:hover {
	color: var(--dobbiz-accent, #111827);
}

/* -------------------------------------------------------------------------
 * Member: rich product detail + full company fields
 * ---------------------------------------------------------------------- */

/* A selected product takes the whole page: no category column beside it. */
.dobbiz-products-detail {
	display: block;
}

.dobbiz-goods-detail {
	display: block;
	width: 100%;
}

/* Hero: gallery on the left, the short summary on the right. */
.dobbiz-goods-detail__hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

@media (max-width: 782px) {
	.dobbiz-goods-detail__hero {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

/* First image leads at full width; the rest follow as a thumbnail strip. */
.dobbiz-goods-detail__gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	align-self: start;
}

.dobbiz-goods-detail__gallery .dobbiz-goods-detail__img:first-child {
	grid-column: 1 / -1;
}

.dobbiz-goods-detail__img {
	margin: 0;
	padding: 24px;
	border-radius: 14px;
	overflow: hidden;
}

.dobbiz-goods-detail__gallery .dobbiz-goods-detail__img:first-child img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	border-radius: 0;
}

.dobbiz-goods-detail__gallery .dobbiz-goods-detail__img:not(:first-child) {
	padding: 8px;
}

.dobbiz-goods-detail__gallery .dobbiz-goods-detail__img:not(:first-child) img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	border-radius: 0;
}

.dobbiz-goods-detail__img img {
	width: 100%;
	height: auto;
	border-radius: 14px;
	display: block;
}

.dobbiz-goods-detail__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	background: #f4f5f6;
	border-radius: 14px;
	color: #c3c8ce;
	font-size: 16px;
}

.dobbiz-goods-detail__title {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--dobbiz-text, #1f2933);
}

.dobbiz-goods-detail__price {
	margin: 0 0 20px;
	font-size: 22px;
	font-weight: 700;
	color: #d64541;
}

.dobbiz-goods-detail__summary {
	min-width: 0;
	color: var(--dobbiz-text, #1f2933);
}

/* The title, the categories and the summary read as stacked rows. */
.dobbiz-goods-detail__title {
	padding-bottom: 16px;
	border-bottom: 1px solid var(--dobbiz-border, #e6e6e6);
}

.dobbiz-goods-detail__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 16px 0 0;
	font-size: 15px;
	line-height: 1.7;
}

.dobbiz-goods-detail__cats-label {
	color: var(--dobbiz-muted, #6b7280);
	font-weight: 500;
	white-space: nowrap;
}

.dobbiz-goods-detail__excerpt {
	margin: 16px 0 0;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--dobbiz-border, #e6e6e6);
}

.dobbiz-goods-detail__excerpt p {
	margin: 0;
	font-size: 15px;
	line-height: 1.9;
	color: var(--dobbiz-muted, #6b7280);
}

.dobbiz-goods-detail__spec,
.dobbiz-vendor-fields {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 24px;
	font-size: 15px;
}

.dobbiz-goods-detail__spec th,
.dobbiz-vendor-fields th {
	width: 120px;
	text-align: left;
	vertical-align: top;
	padding: 8px 12px 8px 0;
	color: var(--dobbiz-muted, #6b7280);
	font-weight: 500;
	white-space: nowrap;
}

.dobbiz-goods-detail__spec td,
.dobbiz-vendor-fields td {
	padding: 8px 0;
	vertical-align: top;
}

.dobbiz-goods-detail__sections {
	margin-top: 56px;
}

.dobbiz-goods-detail__block + .dobbiz-goods-detail__block {
	margin-top: 40px;
}

/* Section heading: a full-width bar, matching the sidebar heading. */
.dobbiz-goods-detail__section {
	margin: 40px 0 24px;
	padding: 16px 24px;
	background: #33475b;
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
}

.dobbiz-goods-detail__sections > :first-child > .dobbiz-goods-detail__section,
.dobbiz-goods-detail__sections > .dobbiz-goods-detail__section:first-child {
	margin-top: 0;
}

.dobbiz-goods-detail__block-body {
	font-size: 16px;
	line-height: 1.8;
	color: var(--dobbiz-text, #1f2933);
}

.dobbiz-goods-detail__block-body h1,
.dobbiz-goods-detail__block-body h2 {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.4;
}

.dobbiz-goods-detail__block-body h3,
.dobbiz-goods-detail__block-body h4 {
	margin: 20px 0 8px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
}

.dobbiz-goods-detail__block-body > :first-child {
	margin-top: 0;
}

/* The spec table sits inside a full-width section now. */
.dobbiz-goods-detail__spec {
	margin-bottom: 0;
}

.dobbiz-goods-detail__spec tr + tr th,
.dobbiz-goods-detail__spec tr + tr td {
	border-top: 1px solid var(--dobbiz-border, #e6e6e6);
}

.dobbiz-goods-detail__spec th {
	width: 160px;
	padding: 12px 16px 12px 0;
}

.dobbiz-goods-detail__spec td {
	padding: 12px 0;
	color: var(--dobbiz-text, #1f2933);
}

.dobbiz-goods-detail__videos {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.dobbiz-goods-detail__video iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 12px;
}

/* Editor stand-in for a video embed (the canvas iframe cannot play one). */
.dobbiz-video-still {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	background: #1f2933;
	border-radius: 12px;
	overflow: hidden;
}

.dobbiz-video-still img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dobbiz-video-still__url {
	padding: 0 24px;
	color: #c3c8ce;
	font-size: 14px;
	word-break: break-all;
	text-align: center;
}

.dobbiz-video-still__note {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	padding: 6px 14px;
	background: rgba(0, 0, 0, 0.72);
	border-radius: 999px;
	color: #fff;
	font-size: 13px;
	white-space: nowrap;
}

.dobbiz-goods-detail__files {
	margin: 0;
	padding-left: 20px;
}

.dobbiz-goods-faq {
	border-top: 1px solid var(--dobbiz-border, #e6e6e6);
	padding: 16px 0;
}

.dobbiz-goods-faq__q {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
}

.dobbiz-goods-faq__a {
	color: var(--dobbiz-muted, #6b7280);
	line-height: 1.7;
}

/* Clickable product pills in the company page 產品 section. */
.dobbiz-vendor-goods ul li a {
	color: inherit;
	text-decoration: none;
}

.dobbiz-vendor-goods ul li a:hover {
	opacity: 0.7;
}

/* Member: muted sub-text (contact person phone/email). */
.dobbiz-muted {
	color: var(--dobbiz-muted, #6b7280);
	font-size: 13px;
}

/* Member: article list at the bottom of the company page. */
.dobbiz-company-articles {
	margin-top: 56px;
}

/* Member: single-article page (single centered column). */
.dobbiz-article-single {
	max-width: 820px;
}

/* Member: single-article featured image. */
.dobbiz-article-featured {
	margin: 0 0 24px;
}

.dobbiz-article-featured img {
	width: 100%;
	height: auto;
	border-radius: 14px;
	display: block;
}
