/* ==========================================================================
   Mista Benji's Bazaar — structure commune à tous les habillages
   (les couleurs et typographies sont dans assets/css/skins/*.css)
   ========================================================================== */

/* En-tête de la démo : bandeau promo, bouton « Explore Shop », réseaux vides */
body.mbb-clean-header #header [data-row="top"],
body.mbb-clean-header #header .ct-header-text,
body.mbb-clean-header #header .ct-header-cta,
body.mbb-clean-header #header .ct-header-socials,
body.mbb-clean-header #offcanvas .ct-header-text,
body.mbb-clean-header #offcanvas .ct-header-cta,
body.mbb-clean-header #offcanvas .ct-header-socials {
	display: none !important;
}

/* En-tête « transparent » de la démo sur l'accueil : il passait par-dessus la bannière */
body.mbb #header [data-transparent] { position: relative !important; }

/* Nom écrit à la place du logo « Garderobe » de la démo */
body.mbb-text-logo .site-branding .site-logo-container img { display: none !important; }
body.mbb-text-logo .site-branding .site-logo-container::after {
	content: "Mista Benji's Bazaar";
	display: inline-block;
	font-family: var(--mbb-logo-font, inherit);
	font-size: var(--mbb-logo-size, 26px);
	font-weight: var(--mbb-logo-weight, 400);
	letter-spacing: var(--mbb-logo-spacing, .02em);
	text-transform: var(--mbb-logo-case, uppercase);
	line-height: 1;
	color: var(--mbb-logo-color, currentColor);
	white-space: nowrap;
}
@media (max-width: 689px) {
	body.mbb-text-logo .site-branding .site-logo-container::after { font-size: calc(var(--mbb-logo-size, 26px) * .8); }
}

/* Le pied de page de la démo est remplacé par celui du Bazaar */
body.mbb #footer.ct-footer { display: none !important; }

/* Pages du plugin : pas de marges de page Blocksy */
body.mbb-page .site-main > .ct-container,
body.mbb-page .site-main > .ct-container-full { padding: 0 !important; max-width: none !important; }

/* --------------------------------------------------------------------------
   Mise en page
   ----------------------------------------------------------------------- */

.mbb-wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.mbb-narrow { max-width: 760px; }
.mbb-center { text-align: center; }
.mbb-section { padding: clamp(56px, 8vw, 104px) 0; }
.mbb-section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.mbb-title { margin: 0 0 24px; }
.mbb-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 24px; margin-bottom: 36px; }
.mbb-head .mbb-kicker { flex-basis: 100%; }
.mbb-head .mbb-title { margin: 0; flex: 1; }
.mbb-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.mbb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; text-decoration: none !important; }
.mbb-split { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.mbb-service .mbb-split { grid-template-columns: 1fr 1fr; }
.mbb-service--alt .mbb-split > :first-child { order: 2; }
.mbb-split--contact { align-items: start; grid-template-columns: 1.3fr .7fr; }
.mbb-prose { max-width: 40em; }
.mbb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mbb-card { display: flex; flex-direction: column; text-decoration: none !important; }
.mbb-card__more { margin-top: auto; padding-top: 12px; }
.mbb-card--big { min-height: 300px; justify-content: flex-end; }
.mbb-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.mbb-infos ul { list-style: none; margin: 0 0 24px; padding: 0; }
.mbb-infos li span { display: block; }
.mbb-photo { margin: 0; }
.mbb-photo img { display: block; width: 100%; height: auto; }
.mbb-mix iframe { display: block; width: 100%; border: 0; }
.mbb-form .wpforms-container { margin: 0 !important; }
.mbb-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.mbb-form textarea,
.mbb-form select { width: 100% !important; max-width: 100% !important; }

/* Grille de vignettes produits du plugin */
.mbb-pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.mbb-pgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mbb-pcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none !important; color: inherit !important; }
.mbb-pcard__img { position: relative; display: block; overflow: hidden; }
.mbb-pcard__img img { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; transition: transform .4s ease; }
.mbb-pcard:hover .mbb-pcard__img img { transform: scale(1.04); }
.mbb-pcard__badge { position: absolute; top: 10px; left: 10px; }
.mbb-pcard__price del { opacity: .55; margin-right: 6px; }
.mbb-pcard__price ins { text-decoration: none; }

/* Carrousel horizontal */
.mbb-rail { position: relative; }
.mbb-rail__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * 24px) / 4);
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.mbb-rail__track::-webkit-scrollbar { display: none; }
.mbb-rail__track > * { scroll-snap-align: start; }
.mbb-rail__btn {
	position: absolute;
	top: 38%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	cursor: pointer;
	font-size: 26px;
	line-height: 1;
}
.mbb-rail__btn--prev { left: -18px; }
.mbb-rail__btn--next { right: -18px; }
.mbb-rail.is-start .mbb-rail__btn--prev,
.mbb-rail.is-end .mbb-rail__btn--next { opacity: 0; pointer-events: none; }

/* Bandeau défilant */
.mbb-marquee { overflow: hidden; }
.mbb-marquee__track { display: flex; width: max-content; gap: 28px; animation: mbb-scroll 40s linear infinite; }
@keyframes mbb-scroll { to { transform: translateX(-50%); } }

/* Pied de page */
.mbb-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-bottom: 48px; }
.mbb-footer ul { list-style: none; margin: 0; padding: 0; }
.mbb-footer li { margin: 0 0 8px; }
.mbb-footer a { text-decoration: none; }
.mbb-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 20px 0 28px; font-size: 13px; }

/* Fiches produits WooCommerce : images de même taille */
body.mbb ul.products li.product img,
body.mbb [data-products] .product figure img { width: 100%; aspect-ratio: 1; height: auto; object-fit: contain; }

@media (prefers-reduced-motion: reduce) {
	.mbb-marquee__track { animation: none; }
	.mbb *, .mbb-footer * { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Tablettes et mobiles
   ----------------------------------------------------------------------- */

@media (max-width: 999px) {
	.mbb-split,
	.mbb-service .mbb-split,
	.mbb-split--contact { grid-template-columns: 1fr; }
	.mbb-service--alt .mbb-split > :first-child { order: 0; }
	.mbb-cards { grid-template-columns: 1fr; }
	.mbb-card--big { min-height: 180px; }
	.mbb-pgrid,
	.mbb-pgrid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mbb-rail__track { grid-auto-columns: calc((100% - 24px) / 2.3); }
	.mbb-rail__btn { display: none; }
	.mbb-footer__grid { grid-template-columns: 1fr 1fr; }
	.mbb-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
	.mbb-rail__track { grid-auto-columns: 72%; gap: 14px; }
	.mbb-pgrid,
	.mbb-pgrid--3 { gap: 14px; }
	.mbb-footer__grid { grid-template-columns: 1fr; }
	body.mbb [data-products],
	body.mbb ul.products {
		--shop-columns: repeat(2, minmax(0, 1fr));
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 14px !important;
	}
}

/* --------------------------------------------------------------------------
   Diaporama de la bannière (Atelier, Démons)
   ----------------------------------------------------------------------- */

[data-mbb-slides] .mbb-slide { opacity: 0; transition: opacity 1.2s ease; }
[data-mbb-slides] .mbb-slide.is-active { opacity: 1; }
/* Défilement : l'image active glisse depuis la droite, la précédente sort à gauche */
[data-mbb-slides][data-transition="slide"] .mbb-slide { opacity: 1; transform: translateX(100%); transition: transform 1s cubic-bezier(.65, 0, .35, 1); }
[data-mbb-slides][data-transition="slide"] .mbb-slide.is-active { transform: translateX(0); }
[data-mbb-slides][data-transition="slide"] .mbb-slide.is-prev { transform: translateX(-100%); }
[data-mbb-slides][data-transition="slide"] .mbb-slide:not(.is-active):not(.is-prev) { transition: none; }
.mbb-dots { display: flex; gap: 10px; margin-top: 22px; }
.mbb-dots__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	opacity: .7;
}
.mbb-dots__dot:hover { opacity: 1; }
.mbb-dots__dot.is-active { background: currentColor; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	[data-mbb-slides] .mbb-slide,
	[data-mbb-slides][data-transition="slide"] .mbb-slide { transition: none; }
}

/* --------------------------------------------------------------------------
   Délais de livraison (fiche produit, panier, commande)
   ----------------------------------------------------------------------- */

.mbb-delay { margin: 10px 0 18px; font-size: 14px; line-height: 1.5; opacity: .85; }
.mbb-delays { margin: 0 0 20px; padding: 14px 18px; border-left: 3px solid currentColor; background: rgba(127, 127, 127, .08); font-size: 14px; line-height: 1.5; }
.mbb-delays__title { margin: 0 0 6px; font-weight: 700; }
.mbb-delays ul { margin: 0; padding-left: 18px; }
.mbb-delays li { margin: 2px 0; }

/* --------------------------------------------------------------------------
   Cadres des prestations avec photos (page Prestations)
   ----------------------------------------------------------------------- */

.mbb-card.mbb-card--photo {
	position: relative;
	overflow: hidden;
	min-height: 0;
	aspect-ratio: 4 / 3;
	padding: 0 !important;
	justify-content: flex-end;
}
.mbb-card__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mbb-card--photo::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 55%);
	pointer-events: none;
}
.mbb-card--photo .mbb-card__over { position: relative; z-index: 2; padding: clamp(18px, 3vw, 30px); color: #fff; }
.mbb-card--photo .mbb-card__over h3 { margin: 0; color: #fff !important; font-size: clamp(36px, 5vw, 64px) !important; line-height: 1 !important; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.mbb-card--photo .mbb-card__num { color: #fff; opacity: .9; }
.mbb-card--photo .mbb-dots { margin-top: 14px; color: #fff; }

/* --------------------------------------------------------------------------
   Cadre photo de la page À propos (une ou plusieurs photos)
   ----------------------------------------------------------------------- */

.mbb-photo.mbb-photo--frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; width: 100%; max-width: 480px; margin-inline: auto; }
.mbb-photo--frame img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; padding: 0 !important; border: 0 !important; box-shadow: none !important; transform: none; }
.mbb-photo__dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; justify-content: center; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.mbb-photo__dots .mbb-dots { margin: 0; }

/* Texte centré : le bloc de paragraphes est lui-même centré dans sa colonne */
.mbb-center .mbb-prose,
.mbb-prose.mbb-center { margin-inline: auto; }

/* Page de commande : titre « Expédier à une adresse différente ? » dans la police de l'habillage
   (la police machine à écrire venait de Google Fonts, désormais coupée) */
body.mbb #ship-to-different-address,
body.mbb #ship-to-different-address label,
body.mbb #ship-to-different-address span { font-family: inherit !important; }

/* --------------------------------------------------------------------------
   Page Boutique rangée par rayon
   ----------------------------------------------------------------------- */

.mbb-shopnav { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 24px; }
.mbb-shopnav a { padding: 8px 16px; border: 1px solid currentColor; text-decoration: none; color: inherit; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.mbb-shopnav a:hover { opacity: 1; }
.mbb-shopcat { scroll-margin-top: 110px; }
.mbb-shopcat + .mbb-shopcat .mbb-wrap { border-top: 1px solid rgba(127, 127, 127, .25); padding-top: clamp(32px, 5vw, 56px); }
.mbb-shopcat + .mbb-shopcat { padding-top: 0; }
.mbb-shopcat__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; margin-bottom: 28px; }
.mbb-shopcat__head .mbb-title { margin: 0; }
.mbb-shopcat__head .mbb-title a { color: inherit; text-decoration: none; }
.mbb-shopcat__sub { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.mbb-shopcat__sub a { color: inherit; opacity: .7; text-decoration: none; border-bottom: 1px solid transparent; }
.mbb-shopcat__sub a:hover { opacity: 1; border-color: currentColor; }

/* Menu déroulant un peu plus large : « Œuvres originales » sur une ligne */
body.mbb #header [data-id="menu"] { --dropdown-width: 250px; }
body.mbb #header .sub-menu { min-width: 250px; }
