/* ==========================================================================
   Margo — homepage sections ([margo_*] shortcodes) + Elementor section helpers
   ========================================================================== */

.mw-sec, .mw-sec *, .mw-sec *::before, .mw-sec *::after { box-sizing: border-box; }

/* Containers that only hold a [margo_*] shortcode: no Elementor padding/box */
.mw-sc.e-con { --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; --content-width: 100%; --gap: 0px; padding: 0 !important; }
.mw-sc.e-con > .e-con-inner { max-width: none; padding: 0; }

/* Shortcode widget wrapper should not constrain full-bleed sections */
.elementor-widget-shortcode .elementor-shortcode { width: 100%; }

.mw-sec {
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
	padding: clamp(3.5rem, 7vw, 7rem) var(--gutter);
}

/* Section head: eyebrow + script title on the left, link on the right */
.mw-sec__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	margin-bottom: clamp(1.8rem, 3.5vw, 3rem);
}
.mw-sec__eyebrow { margin: 0 0 1.6rem; color: var(--c-brown); }
.mw-sec__title {
	margin: 0;
	font-size: var(--fs-h2);
	line-height: 1.1;
	color: var(--c-espresso);
}
.mw-sec__link {
	flex: none;
	font-family: var(--f-sub);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--c-espresso);
	white-space: nowrap;
}

/* ---------- Product row (horizontal, snap) ---------- */
.mw-products { position: relative; }
.mw-products--row .mw-products__wrap { overflow: hidden; margin-right: calc(var(--gutter) * -1); }
.mw-products--row ul.products.mw-products__list {
	display: grid !important;
	grid-auto-flow: column;
	grid-template-columns: none !important;
	grid-auto-columns: calc((100% - var(--gutter) - 3 * clamp(0.75rem, 1.5vw, 1.5rem)) / 4.15);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	padding-right: var(--gutter) !important;
	scrollbar-width: none;
}
.mw-products--row ul.products.mw-products__list::-webkit-scrollbar { display: none; }
.mw-products--row ul.products li.product { scroll-snap-align: start; }
@media (max-width: 1024px) { .mw-products--row ul.products.mw-products__list { grid-auto-columns: 38%; } }
@media (max-width: 640px) { .mw-products--row ul.products.mw-products__list { grid-auto-columns: 72%; } }

.mw-row-nav {
	position: absolute;
	top: clamp(3.5rem, 7vw, 7rem);
	right: var(--gutter);
	display: none;
}
.mw-row-btn {
	display: grid; place-items: center;
	width: 44px; height: 44px; padding: 0;
	border: 1px solid var(--c-line); border-radius: 50%;
	background: transparent; color: var(--c-espresso);
	cursor: pointer;
	transition: background-color 0.4s var(--ease-lux), color 0.4s, border-color 0.4s;
}
.mw-row-btn[data-dir="-1"] .mw-icon { transform: scaleX(-1); }
.mw-row-btn:hover { background: var(--c-espresso); border-color: var(--c-espresso); color: var(--c-ivory); }
.mw-row-btn:disabled { opacity: 0.3; pointer-events: none; }
@media (hover: hover) and (min-width: 1025px) {
	.mw-products--row .mw-row-nav { display: flex; gap: 0.5rem; }
	.mw-products--row .mw-sec__head { padding-right: 120px; }
	.mw-products--row .mw-sec__link { margin-right: 1rem; }
}

/* Placeholder marker (only visible to admins via body.logged-in) */
.logged-in .mw-is-placeholder { outline: 1px dashed rgba(125, 105, 105, 0.35); outline-offset: 8px; }

/* ---------- Tiles: collections (campaign) ---------- */
.mw-collections__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.6rem, 1.2vw, 1.2rem);
}
.mw-collections--2 .mw-collections__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mw-collections--1 .mw-collections__grid { grid-template-columns: 1fr; }
@media (max-width: 900px) { .mw-collections__grid { grid-template-columns: 1fr !important; } }

.mw-tile { position: relative; display: block; color: inherit; text-decoration: none; }
.mw-tile__media { position: relative; display: block; overflow: hidden; background: var(--c-cream); }
.mw-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-lux); }
.mw-tile:hover .mw-tile__media img { transform: scale(1.05); }

.mw-tile--campaign .mw-tile__media { aspect-ratio: 4 / 5; }
.mw-collections--1 .mw-tile--campaign .mw-tile__media { aspect-ratio: 21 / 9; }
.mw-tile--campaign .mw-tile__media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(42, 10, 16, 0.55), rgba(42, 10, 16, 0) 55%);
}
.mw-tile--campaign .mw-tile__body {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
	padding: clamp(1.2rem, 2.5vw, 2.2rem);
	color: var(--c-ivory);
}
.mw-tile--campaign .mw-tile__title { font-family: var(--f-display); font-size: clamp(2.4rem, 1.6rem + 2.2vw, 4rem); line-height: 1.1; margin-bottom: 0.5rem; }
.mw-tile--campaign .mw-tile__text { max-width: 34ch; font-size: 13.5px; line-height: 1.6; opacity: 0.9; }
.mw-tile__cta {
	font-family: var(--f-sub);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	padding-bottom: 3px;
	transition: background-size 0.6s var(--ease-lux);
}
.mw-tile:hover .mw-tile__cta { background-size: 30% 1px; }

/* ---------- Tiles: shop by category ---------- */
.mw-categories__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(1.2rem, 2vw, 2rem) clamp(0.6rem, 1.2vw, 1.2rem);
}
@media (max-width: 1100px) { .mw-categories__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mw-categories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mw-tile--category .mw-tile__media { aspect-ratio: 3 / 4; margin-bottom: 0.9rem; }
.mw-tile--category .mw-tile__title {
	display: block;
	font-family: var(--f-sub);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--c-espresso);
}
.mw-tile--category .mw-tile__cta { display: inline-block; margin-top: 0.4rem; color: var(--c-brown); font-size: 10px; background-size: 0 1px; }
.mw-tile--category:hover .mw-tile__cta { background-size: 100% 1px; }

/* ---------- Journal ---------- */
.mw-journal__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); }
@media (max-width: 900px) { .mw-journal__grid { grid-template-columns: 1fr; } }
.mw-post { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.mw-post__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 1.2rem; background: var(--c-cream); }
.mw-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-lux); }
.mw-post:hover .mw-post__media img { transform: scale(1.05); }
.mw-post__cat { margin-bottom: 0.6rem; color: var(--c-brown); }
.mw-post__title { font-family: var(--f-sub); font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem); font-weight: 500; line-height: 1.35; color: var(--c-espresso); margin-bottom: 0.6rem; }
.mw-post__text { font-size: 13.5px; line-height: 1.7; color: var(--c-brown); }

/* ---------- Reviews ---------- */
.mw-reviews { background: var(--c-cream); max-width: none; }
.mw-reviews .mw-sec__head { max-width: 1920px; margin-left: auto; margin-right: auto; }
.mw-reviews__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(280px, calc((100% - 3 * 1.2rem) / 3.3));
	gap: 1.2rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	margin-right: calc(var(--gutter) * -1);
	padding-right: var(--gutter);
}
.mw-reviews__track::-webkit-scrollbar { display: none; }
.mw-review {
	scroll-snap-align: start;
	display: flex; flex-direction: column; gap: 1.2rem;
	margin: 0;
	padding: clamp(1.6rem, 2.5vw, 2.4rem);
	background: var(--c-ivory);
}
.mw-review__stars { color: var(--c-espresso); letter-spacing: 0.2em; font-size: 13px; }
.mw-review__text { margin: 0; flex: 1; font-size: 15px; line-height: 1.75; color: var(--c-brown); }
.mw-review__meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline; font-family: var(--f-sub); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.mw-review__name { font-weight: 500; color: var(--c-espresso); }
.mw-review__date { color: var(--c-brown); }
.mw-review__product { flex-basis: 100%; color: var(--c-brown); text-decoration: none; letter-spacing: 0.08em; text-transform: none; font-size: 12px; }

/* ---------- Newsletter band ---------- */
.mw-news {
	max-width: none;
	text-align: center;
	background: var(--c-wine);
	color: var(--c-cream);
}
.mw-news .t-eyebrow { color: var(--c-sand); margin: 0 0 1.2rem; }
.mw-news__title { margin: 0 0 1.6rem; font-size: var(--fs-h1); color: var(--c-ivory); }
.mw-news__text { max-width: 42ch; margin: 0 auto 2rem; font-size: var(--fs-base); }
.mw-news__form { display: flex; flex-direction: column; align-items: center; }
.mw-news__form form { width: min(520px, 100%); margin: 0 auto; text-align: left; }
.mw-news__form .mw-nl__row input { padding: 0.9em 0; border: 0; background: none; color: var(--c-ivory); font-size: 14px; outline: 0; }
.mw-news__form .mw-nl__row input::placeholder { color: rgba(237, 220, 210, 0.55); }
.mw-news__form .mw-nl__row button { border: 0; background: none; color: var(--c-ivory); cursor: pointer; font-family: var(--f-sub); font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; }
.mw-news__ph { display: flex; border-bottom: 1px solid rgba(237, 220, 210, 0.5); }
.mw-news__ph input { flex: 1; min-width: 0; padding: 0.9em 0; border: 0; background: none; color: var(--c-ivory); font-size: 14px; }
.mw-news__ph button { border: 0; background: none; color: var(--c-ivory); font-family: var(--f-sub); font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; }
.mw-admin-hint { margin: 1rem 0 0; font-size: 12px; opacity: 0.7; }

/* ==========================================================================
   Elementor section helpers (classes used by the bundled templates)
   ========================================================================== */

/* Hero: image/video background, text block on the right on desktop */
.mw-hero.e-con {
	min-height: 92vh;
	justify-content: center;
	padding-top: calc(var(--header-h) + 3rem) !important;
	padding-bottom: 4rem !important;
	padding-left: var(--gutter) !important;
	padding-right: 9vw !important;
	background-color: #dfdcd7;
	background-position: left center;
	background-size: cover;
}
.mw-hero__text.e-con { max-width: 560px; }
body .mw-hero .t-eyebrow .elementor-heading-title { color: var(--c-espresso); }
@media (max-width: 767px) {
	.mw-hero.e-con {
		min-height: 0;
		justify-content: flex-end;
		padding-top: calc(100vw * 1.25 - 2rem) !important;
		padding-bottom: 3rem !important;
		padding-right: var(--gutter) !important;
		background-position: center top !important;
		background-size: 100% auto !important;
	}
}
/* Animated image layer (added by fx.js). Until it's ready the container's own image
   is hidden so it never pops in before fading; without JS it simply shows as normal. */
.mw-hero.e-con { position: relative; overflow: hidden; isolation: isolate; background-repeat: no-repeat !important; }
.fx-js .mw-hero.e-con,
.mw-hero.e-con.has-bg-layer { background-size: 0 0 !important; }
.mw-hero__bg {
	position: absolute;
	inset: -2% 0 -10%;
	z-index: 0;
	background-image: inherit;
	background-position: inherit;
	background-repeat: no-repeat;
	background-size: cover;
	pointer-events: none;
	will-change: transform, opacity;
	transform-origin: 50% 40%;
}
.mw-hero.e-con > :not(.mw-hero__bg) { position: relative; z-index: 1; }
@media (max-width: 767px) {
	.mw-hero__bg { inset: 0 0 -6%; background-size: 100% auto; background-position: center top; }
}

/* Video hero: dark overlay so ivory text reads */
.mw-hero--video .elementor-background-video-container::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(42, 10, 16, 0.55), rgba(42, 10, 16, 0.1) 60%);
}

/* Editorial split: image one side, story the other */
.mw-split.e-con { padding-top: clamp(3.5rem, 7vw, 7rem) !important; padding-bottom: clamp(3.5rem, 7vw, 7rem) !important; }
.mw-split .mw-split__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Marquee strip */
.mw-strip.e-con { border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); padding-top: 1.1rem !important; padding-bottom: 1.1rem !important; }
body .mw-strip .elementor-heading-title { font-family: var(--f-sub); font-size: 12px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--c-espresso); line-height: 1; }
