/* Cmsmart Marketplace Store: storefront, sellers directory, become-a-seller page, store 404 (MS3).
   Loaded on those pages only, after home.css (buttons, eyebrow, section heads). Tokens come from theme.json and style.css. */

.cs-mkt-store,
.cs-mkt-sell-page__in,
.cs-mkt-sellers__list {
	padding-left: var(--cs-mkt-pad, 20px);
	padding-right: var(--cs-mkt-pad, 20px);
}
.cmkit {
	--cmkit-primary-soft: var(--wp--preset--color--surface);
}

/* ---------- title band (sellers directory) ---------- */
.cs-mkt-pagehead {
	padding-left: var(--cs-mkt-pad, 20px);
	padding-right: var(--cs-mkt-pad, 20px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.cs-mkt-pagehead .wp-block-post-title {
	margin: 0 !important;
	font-family: var(--cs-font-heading);
	font-weight: 700;
}
.cs-mkt-pagehead__lead {
	max-width: 62ch;
	margin: 12px 0 0 !important;
	color: var(--wp--preset--color--muted);
	font-size: 1.0625rem;
	line-height: 1.6;
}
.cs-mkt-pagehead__more {
	margin: 8px 0 0 !important;
}

/* ---------- storefront header: inset navy panel + banner ---------- */
.cs-mkt-store .cmmk-store__head {
	display: grid;
	grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
	grid-template-areas: "id banner";
	overflow: hidden;
	margin-bottom: 8px;
	border-radius: 14px;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
}
.cs-mkt-store .cmmk-store__banner {
	grid-area: banner;
	position: relative;
	height: auto;
	min-height: 260px;
	border-radius: 0;
	background: var(--wp--preset--color--surface);
}
.cs-mkt-store .cmmk-store__banner.is-empty {
	background: var(--wp--preset--color--surface) url("../images/store-banner-fallback.webp") center / cover no-repeat;
}
.cs-mkt-store .cmmk-store__banner-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cs-mkt-store .cmmk-store__id {
	grid-area: id;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 16px;
	margin: 0;
	padding: 28px;
}
.cs-mkt-store .cmmk-store__logo {
	width: 72px;
	height: 72px;
	border: 3px solid var(--wp--preset--color--base);
	background: var(--wp--preset--color--primary);
	box-shadow: none;
}
.cs-mkt-store .cmmk-store__initial {
	color: var(--wp--preset--color--contrast);
	font-family: var(--cs-font-heading);
	font-size: 28px;
}
.cs-mkt-store .cmmk-store__title {
	flex: 0 1 auto;
	padding-top: 0;
}
.cs-mkt-store .cmmk-store__title h1,
.cs-mkt-store .cmmk-store__title h2 {
	margin: 0;
	color: var(--wp--preset--color--base);
	font-family: var(--cs-font-heading);
	font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
	font-weight: 700;
	line-height: 1.15;
}
.cs-mkt-store .cmmk-store__head .cmkit-muted,
.cs-mkt-store .cmmk-store__head .cmmk-rating {
	color: var(--wp--custom--navy--200, #dbe0e8);
}
.cs-mkt-store .cmmk-store__head .cmkit-chip {
	border: 1px solid var(--wp--preset--color--cyan);
	background: transparent;
	color: var(--wp--preset--color--cyan);
}
.cs-mkt-store .cmmk-store__follow {
	margin: 0;
	padding: 0;
	width: auto;
}
.cs-mkt-store .cmmk-store__follow .cmkit-btn {
	min-height: 44px;
	border-color: var(--wp--preset--color--cyan);
	background: var(--wp--preset--color--cyan);
	color: var(--wp--preset--color--navy);
	font-weight: 600;
	text-decoration: none;
}
.cs-mkt-store .cmmk-store__follow .cmkit-btn[aria-pressed="true"] {
	background: transparent;
	color: var(--wp--preset--color--cyan);
}
.cs-mkt-store .cmmk-store__follow .cmmk-follow__note {
	color: var(--wp--custom--navy--200, #dbe0e8);
}
.cs-mkt-store .cmmk-store__follow .cmkit-btn:hover {
	border-color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--navy);
}

/* ---------- storefront body ---------- */
.cs-mkt-store .cmmk-notice {
	margin-top: 16px;
}
.cs-mkt-store .cmmk-tabs {
	margin-top: 20px;
}
.cs-mkt-store .cmmk-tabs__link.is-current,
.cmmk-tabs__link.is-current {
	border-bottom-color: var(--cs-orange-icon, #d17a02);
	border-bottom-width: 3px;
}
.cmmk-filter input[type="search"],
.cmmk-filter select {
	min-height: 44px;
	border-radius: 12px;
}
.cmmk-filter .cmkit-btn,
.cmmk-filter__reset {
	min-height: 44px;
}
.cmmk-filter__check {
	min-height: 44px;
}
.cmmk-card {
	border-radius: 14px;
}
.cmmk-card__title {
	font-family: var(--cs-font-heading);
	font-weight: 700;
}
.cmmk-card__cta a {
	min-height: 44px;
	color: var(--wp--preset--color--primary-dark);
	font-weight: 600;
}
.cmmk-card__banner:has(.cmmk-card__placeholder) {
	display: none;
}
.cmmk-pager__link {
	min-width: 44px;
	min-height: 44px;
}

/* ---------- sellers directory ---------- */
.cs-mkt-sellers .cmmk-grid--sellers {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
.cs-mkt-sellers .cmmk-card--seller {
	display: flex;
	flex-direction: column;
	padding: 12px;
}
.cs-mkt-sellers .cmmk-card--seller .cmmk-card__cta {
	margin-top: auto;
	padding-top: 12px;
}

/* ---------- become a seller ---------- */
.cs-mkt-sell-page .cs-mkt-sec:first-child {
	margin-top: 32px;
}
.cs-mkt-sellhero__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	padding: 28px 20px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	background: var(--wp--preset--color--tertiary);
}
.cs-mkt-sellhero__title {
	margin: 0 0 14px;
	font-family: var(--cs-font-heading);
	font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
}
.cs-mkt-sellhero__lead {
	max-width: 58ch;
	margin: 0 0 20px;
	color: var(--wp--preset--color--muted);
	font-size: 1.0625rem;
	line-height: 1.6;
}
.cs-mkt-sellhero__types {
	display: grid;
	gap: 12px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
.cs-mkt-sellhero__types li {
	padding: 16px 18px;
	border: 1px solid var(--wp--preset--color--border);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
}
.cs-mkt-sellhero__type {
	margin: 0 0 4px;
	font-family: var(--cs-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
}
.cs-mkt-sellhero__types p {
	margin: 0;
	line-height: 1.55;
}
.cs-mkt-sellhero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
	margin: 0;
}
.cs-mkt-sellhero__note {
	margin: 0;
	font-weight: 600;
}
.cs-mkt-sellhero__photo {
	margin: 0;
}
.cs-mkt-sellhero__photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 520px;
	border-radius: 14px;
	object-fit: cover;
}
.cs-mkt-sellsteps__list {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: sellstep;
}
.cs-mkt-sellsteps__item {
	position: relative;
	padding: 20px 20px 20px 72px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	background: var(--wp--preset--color--base);
	counter-increment: sellstep;
}
.cs-mkt-sellsteps__item::before {
	content: counter(sellstep);
	position: absolute;
	top: 18px;
	left: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
	font-family: var(--cs-font-heading);
	font-size: 1.0625rem;
	font-weight: 700;
}
.cs-mkt-sellsteps__title {
	margin: 0 0 4px;
	font-family: var(--cs-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
}
.cs-mkt-sellsteps__item p {
	margin: 0;
	line-height: 1.55;
}
.cs-mkt-sellfees__lead {
	margin: 0 0 16px;
	color: var(--wp--preset--color--muted);
}
.cs-mkt-sellfees .cmkit-table {
	width: 100%;
	border-collapse: collapse;
}
.cs-mkt-sellfees .cmkit-table th,
.cs-mkt-sellfees .cmkit-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: left;
}
.cs-mkt-sellfees .cmkit-table thead th {
	background: var(--wp--preset--color--tertiary);
}
.cs-mkt-sellneed__list {
	display: grid;
	gap: 12px;
	max-width: 760px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cs-mkt-sellneed__list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	line-height: 1.55;
}
.cs-mkt-sellneed__list .cs-mkt-icon {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	color: var(--wp--preset--color--success);
}
.cs-mkt-sellfaq__list {
	max-width: 820px;
	border-top: 1px solid var(--wp--preset--color--border);
}
.cs-mkt-sellfaq__item {
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.cs-mkt-sellfaq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	padding: 12px 0;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
.cs-mkt-sellfaq__item summary::-webkit-details-marker {
	display: none;
}
.cs-mkt-sellfaq__item summary .cs-mkt-icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	color: var(--cs-orange-icon, #d17a02);
	transition: transform 0.2s ease;
}
.cs-mkt-sellfaq__item[open] summary .cs-mkt-icon {
	transform: rotate(180deg);
}
.cs-mkt-sellfaq__item p {
	margin: 0 0 16px;
	line-height: 1.6;
}
.cs-mkt-sellapply .cmmk-apply {
	max-width: 760px;
}
.cs-mkt-sellapply .cmmk-form input[type="text"],
.cs-mkt-sellapply .cmmk-form input[type="email"],
.cs-mkt-sellapply .cmmk-form input[type="url"],
.cs-mkt-sellapply .cmmk-form select,
.cs-mkt-sellapply .cmmk-form textarea {
	min-height: 44px;
	max-width: 100%;
	font-size: 1rem;
}
.cs-mkt-sellapply .cmmk-form legend {
	font-family: var(--cs-font-heading);
	font-weight: 700;
}
.cs-mkt-sellapply .cmmk-form .cmmk-check label {
	min-height: 44px;
	align-items: center;
}
.cs-mkt-sellapply .cmmk-form .cmmk-check input {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin-top: 0;
}
.cs-mkt-sellapply .cmkit-btn {
	min-height: 48px;
	padding: 0 24px;
}
.cs-mkt-sellapply .cmkit-page-title {
	font-family: var(--cs-font-heading);
	font-weight: 700;
}
.cs-mkt-sell-page [id] {
	scroll-margin-top: 24px;
}

/* ---------- store 404 ---------- */
.cs-mkt-404__inner {
	text-align: center;
}
.cs-mkt-404__inner h1 {
	margin-top: 0;
	font-family: var(--cs-font-heading);
	font-weight: 700;
}
.cs-mkt-404__actions {
	justify-content: center;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
}
.cs-mkt-store__away {
	justify-content: flex-start;
	margin-top: 24px;
}

@media (min-width: 900px) {
	.cs-mkt-sellhero__card {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		gap: 40px;
		padding: 40px;
	}
	.cs-mkt-sellhero__types {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.cs-mkt-sellsteps__list {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
	.cs-mkt-sellsteps__item {
		padding: 68px 18px 20px;
	}
	.cs-mkt-sellsteps__item::before {
		top: 20px;
		left: 18px;
	}
}
@media (max-width: 899px) {
	.cs-mkt-sellers .cmmk-grid--sellers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 700px) {
	.cs-mkt-store .cmmk-store__head {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "banner" "id";
	}
	.cs-mkt-store .cmmk-store__banner {
		min-height: 0;
		aspect-ratio: 4 / 3;
	}
	.cs-mkt-store .cmmk-store__id {
		padding: 20px;
	}
	.cs-mkt-store .cmmk-store__follow,
	.cs-mkt-store .cmmk-store__follow .cmkit-btn {
		width: 100%;
	}
	.cs-mkt-sellers .cmmk-grid--sellers {
		grid-template-columns: minmax(0, 1fr);
	}
	.cs-mkt-sellers .cmmk-filter select,
	.cs-mkt-sellers .cmmk-filter input[type="search"],
	.cs-mkt-sellers .cmmk-filter .cmkit-btn {
		flex: 1 1 100%;
	}
}
@media (prefers-reduced-motion: reduce) {
	.cs-mkt-sellfaq__item summary .cs-mkt-icon {
		transition: none;
	}
}
