/* MarmoHolz – Promocje czasowe */
.mhfs-section {
	--mhfs-accent: #b07a4f;
	--mhfs-text: #1f1f1f;
	--mhfs-muted: #9a9a9a;
	--mhfs-border: #e7e3dd;
	--mhfs-card-bg: #fff;
	--mhfs-radius: 8px;
	--mhfs-gap: 20px;
	--mhfs-banner-w: 448px;
	--mhfs-overlay: .45;
	color: var(--mhfs-text);
	margin: 0 0 48px;
	position: relative;
	z-index: 2; /* rozwinięta po najechaniu karta leży nad kolejną sekcją strony */
	transition: opacity .4s ease;
}
.mhfs-section.is-ended { opacity: 0; }
.mhfs-section *, .mhfs-section *::before, .mhfs-section *::after { box-sizing: border-box; }

.mhfs-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--mhfs-banner-w);
	grid-template-areas: "head banner" "products banner"; /* baner od tytułu sekcji do dołu kart */
	grid-template-rows: auto auto;
	column-gap: 30px;
	align-items: stretch;
}
.mhfs-banner-left .mhfs-inner {
	grid-template-columns: var(--mhfs-banner-w) minmax(0, 1fr);
	grid-template-areas: "banner head" "banner products";
}

/* Nagłówek */
.mhfs-head { grid-area: head; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.mhfs-section .mhfs-title { margin: 0; font-size: 34px; font-weight: 400; line-height: 1.2; color: inherit; letter-spacing: 0; text-transform: none; }
.mhfs-section .mhfs-desc { margin: 20px 0 0; font-size: 15px; line-height: 1.5; color: inherit; }
.mhfs-nav { display: flex; gap: 8px; flex: none; }
.mhfs-nav[hidden] { display: none; }
.mhfs-section .mhfs-nav button {
	width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%;
	border: 1px solid var(--mhfs-border); background: #fff; color: var(--mhfs-text);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
	box-shadow: none; transition: border-color .2s, color .2s, opacity .2s;
}
.mhfs-section .mhfs-nav button:disabled { opacity: .35; cursor: default; }
.mhfs-section .mhfs-nav button:not(:disabled):hover { border-color: var(--mhfs-accent); color: var(--mhfs-accent); }

/* Produkty – slider bez natywnego przewijania:
   przycinamy tylko w poziomie, więc rozwinięta po najechaniu karta
   (przycisk „Dodaj do koszyka”) wystaje w dół i nic jej nie ucina. */
.mhfs-products { grid-area: products; min-width: 0; }
.mhfs-viewport {
	--mhfs-per-view: 3;
	position: relative;
	overflow: hidden; /* starsze przeglądarki */
	touch-action: pan-y;
}
@supports (overflow: clip) {
	.mhfs-viewport { overflow-x: clip; overflow-y: visible; overflow-clip-margin: 10px; }
}
.mhfs-viewport.wd-products-with-bg { --wd-prod-bg: #FFFFFF; --wd-bordered-bg: #FFFFFF; }
.mhfs-track {
	display: flex;
	align-items: stretch; /* wszystkie karty mają wysokość najwyższej */
	gap: var(--mhfs-gap);
	transform: translate3d(0, 0, 0);
	transition: transform .5s cubic-bezier(.22, .61, .36, 1);
	will-change: transform;
	outline: none;
}
.mhfs-track:focus-visible { outline: 2px solid var(--mhfs-accent); outline-offset: 6px; }
.mhfs-slide {
	flex: 0 0 calc((100% - (var(--mhfs-per-view) - 1) * var(--mhfs-gap)) / var(--mhfs-per-view));
	display: flex;
	min-width: 0;
	position: relative;
}
.mhfs-slide:hover { z-index: 3; }
/* Jedna wysokość dla wszystkich kart (mierzona w JS). Rozwinięcie po najechaniu
   wystaje poza slajd zamiast rozpychać sąsiednie karty i baner. */
.mhfs-track[style*="--mhfs-card-h"] .mhfs-slide { height: var(--mhfs-card-h); }
.mhfs-track.is-measuring { align-items: flex-start; }
.mhfs-track.is-measuring .mhfs-slide { height: auto !important; }
.mhfs-slide > .wd-product,
.mhfs-slide > .mhfs-card { flex: 1 1 auto; width: 100%; max-width: none; margin: 0; }

/* Przeciąganie myszą */
.mhfs-viewport.is-draggable { cursor: grab; }
.mhfs-viewport.is-dragging { cursor: grabbing; }
.mhfs-viewport.is-dragging .mhfs-track { transition: none; }
.mhfs-viewport.is-dragging a,
.mhfs-viewport.is-dragging img { pointer-events: none; }
.mhfs-viewport img { -webkit-user-drag: none; user-select: none; }

.mhfs-card {
	display: flex; flex-direction: column; min-width: 0;
	background: var(--mhfs-card-bg);
	border: 1px solid var(--mhfs-border);
	border-radius: var(--mhfs-radius);
	overflow: hidden;
	transition: box-shadow .25s ease;
}
.mhfs-card:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .06); }

.mhfs-media { position: relative; aspect-ratio: 1 / 1.15; background: #fff; overflow: hidden; }
.mhfs-media > a { display: block; height: 100%; }
.mhfs-section .mhfs-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mhfs-card:hover .mhfs-media img { transform: scale(1.03); }

.mhfs-badge {
	position: absolute; top: 14px; left: 14px;
	background: var(--mhfs-accent); color: #fff;
	font-size: 12px; font-weight: 600; line-height: 1;
	padding: 6px 8px; border-radius: 4px;
}
.mhfs-wish { position: absolute; top: 12px; right: 12px; z-index: 2; }
.mhfs-wish .wd-action-btn > a {
	width: 36px; height: 36px; border-radius: 50%;
	background: #fff; border: 1px solid var(--mhfs-border);
	display: flex; align-items: center; justify-content: center;
}
.mhfs-wish .wd-action-btn > a > span:not([class*="icon"]) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.mhfs-body { display: flex; flex-direction: column; flex: 1; padding: 16px 16px 18px; }
.mhfs-cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--mhfs-muted); margin-bottom: 10px; }
.mhfs-rating { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-bottom: 10px; }
.mhfs-stars { position: relative; display: inline-block; font-size: 13px; line-height: 1; letter-spacing: 1px; color: #e3e3e3; }
.mhfs-stars::before { content: "★★★★★"; }
.mhfs-stars::after { content: "★★★★★"; position: absolute; top: 0; left: 0; width: var(--r, 100%); overflow: hidden; white-space: nowrap; color: #f5b301; }

.mhfs-section .mhfs-card-title { margin: 0 0 18px; font-size: 14px; font-weight: 700; line-height: 1.6; letter-spacing: .01em; text-transform: uppercase; }
.mhfs-section .mhfs-card-title a { color: inherit; text-decoration: none; }
.mhfs-section .mhfs-card-title a:hover { color: var(--mhfs-accent); }

.mhfs-price { margin-top: auto; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--mhfs-accent); }
.mhfs-section .mhfs-price .price { color: inherit; font-size: inherit; }
.mhfs-section .mhfs-price del { font-size: 14px; font-weight: 400; color: var(--mhfs-muted); margin-right: 6px; opacity: 1; }
.mhfs-section .mhfs-price ins { text-decoration: none; background: none; color: var(--mhfs-accent); }
.mhfs-section .mhfs-price .woocommerce-Price-currencySymbol { font-size: .62em; font-weight: 600; margin-left: 1px; }

/* Baner */
.mhfs-banner {
	grid-area: banner; position: relative; isolation: isolate;
	min-height: 360px; /* wysokość = wysokość kart; to tylko minimum */
	border-radius: var(--mhfs-radius); overflow: hidden;
	background: #3a332d; color: #fff;
	--mhfs-shade: 0, 0, 0;
}
.mhfs-text-dark .mhfs-banner { color: #1f1f1f; background-color: #e9e4dc; --mhfs-shade: 255, 255, 255; }
.mhfs-section .mhfs-banner-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mhfs-banner::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg,
		rgba(var(--mhfs-shade), var(--mhfs-overlay)) 0%,
		rgba(var(--mhfs-shade), calc(var(--mhfs-overlay) * .4)) 45%,
		rgba(var(--mhfs-shade), 0) 75%);
}
.mhfs-banner-content { position: relative; z-index: 1; padding: 34px 34px; pointer-events: none; }
/* Lekki cień pod jasnym tekstem – czytelność także na jaśniejszych fragmentach zdjęcia */
.mhfs-text-light .mhfs-banner-content { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.mhfs-section .mhfs-banner-title { margin: 0 0 12px; font-size: clamp(26px, 2.3vw, 34px); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; color: inherit; }
.mhfs-section .mhfs-banner-label { margin: 0 0 26px; font-size: 17px; font-weight: 500; line-height: 1.4; color: inherit; opacity: .92; }
.mhfs-countdown { display: flex; gap: 30px; }
.mhfs-unit { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.mhfs-num { font-size: clamp(32px, 2.8vw, 42px); font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.mhfs-lbl { margin-top: 4px; font-size: 14px; font-weight: 500; opacity: .85; }
.mhfs-banner-link { position: absolute; inset: 0; z-index: 2; }

/* Responsywność */
@media (max-width: 1199px) {
	.mhfs-section { --mhfs-banner-w: 360px; }
}
@media (max-width: 1024px) {
	.mhfs-inner,
	.mhfs-banner-left .mhfs-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "banner" "products"; grid-template-rows: auto; }
	.mhfs-banner { min-height: 300px; margin: 0 0 24px; }
	.mhfs-viewport { --mhfs-per-view: 2.2; }
}
@media (max-width: 640px) {
	.mhfs-section { --mhfs-gap: 14px; }
	.mhfs-section .mhfs-title { font-size: 26px; }
	.mhfs-head { margin-bottom: 22px; }
	.mhfs-viewport { --mhfs-per-view: 1.25; }
	.mhfs-banner { min-height: 260px; }
	.mhfs-banner-content { padding: 24px; }
	.mhfs-section .mhfs-banner-title { font-size: 24px; }
	.mhfs-section .mhfs-banner-label { font-size: 15px; margin-bottom: 20px; }
	.mhfs-countdown { gap: 16px; }
	.mhfs-unit { min-width: 44px; }
	.mhfs-num { font-size: 30px; }
	.mhfs-lbl { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	.mhfs-section, .mhfs-track, .mhfs-media img, .mhfs-card { transition: none; }
}
