/**
 * Catalogue shop — Midi Marketplace
 */

/* Carte : hauteur égale sur toute la ligne, actions alignées en bas */
body.midi-catalog-page.woocommerce ul.products li.product .product-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	background-color: #fff;
	border: 1px solid #ebebeb;
	border-radius: 12px;
	padding: 12px 12px 14px !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.midi-catalog-page.woocommerce ul.products li.product .product-inner:hover {
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

/* Bloc détails : occupe l'espace restant pour pousser prix/bouton en bas */
body.midi-catalog-page.woocommerce ul.products li.product .mf-product-details {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

/* Zone image uniforme : carré 1:1, sans rognage, fond blanc */
body.midi-catalog-page.woocommerce ul.products li.product .mf-product-thumbnail {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin-bottom: 10px;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

body.midi-catalog-page.woocommerce ul.products li.product .mf-product-thumbnail > a {
	display: block;
	width: 100%;
	height: 100%;
}

body.midi-catalog-page.woocommerce ul.products li.product .mf-product-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
	box-sizing: border-box;
}

/* Réserve la place du bloc note pour aligner les prix même sans avis */
body.midi-catalog-page.woocommerce ul.products li.product .star-rating,
body.midi-catalog-page.woocommerce ul.products li.product .mf-product-rating {
	margin: 2px 0 4px;
}

/* Prix + actions poussés en bas de carte */
body.midi-catalog-page.woocommerce ul.products li.product .mf-product-price-box {
	margin-top: auto;
}

body.midi-catalog-page.woocommerce ul.products li.product .price {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
}

body.midi-catalog-page.woocommerce ul.products li.product .price ins {
	color: var(--midi-orange, #ff6b00) !important;
	text-decoration: none;
}

body.midi-catalog-page.woocommerce ul.products li.product .price del {
	font-size: 13px;
	color: #999;
	font-weight: 400;
}

body.midi-catalog-page.woocommerce ul.products li.product .woo-loop-product__title {
	margin: 0 0 4px;
}

body.midi-catalog-page.woocommerce ul.products li.product .woo-loop-product__title a {
	display: block;
	color: #1a1a1a;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.midi-catalog-page.woocommerce ul.products li.product .woo-loop-product__title a:hover {
	color: var(--midi-orange, #ff6b00);
}

/* Bandeau confiance */
.midi-catalog-trust-band {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin: 0 0 18px;
	padding: 12px 14px;
	background: #fff8f3;
	border: 1px solid #ffe0cc;
	border-radius: 10px;
}

.midi-catalog-trust-band__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #555;
}

.midi-catalog-trust-band__item .icon {
	color: var(--midi-orange, #ff6b00);
	font-size: 15px;
}

.midi-catalog-trust-band__item a {
	color: var(--midi-orange, #ff6b00);
	text-decoration: none;
}

.midi-catalog-trust-band__item a:hover {
	text-decoration: underline;
}

/* Toolbar */
body.midi-catalog-page #mf-catalog-toolbar.shop-toolbar {
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 18px;
}

body.midi-catalog-page #mf-catalog-toolbar .products-found {
	font-size: 13px;
	color: #666;
}

body.midi-catalog-page #mf-catalog-toolbar .products-found strong {
	color: #1a1a1a;
	margin-right: 4px;
}

body.midi-catalog-page #mf-catalog-toolbar .mf-filter-mobile {
	color: #444;
	font-weight: 600;
}

body.midi-catalog-page #mf-catalog-toolbar .mf-filter-mobile:hover {
	color: var(--midi-orange, #ff6b00);
}

body.midi-catalog-page .mf-catalog-title,
body.midi-catalog-page .woocommerce-products-header__title {
	font-size: 22px;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 12px;
}

/* SEO catégorie */
.midi-catalog-seo {
	margin: 28px 0 0;
	padding: 24px 0 0;
	border-top: 1px solid #ececec;
}

.midi-catalog-seo__title {
	margin: 0 0 10px;
	padding-left: 14px;
	border-left: 4px solid var(--midi-orange, #ff6b00);
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
}

.midi-catalog-seo__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	max-width: 720px;
}

/* =========================================================
   Barre latérale catalogue — design Midi (cartes épurées)
   ========================================================= */

body.midi-catalog-page .primary-sidebar {
	font-size: 14px;
}

/* Chaque widget = carte blanche cohérente avec les cartes produit */
body.midi-catalog-page .primary-sidebar .widget {
	margin-bottom: 16px;
	padding: 16px 16px 18px;
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Titre de widget : accent orange + typo charte */
body.midi-catalog-page .primary-sidebar .widget-title {
	position: relative;
	margin: 0 0 14px;
	padding: 0 0 10px 12px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #1a1a1a;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border-bottom: 1px solid #f0f0f0;
}

body.midi-catalog-page .primary-sidebar .widget-title::before {
	content: "";
	position: absolute;
	top: 1px;
	left: 0;
	width: 4px;
	height: 15px;
	border-radius: 3px;
	background: var(--midi-orange, #ff6b00);
}

/* Listes génériques (catégories, marques, layered nav) */
body.midi-catalog-page .primary-sidebar .widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Ligne de liste : le <li> porte la mise en page (le compteur est frère du lien) */
body.midi-catalog-page .primary-sidebar .widget ul li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 0 1px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	font-size: 13.5px;
	line-height: 1.4;
	transition: background-color 0.15s ease;
}

body.midi-catalog-page .primary-sidebar .widget ul li:hover {
	background: #fff5ee;
}

body.midi-catalog-page .primary-sidebar .widget ul li > a {
	flex: 1 1 auto;
	min-width: 0;
	padding: 7px 8px;
	color: #444;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.15s ease;
}

body.midi-catalog-page .primary-sidebar .widget ul li:hover > a {
	color: var(--midi-orange, #ff6b00);
}

body.midi-catalog-page .primary-sidebar .widget ul li > .count {
	flex: 0 0 auto;
	margin: 0 8px 0 4px;
	min-width: 24px;
	padding: 1px 8px;
	background: #f3f4f6;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	color: #888;
	text-align: center;
}

body.midi-catalog-page .primary-sidebar .widget ul li:hover > .count {
	background: #ffe3cf;
	color: var(--midi-orange, #ff6b00);
}

/* Sous-liste catégories : bascule pleine largeur sous le parent */
body.midi-catalog-page .primary-sidebar .widget ul li > ul.children {
	flex: 0 0 100%;
	width: 100%;
}

/* Élément sélectionné (chosen / catégorie courante) */
body.midi-catalog-page .primary-sidebar .woocommerce-widget-layered-nav-list__item.chosen,
body.midi-catalog-page .primary-sidebar .product-categories li.current-cat {
	background: #fff1e7;
}

body.midi-catalog-page .primary-sidebar .woocommerce-widget-layered-nav-list__item.chosen > a,
body.midi-catalog-page .primary-sidebar .product-categories li.current-cat > a {
	color: var(--midi-orange, #ff6b00);
	font-weight: 600;
}

body.midi-catalog-page .primary-sidebar .woocommerce-widget-layered-nav-list__item.chosen > a::before {
	content: "\2715";
	margin-right: 5px;
	font-size: 11px;
	color: var(--midi-orange, #ff6b00);
}

/* Catégories : sous-listes indentées */
body.midi-catalog-page .primary-sidebar .product-categories .children {
	margin-left: 10px;
	padding-left: 8px;
	border-left: 1px dashed #eee;
}

/* Champ de recherche des attributs */
body.midi-catalog-page .primary-sidebar .search_layered_nav {
	margin-bottom: 10px;
}

body.midi-catalog-page .primary-sidebar .mf-input-search-nav {
	width: 100%;
	height: 36px;
	padding: 0 12px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	font-size: 13px;
	color: #333;
	background: #fafafa;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.midi-catalog-page .primary-sidebar .mf-input-search-nav:focus {
	outline: none;
	border-color: var(--midi-orange, #ff6b00);
	box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
	background: #fff;
}

/* Zone scrollable des attributs longs */
body.midi-catalog-page .primary-sidebar .mf-widget-layered-nav-scroll {
	overflow-y: auto;
	padding-right: 4px;
}

body.midi-catalog-page .primary-sidebar .mf-widget-layered-nav-scroll::-webkit-scrollbar {
	width: 6px;
}

body.midi-catalog-page .primary-sidebar .mf-widget-layered-nav-scroll::-webkit-scrollbar-thumb {
	background: #dcdcdc;
	border-radius: 6px;
}

/* Swatches couleur */
body.midi-catalog-page .primary-sidebar .woocommerce-widget-layered-nav-list__item.show-swatch {
	display: inline-block;
	margin: 0 6px 6px 0;
}

body.midi-catalog-page .primary-sidebar .swatch-color {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 10px 5px 5px;
	border: 1px solid #ececec;
	border-radius: 20px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.midi-catalog-page .primary-sidebar .swatch-color .sub-swatch {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: inset 0 0 0 2px #fff;
}

body.midi-catalog-page .primary-sidebar .swatch-color .term-name {
	font-size: 12.5px;
	color: #555;
}

body.midi-catalog-page .primary-sidebar .show-swatch a:hover .swatch-color,
body.midi-catalog-page .primary-sidebar .show-swatch.chosen .swatch-color {
	border-color: var(--midi-orange, #ff6b00);
	box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.15);
}

body.midi-catalog-page .primary-sidebar .show-swatch a:hover .term-name,
body.midi-catalog-page .primary-sidebar .show-swatch.chosen .term-name {
	color: var(--midi-orange, #ff6b00);
}

/* Filtres actifs : puces supprimables */
body.midi-catalog-page .primary-sidebar .widget_layered_nav_filters ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body.midi-catalog-page .primary-sidebar .widget_layered_nav_filters li {
	margin: 0;
}

body.midi-catalog-page .primary-sidebar .widget_layered_nav_filters li a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px 5px 12px;
	background: #fff1e7;
	border: 1px solid #ffd9bf;
	border-radius: 20px;
	color: #c2410c;
	font-size: 12.5px;
	font-weight: 600;
}

body.midi-catalog-page .primary-sidebar .widget_layered_nav_filters li a::after {
	content: "\2715";
	font-size: 10px;
	line-height: 1;
	opacity: 0.7;
}

body.midi-catalog-page .primary-sidebar .widget_layered_nav_filters li a:hover {
	background: var(--midi-orange, #ff6b00);
	border-color: var(--midi-orange, #ff6b00);
	color: #fff;
}

/* Dernière puce = « Supprimer tous les filtres » */
body.midi-catalog-page .primary-sidebar .widget_layered_nav_filters li:last-child a {
	background: #f3f4f6;
	border-color: #e5e7eb;
	color: #555;
}

body.midi-catalog-page .primary-sidebar .widget_layered_nav_filters li:last-child a:hover {
	background: #1a1a1a;
	border-color: #1a1a1a;
	color: #fff;
}

/* Filtre par note : étoiles alignées */
body.midi-catalog-page .primary-sidebar .widget_martfury_rating_filter li a {
	padding: 6px 8px;
}

body.midi-catalog-page .primary-sidebar .widget_martfury_rating_filter .star-rating {
	color: #ffb100;
	margin: 0;
	font-size: 15px;
}

/* Filtre par prix : slider aux couleurs Midi */
body.midi-catalog-page .primary-sidebar .price_slider_wrapper {
	padding-top: 4px;
}

body.midi-catalog-page .primary-sidebar .price_slider.ui-slider {
	position: relative;
	height: 5px;
	margin: 14px 6px 18px;
	background: #ececec;
	border: 0;
	border-radius: 4px;
}

body.midi-catalog-page .primary-sidebar .price_slider .ui-slider-range {
	position: absolute;
	height: 5px;
	background: var(--midi-orange, #ff6b00);
	border-radius: 4px;
}

body.midi-catalog-page .primary-sidebar .price_slider .ui-slider-handle {
	width: 16px;
	height: 16px;
	top: -6px;
	margin-left: -8px;
	background: #fff;
	border: 3px solid var(--midi-orange, #ff6b00);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

body.midi-catalog-page .primary-sidebar .price_slider_amount {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

body.midi-catalog-page .primary-sidebar .price_slider_amount .price_label {
	order: 1;
	width: 100%;
	font-size: 13px;
	color: #444;
}

body.midi-catalog-page .primary-sidebar .price_slider_amount .price_label span {
	font-weight: 700;
	color: #1a1a1a;
}

body.midi-catalog-page .primary-sidebar .price_slider_amount .button {
	order: 2;
	padding: 8px 18px;
	background: #1a1a1a;
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

body.midi-catalog-page .primary-sidebar .price_slider_amount .button:hover {
	background: var(--midi-orange, #ff6b00);
}

/* =========================================================
   Page boutique vendeur (Dokan) — en-tête moderne Midi
   ========================================================= */

.dokan-single-store .profile-frame {
	margin-bottom: 26px;
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

.dokan-single-store .profile-frame .profile-info-box {
	position: relative;
	padding: 0;
}

/* Bannière */
.dokan-single-store .profile-frame .profile-info-img {
	display: block !important;
	width: 100% !important;
	height: 230px !important;
	margin: 0 !important;
	object-fit: cover;
}

.dokan-single-store .profile-frame .profile-info-img.dummy-image {
	height: 170px !important;
	background: linear-gradient(120deg, #1a1a1a 0%, var(--midi-orange, #ff6b00) 120%);
}

/* Bloc infos sous la bannière */
.dokan-single-store .profile-frame .profile-info-summery-wrapper {
	padding: 0 28px 24px !important;
	background: #fff;
}

.dokan-single-store .profile-frame .profile-info-summery {
	display: block;
}

/* En-tête : avatar + nom */
.dokan-single-store .profile-frame .profile-info-head {
	display: flex !important;
	float: none !important;
	align-items: flex-end;
	gap: 18px;
	margin: 0;
}

.dokan-single-store .profile-frame .profile-img {
	flex: 0 0 auto;
	margin: -62px 0 0 !important;
	padding: 0;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
}

.dokan-single-store .profile-frame .profile-img img {
	display: block;
	width: 116px;
	height: 116px;
	border-radius: 50%;
	border: 5px solid #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
	background: #fff;
	object-fit: cover;
}

.dokan-single-store .profile-frame .store-name {
	margin: 0 0 8px !important;
	padding: 0;
	font-size: 24px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	color: #1a1a1a !important;
	text-transform: none !important;
}

/* Ligne d'informations (adresse, tel, email, note) */
.dokan-single-store .profile-frame .profile-info {
	float: none !important;
	width: auto !important;
	margin: 0;
}

.dokan-single-store .profile-frame .dokan-store-info {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
	margin: 16px 0 0 !important;
	padding: 16px 0 0 !important;
	border-top: 1px solid #f0f0f0;
	list-style: none;
}

.dokan-single-store .profile-frame .dokan-store-info > li {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	font-size: 13.5px;
	color: #555;
}

.dokan-single-store .profile-frame .dokan-store-info > li i {
	color: var(--midi-orange, #ff6b00);
	font-size: 15px;
}

.dokan-single-store .profile-frame .dokan-store-info a {
	color: #555;
	text-decoration: none;
}

.dokan-single-store .profile-frame .dokan-store-info a:hover {
	color: var(--midi-orange, #ff6b00);
}

/* Neutralise le séparateur d'origine sur la note */
.dokan-single-store .profile-frame .dokan-store-info .dokan-store-rating {
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 0 !important;
}

.dokan-single-store .profile-frame .dokan-store-info .star-rating {
	color: #ffb100;
	float: none;
}

/* Réseaux sociaux : pastilles rondes */
.dokan-single-store .profile-frame .store-social-wrapper {
	margin-top: 14px;
}

.dokan-single-store .profile-frame ul.store-social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dokan-single-store .profile-frame ul.store-social li {
	margin: 0;
}

.dokan-single-store .profile-frame ul.store-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #f3f4f6;
	color: #555;
	font-size: 15px;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.dokan-single-store .profile-frame ul.store-social a:hover {
	background: var(--midi-orange, #ff6b00);
	color: #fff;
	transform: translateY(-2px);
}

/* Onglets boutique : navigation soulignée moderne */
.dokan-single-store .dokan-store-tabs {
	margin: 0 0 26px !important;
	padding: 0 4px;
	background: transparent !important;
	border-bottom: 2px solid #eee;
}

.dokan-single-store .dokan-store-tabs ul.dokan-list-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin: 0;
	padding: 0;
}

.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li {
	margin: 0 !important;
	padding: 0;
	border: 0 !important;
	float: none;
}

.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li > a {
	display: block;
	position: relative;
	padding: 13px 18px !important;
	font-size: 14.5px !important;
	font-weight: 600 !important;
	color: #666 !important;
	background: transparent !important;
	border-radius: 8px 8px 0 0;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li > a::after {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: -2px;
	height: 2px;
	background: transparent;
	transition: background-color 0.15s ease;
}

.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li > a:hover {
	color: #1a1a1a !important;
	background: #faf6f2 !important;
}

.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li.active > a,
.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li.dokan-active > a,
.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li.current-menu-item > a {
	color: var(--midi-orange, #ff6b00) !important;
}

.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li.active > a::after,
.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li.dokan-active > a::after,
.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li.current-menu-item > a::after {
	background: var(--midi-orange, #ff6b00);
}

/* Barre de tri/recherche produits boutique */
.dokan-store-products-filter-area {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.dokan-store-products-filter-area .orderby-search,
.dokan-store-products-filter-area select {
	border: 1px solid #e2e2e2 !important;
	border-radius: 8px !important;
	padding: 9px 30px 9px 14px !important;
	font-size: 13px;
	background-color: #fff;
}

@media (max-width: 767px) {
	.midi-catalog-trust-band {
		flex-direction: column;
		gap: 8px;
	}

	.dokan-single-store .profile-frame .profile-info-img {
		height: 150px !important;
	}

	.dokan-single-store .profile-frame .profile-info-summery-wrapper {
		padding: 0 16px 20px !important;
	}

	.dokan-single-store .profile-frame .profile-img img {
		width: 90px;
		height: 90px;
	}

	.dokan-single-store .profile-frame .store-name {
		font-size: 20px !important;
	}

	.dokan-single-store .dokan-store-tabs ul.dokan-list-inline {
		flex-wrap: nowrap;
		overflow-x: auto;
	}

	.dokan-single-store .dokan-store-tabs ul.dokan-list-inline > li > a {
		white-space: nowrap;
	}

	.midi-catalog-trust-band__item {
		font-size: 11px;
	}

	body.midi-catalog-page.woocommerce ul.products li.product .product-inner {
		border-radius: 10px;
		padding: 10px 10px 12px !important;
	}

	body.midi-catalog-page.woocommerce ul.products li.product .woo-loop-product__title a {
		font-size: 13px;
	}

	body.midi-catalog-page #mf-catalog-toolbar.shop-toolbar {
		border-radius: 0;
		border-left: none;
		border-right: none;
	}
}
