/*
 * Meridian 2.0 home sections: Sale hero, Looks rail, Offer tiles, Customer
 * reviews, Store locations and Store story. Prefix mx-. Values merchants can
 * change come in as custom properties from each section's settings.
 */

.mx-section { padding-block: var(--mx-pt, 40px) var(--mx-pb, 40px); }
.mx-shell { max-width: var(--mx-page, 1180px); margin-inline: auto; padding-inline: var(--mx-gutter, 24px); }
.mx-head { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 18px; text-align: center; }
.mx-head--split { flex-direction: row; align-items: flex-end; justify-content: space-between; text-align: start; }
.mx-section h2.mx-title { margin: 0; color: var(--vo-heading, #111); font-family: var(--vo-font); font-size: 18px; font-weight: 400; letter-spacing: 0; line-height: 1.3; text-transform: none; }
.mx-section h2.mx-title--caps { font-size: 20px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.mx-section h2.mx-title--sm { font-size: 12px; font-weight: 600; letter-spacing: .16em; }
.mx-sub { margin: 4px 0 0; color: var(--vo-muted, #777); font-size: 11px; }
.mx-more { flex: none; color: var(--vo-heading, #111); font-size: 11px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.mx-empty { padding: 24px; color: var(--vo-muted, #777); font-size: 13px; text-align: center; }
.mx-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #f2efea, #e6e1d9); }

/* Shared sideways rail with a thin visible scrollbar, as on the reference. */
.mx-rail { display: grid; grid-auto-flow: column; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.mx-rail::-webkit-scrollbar { display: none; }
.mx-rail > * { scroll-snap-align: start; }
.mx-rail-ui { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.mx-rail-ui[hidden] { display: none; }
.mx-rail-ui__track { position: relative; flex: 1; height: 1px; overflow: hidden; background: #e2e2e2; }
.mx-rail-ui__bar { position: absolute; inset: 0 auto 0 0; height: 1px; background: #111; transition: transform .35s cubic-bezier(.2,.7,.2,1), width .35s ease; }
.mx-rail-ui__btn { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #d9d9d9; border-radius: 50%; background: #fff; color: #111; cursor: pointer; transition: background-color .3s ease, color .3s ease, border-color .3s ease, opacity .3s ease; }
.mx-rail-ui__btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.mx-rail-ui__btn:hover:not(:disabled) { border-color: #111; background: #111; color: #fff; }
.mx-rail-ui__btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 767px) { .mx-rail-ui__btn { display: none; } .mx-rail-ui { margin-top: 16px; } }

/* Sale hero */
.mx-hero { position: relative; isolation: isolate; display: grid; place-items: center; min-height: var(--mx-hero-h); overflow: hidden; background: var(--mx-hero-bg); color: var(--mx-hero-text); }
.mx-hero__media, .mx-hero__media img, .mx-hero__shade, .mx-hero__cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.mx-hero__media { z-index: -2; }
.mx-hero__media img { object-fit: cover; }
.mx-hero__shade { z-index: -1; background: #000; }
.mx-hero__cover { z-index: 2; }
.mx-hero__inner { position: relative; z-index: 3; display: grid; justify-items: center; gap: 18px; width: min(100%, 1100px); padding: 48px 24px clamp(110px, 12vw, 190px); text-align: center; }
.mx-hero[data-align="left"] .mx-hero__inner { justify-items: start; text-align: start; }
.mx-hero__eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.mx-hero h2.mx-hero__title { margin: 0; color: inherit; font-family: var(--mx-display, "Anton", "Oswald", Impact, sans-serif); font-size: var(--mx-hero-size); font-weight: 400; letter-spacing: -.01em; line-height: .9; text-transform: uppercase; white-space: pre-line; }
.mx-hero__text { margin: 4px 0 0; font-size: clamp(16px, 1.6vw, 22px); font-weight: 300; }
.mx-hero__text strong, .mx-hero__text b { font-weight: 700; }
.mx-hero__btn { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 10px 30px; border-radius: 4px; background: var(--mx-hero-btn); color: var(--mx-hero-btn-text); font-size: 13px; font-weight: 500; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.mx-hero__btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px #0000002e; }
.mx-hero__ghost { position: absolute; z-index: 1; bottom: -.14em; left: 50%; margin: 0; transform: translateX(-50%); color: transparent; font-family: var(--mx-display, "Anton", "Oswald", Impact, sans-serif); font-size: clamp(64px, 12vw, 190px); line-height: 1; text-transform: uppercase; white-space: nowrap; -webkit-text-stroke: 2px color-mix(in srgb, #000 calc(var(--mx-hero-ghost) * 100%), transparent); pointer-events: none; user-select: none; }
@supports not (color: color-mix(in srgb, red, blue)) { .mx-hero__ghost { -webkit-text-stroke-color: #00000040; } }
.mx-hero[data-ghost="fill"] .mx-hero__ghost { color: color-mix(in srgb, #000 calc(var(--mx-hero-ghost) * 100%), transparent); -webkit-text-stroke: 0; }
/* Header laid over the first hero: keep the copy clear of it */
body:has([data-header-transparent]) main > .sg-section:first-child .mx-hero { padding-top: var(--mx-over, 150px); min-height: calc(var(--mx-hero-h) + var(--mx-over, 150px)); }
@media (max-width: 767px) {
    .mx-hero { min-height: var(--mx-hero-mh); }
    .mx-hero h2.mx-hero__title { font-size: var(--mx-hero-msize); }
    .mx-hero__inner { gap: 14px; padding: 36px 18px 26vw; }
    .mx-hero__ghost { font-size: 22vw; -webkit-text-stroke-width: 1px; }
    body:has([data-header-transparent]) main > .sg-section:first-child .mx-hero { --mx-over: 64px; min-height: calc(var(--mx-hero-mh) + var(--mx-over)); }
}

/* Sale hero side photos */
.mx-hero__sides { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mx-hero__side { position: absolute; bottom: 9%; width: clamp(150px, 17vw, 270px); aspect-ratio: 3 / 4; overflow: hidden; border: 6px solid #fff; background: #fff; box-shadow: 0 30px 60px -18px #00000066; }
.mx-hero__side img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.mx-hero__side--left { left: clamp(24px, 9vw, 180px); transform: rotate(-5deg); }
.mx-hero__side--right { right: clamp(24px, 9vw, 180px); bottom: 15%; transform: rotate(4deg); }
@media (prefers-reduced-motion: no-preference) {
    .mx-hero__side--left { animation: mx-side-in-l 1.1s cubic-bezier(.2,.7,.2,1) .25s both, mx-float-l 7s ease-in-out 1.4s infinite alternate; }
    .mx-hero__side--right { animation: mx-side-in-r 1.1s cubic-bezier(.2,.7,.2,1) .4s both, mx-float-r 8s ease-in-out 1.5s infinite alternate; }
}
@keyframes mx-side-in-l { from { opacity: 0; transform: translateY(60px) rotate(-12deg); } to { opacity: 1; transform: rotate(-5deg); } }
@keyframes mx-side-in-r { from { opacity: 0; transform: translateY(60px) rotate(12deg); } to { opacity: 1; transform: rotate(4deg); } }
@keyframes mx-float-l { from { transform: rotate(-5deg) translateY(0); } to { transform: rotate(-3deg) translateY(-12px); } }
@keyframes mx-float-r { from { transform: rotate(4deg) translateY(0); } to { transform: rotate(6deg) translateY(-10px); } }
@media (max-width: 767px) {
    .mx-hero__side { bottom: 3%; width: 31vw; border-width: 4px; }
    .mx-hero__side--left { left: -3vw; }
    .mx-hero__side--right { right: -3vw; bottom: 6%; }
}

/* Looks rail */
.mx-looks .mx-rail { grid-auto-columns: var(--mx-card-w); }
.mx-look { display: grid; gap: 3px; color: var(--vo-heading, #111); text-decoration: none; }
.mx-look__media { display: block; aspect-ratio: 5 / 7; overflow: hidden; background: #f3eee6; }
.mx-look__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; transition: transform .5s ease; }
.mx-look:hover .mx-look__media img { transform: scale(1.03); }
.mx-look__title { margin-top: 10px; font-size: 11px; font-weight: 500; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-look__caption { color: var(--vo-muted, #888); font-size: 11px; }
.mx-look__caption s { margin-inline-end: 4px; color: #aaa; }
.mx-look__sale { color: var(--vo-sale, #d7000f); }
@media (max-width: 767px) { .mx-looks .mx-rail { grid-auto-columns: var(--mx-card-mw); } .mx-section h2.mx-title--caps { font-size: 16px; } .mx-section h2.mx-title--sm { font-size: 12px; } }

/* Offer tiles */
.mx-offers__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.mx-offer { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: var(--mx-tile-h); overflow: hidden; border-radius: 4px; background: var(--mx-offer-bg); color: var(--mx-offer-text); text-decoration: none; }
.mx-offer__img { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mx-offer:hover .mx-offer__img { transform: scale(1.04); }
.mx-offer__body { display: grid; gap: 4px; padding: 20px 22px; }
.mx-offer__eyebrow { font-size: 9px; font-weight: 500; letter-spacing: .2em; opacity: .85; text-transform: uppercase; }
.mx-offer__title { font-size: 22px; font-weight: 600; line-height: 1.15; text-transform: uppercase; }
.mx-offer__text { font-size: 11px; opacity: .9; }
.mx-offer__link { margin-top: 10px; font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 767px) { .mx-offers__grid { grid-template-columns: 1fr; } .mx-offer { min-height: calc(var(--mx-tile-h) * .8); } }

/* Customer reviews */
.mx-rail--reviews { grid-auto-columns: calc((100% - 36px) / 3.6); }
.mx-review { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 22px 20px; border: 1px solid #ebebeb; border-radius: 4px; background: #fff; }
.mx-review__stars { position: relative; display: inline-block; width: max-content; color: #d9d9d9; font-size: 12px; letter-spacing: 2px; }
.mx-review__stars::before { content: "\2605\2605\2605\2605\2605"; position: absolute; inset: 0 auto 0 0; width: var(--mx-stars, 100%); overflow: hidden; color: #111; white-space: nowrap; }
.mx-review__quote { flex: 1; margin: 0; color: #333; font-size: 13px; font-style: italic; line-height: 1.65; }
.mx-review__quote::before { content: "\201C"; margin-inline-end: 4px; font-size: 22px; line-height: 0; vertical-align: -6px; }
.mx-review figcaption { display: grid; gap: 3px; }
.mx-review__name { color: #111; font-size: 11px; font-weight: 600; }
.mx-review__product { color: #888; font-size: 10px; }
.mx-review__badge { margin-top: 4px; color: #555; font-size: 9px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 767px) { .mx-rail--reviews { grid-auto-columns: 82%; } }

/* Store locations */
.mx-rail--stores { grid-auto-columns: calc((100% - 48px) / 5); }
.mx-store { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid #ebebeb; border-radius: 4px; background: #fff; }
.mx-store__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f2f2f2; }
.mx-store__media img { width: 100%; height: 100%; object-fit: cover; }
.mx-store__body { display: grid; align-content: start; gap: 4px; padding: 12px 12px 14px; }
.mx-store__name { color: #111; font-size: 12px; font-weight: 600; }
.mx-store__address { color: #777; font-size: 10px; line-height: 1.5; white-space: pre-line; }
.mx-store__link { margin-top: 8px; color: #111; font-size: 10px; font-weight: 500; text-decoration: none; }
.mx-store__link:hover { text-decoration: underline; }
@media (max-width: 1023px) { .mx-rail--stores { grid-auto-columns: 40%; } }
@media (max-width: 767px) { .mx-rail--stores { grid-auto-columns: 70%; } }

/* Store story */
.mx-seo__box { max-width: 860px; margin-inline: auto; padding: 18px 22px; border: 1px solid #e6e1d6; border-radius: 4px; background: #fbfaf6; }
.mx-seo h2.mx-seo__title { margin: 0 0 10px; color: #111; font-family: var(--vo-font); font-size: 18px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.mx-seo__text { max-height: var(--mx-seo-h); overflow-y: auto; padding-inline-end: 8px; color: #666; font-size: 11px; line-height: 1.8; scrollbar-width: thin; }
.mx-seo__text p { margin: 0 0 10px; }
.mx-seo__text a { color: #333; text-decoration: underline; }

/* Hero entrance and a slow drift on the outlined word */
@media (prefers-reduced-motion: no-preference) {
    .mx-hero__inner > * { animation: mx-rise-in .9s cubic-bezier(.2,.7,.2,1) both; }
    .mx-hero__inner > :nth-child(2) { animation-delay: .12s; }
    .mx-hero__inner > :nth-child(3) { animation-delay: .24s; }
    .mx-hero__inner > :nth-child(4) { animation-delay: .36s; }
    .mx-hero__ghost { animation: mx-ghost-in 1.4s cubic-bezier(.2,.7,.2,1) .2s both, mx-drift 18s ease-in-out 1.6s infinite alternate; }
    .mx-hero__media img { animation: mx-zoom-out 2.4s cubic-bezier(.2,.7,.2,1) both; }
    .mx-look__media img { transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
    .mx-look:hover .mx-look__media img { transform: scale(1.05); }
    .mx-offer { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease; }
    .mx-offer:hover { transform: translateY(-4px); box-shadow: 0 18px 40px #0000002b; }
}
@keyframes mx-rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes mx-ghost-in { from { opacity: 0; transform: translate(-50%, 30%); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes mx-drift { from { transform: translate(-50%, 0); } to { transform: translate(-46%, 0); } }
@keyframes mx-zoom-out { from { transform: scale(1.08); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .mx-look__media img, .mx-offer__img, .mx-hero__btn { transition: none; }
}