/* =========================================================================
 * The Store — marketplace listing (reproduction of Figma node 1179-4789)
 * Design tokens:
 *   Purple (primary) .. #6843b8    Orange (tag) ...... #f7941f
 *   Card border ....... #c4cad4    Icon border ....... #dce0e5
 *   Title ............. #22272f    Body text ......... #454f5f
 *   Heading ........... #181818
 * ====================================================================== */

.ts-marketplace {
	--ts-purple: #6843b8;
	--ts-orange: #f7941f;
	--ts-card-border: #c4cad4;
	--ts-icon-border: #dce0e5;
	--ts-title: #22272f;
	--ts-body: #454f5f;
	--ts-heading: #181818;

	display: block;
	width: 100%;
	padding: 48px 24px 80px;
	box-sizing: border-box;
	color: var(--ts-body);
}

.ts-marketplace *,
.ts-marketplace *::before,
.ts-marketplace *::after {
	box-sizing: border-box;
}

.ts-container {
	max-width: 1260px;
	margin: 0 auto;
}

/* ---------------------------------------------------------------- Filters */
.ts-toolbar {
	margin: 0 0 44px;
}

.ts-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
}

/* Reset button — shown by JS only when a filter is active */
.ts-reset-wrap {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
}

.ts-reset {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: var(--ts-purple);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 6px 4px;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.ts-reset:hover {
	color: #573a97;
}

.ts-filter {
	position: relative;
	flex: 1 1 220px;
	min-width: 0;
	display: flex;
	align-items: center;
	background: #fff;
	border: 0.5px solid rgba(104, 67, 184, 0.1);
	box-shadow: 0 2px 7px rgba(104, 67, 184, 0.1);
	border-radius: 14px;
	padding: 13px 20px;
}

.ts-input,
.ts-select {
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--ts-purple);
	font-size: 16px;
	font-weight: 500;
	line-height: 26px;
	font-family: inherit;
}

.ts-input::placeholder {
	color: var(--ts-purple);
	opacity: 1;
}

/* Kill any theme default border on the raw input/select (e.g. 1px solid #666);
   the visible border is the purple 0.5px one on the .ts-filter box. */
.ts-marketplace .ts-filter input.ts-input,
.ts-marketplace .ts-filter select.ts-select {
	border: 0;
	box-shadow: none;
	outline: 0;
	background: transparent;
}

.ts-filter--search .ts-input {
	padding-right: 24px;
}

.ts-ico--search {
	position: absolute;
	right: 20px;
	pointer-events: none;
}

/* Native select styled to match the mockup */
.ts-filter--select .ts-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 24px;
	cursor: pointer;
}

.ts-filter--select::after {
	content: "";
	position: absolute;
	right: 20px;
	width: 14px;
	height: 14px;
	background: var(--ts-chevron) center / contain no-repeat;
	pointer-events: none;
}

/* --------------------------------------------------------------- Sections */
.ts-sections {
	display: flex;
	flex-direction: column;
	gap: 44px;
}

.ts-section {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ts-section-head {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ts-cat-title {
	margin: 0;
	font-size: 28px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--ts-heading);
}

.ts-subgroup {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ts-subcat-title {
	margin: 0;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--ts-heading);
}

/* ------------------------------------------------------------------- Grid */
.ts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 24px;
}

/* ------------------------------------------------------------------- Card */
.ts-card {
	display: flex;
	flex-direction: column;
	gap: 28px;
	padding: 24px;
	background: #fff;
	border: 1px solid var(--ts-card-border);
	border-radius: 24px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ts-card:hover {
	border-color: rgba(104, 67, 184, 0.35);
	box-shadow: 0 10px 28px rgba(104, 67, 184, 0.12);
	transform: translateY(-2px);
}

.ts-card__icon {
	width: 64px;
	height: 64px;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ts-icon-border);
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
}

.ts-card__logo {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
}

.ts-card__placeholder {
	font-size: 28px;
	font-weight: 700;
	color: var(--ts-purple);
	text-transform: uppercase;
}

.ts-card__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1 1 auto;
}

/* Pill row: category pad + optional "Partenaire" badge */
.ts-card__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ts-card__tag {
	align-self: flex-start;
	border: 0.5px solid var(--ts-orange);
	border-radius: 60px;
	padding: 2px;
}

.ts-card__tag span {
	display: inline-flex;
	align-items: center;
	background: rgba(247, 148, 31, 0.1);
	color: var(--ts-orange);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	padding: 4px 12px;
	border-radius: 99px;
}

.ts-card__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ts-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 24px;
	color: var(--ts-title);
}

.ts-card__desc {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	color: var(--ts-body);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ts-card__btn {
	align-self: flex-start;
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--ts-purple);
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	padding: 8px 16px;
	border-radius: 99px;
	transition: background 0.2s ease;
}

.ts-card__btn:hover {
	background: #573a97;
	color: #fff;
}

.ts-card__btn .ts-ico {
	transition: transform 0.2s ease;
}

.ts-card__btn:hover .ts-ico {
	transform: translateX(3px);
}

/* -------------------------------------------------------------- Voir plus */
.ts-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

.ts-more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: 1px solid var(--ts-purple);
	color: var(--ts-purple);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	padding: 10px 12px 10px 20px;
	border-radius: 70px;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s ease, color 0.2s ease;
}

.ts-more:hover {
	background: rgba(104, 67, 184, 0.08);
}

/* ------------------------------------------------------------ Empty state */
.ts-empty {
	text-align: center;
	font-size: 16px;
	color: var(--ts-body);
	padding: 40px 0;
}

/* --------------------------------------------------------- JS visibility */
.ts-hidden,
.ts-overflow {
	display: none !important;
}

/* -------------------------------------------------- Filter slide animation */
@keyframes tsSlideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ts-card.ts-animate {
	animation: tsSlideDown 0.28s ease both;
}

@media (prefers-reduced-motion: reduce) {
	.ts-card.ts-animate {
		animation: none;
	}
}

/* --------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
	.ts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.ts-marketplace {
		padding: 32px 16px 64px;
	}
	.ts-filter {
		flex: 1 1 100%;
	}
	.ts-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.ts-cat-title {
		font-size: 24px;
	}
	.ts-subcat-title {
		font-size: 20px;
	}
}
