.markets-page {
    --wine: #5e1224;
    --wine-dark: #3b0c18;
    --cream: #f1e7d2;
    --cream-soft: #fbf7ef;
    --ink: #201b18;
    min-height: 100vh;
    background-color: var(--wine-dark);
    background-position: center top;
    background-size: cover;
    color: var(--cream-soft);
}

.markets-page header,
.markets-page .containerheadersticky {
    background: rgba(20, 15, 13, 0.94);
}

.markets-page header {
    z-index: 1000;
}

.markets-page nav a[aria-current="page"] {
    background: var(--wine);
}

.markets-page .menu {
    position: fixed;
    top: clamp(0.75rem, 2vw, 1.25rem);
    left: 2vw;
    width: auto;
    margin: 0;
    z-index: 1100;
}

.markets-page .menu nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
}

.markets-main {
    box-sizing: border-box;
    height: auto;
    max-height: none;
    min-height: calc(100vh - min(10vw, 13vh, 115px));
    padding: clamp(3rem, 5vw, 5rem) clamp(1rem, 2.5vw, 2.5rem) 4rem;
}

.markets-hero {
    width: min(1500px, 100%);
    margin: 0 auto;
}

.markets-intro {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: -1rem auto clamp(2rem, 4vw, 3.5rem);
    padding: 0;
    text-align: center;
}

.markets-eyebrow,
.map-kicker {
    margin: 0 0 0.5rem;
    color: #d8b97a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.markets-eyebrow {
    font-size: 0.936rem;
}

.markets-intro h1 {
    margin: 0 0 1rem;
    padding-top: 2rem;
    font-family: "Barokah", Georgia, serif;
    font-size: clamp(1.25rem, 2.2vw, 2.2rem);
    font-weight: 400;
    line-height: 2;
    text-wrap: balance;
}

.markets-description {
    width: min(760px, 100%);
    margin: clamp(2rem, 4vw, 3rem) auto 0;
    color: aliceblue;
    font-size: clamp(1.176rem, 1.38vw, 1.38rem);
    line-height: 1.1;
    text-align: center;
    hyphens: none;
    text-wrap: pretty;
}

.markets-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(80px, 0.22fr) minmax(0, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
    align-items: center;
}

.markets-empty-column {
    width: 100%;
    min-height: 1px;
}

.market-visual {
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.25rem;
    background: var(--cream-soft);
    box-shadow: 0 1.5rem 3.5rem rgba(13, 4, 7, 0.32);
    justify-self: center;
}

.market-photo,
.market-map-card {
    position: relative;
    width: 80%;
    aspect-ratio: 1;
}

.market-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-photo::after {
    position: absolute;
    inset: auto 0 0;
    height: 36%;
    background: linear-gradient(transparent, rgba(24, 12, 10, 0.88));
    content: "";
    pointer-events: none;
}

.market-photo figcaption {
    position: absolute;
    right: 0.5rem;
    bottom: clamp(1rem, 3vw, 2rem);
    left: 0.5rem;
    z-index: 1;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: "Barokah", Georgia, serif;
    font-size: clamp(0.5rem, 0.72vw, 0.72rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}

.market-map-card {
    height: auto;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
    contain: layout paint;
    background: var(--cream-soft);
}

.map-heading {
    position: absolute;
    top: clamp(1rem, 2vw, 1.5rem);
    left: 50%;
    z-index: 500;
    width: max-content;
    max-width: calc(100% - 2rem);
    padding: 0;
    transform: translateX(-50%);
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
    pointer-events: none;
}

.map-heading .map-kicker {
    margin-bottom: 0.15rem;
    color: var(--wine);
    font-size: 0.62rem;
}

.map-heading h2 {
    margin: 0;
    color: var(--ink);
    font-family: "Barokah", Georgia, serif;
    font-size: clamp(1.0125rem, 1.875vw, 1.5rem);
    font-weight: 400;
}

.markets-map {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border: 0;
    overflow: hidden !important;
    clip-path: inset(0 round 1.15rem);
    contain: layout paint;
    background: #e8ddc7;
}

.markets-map .ol-zoom {
    top: auto;
    right: 0.75rem;
    bottom: 0.75rem;
    left: auto;
}

.markets-map .ol-control button {
    width: 2rem;
    height: 2rem;
    margin: 2px;
    border-radius: 0.3rem;
    background: rgba(59, 12, 24, 0.92);
    color: #fff;
    font-size: 1.2rem;
}

.markets-map .ol-control button:hover,
.markets-map .ol-control button:focus {
    background: var(--wine);
}

.markets-map .ol-attribution {
    right: auto;
    left: 0.5rem;
    font-size: 0.65rem;
}

.market-map-popup {
    padding: 0.55rem 0.8rem;
    border: 2px solid #fff8ed;
    border-radius: 0.5rem;
    background: var(--wine-dark);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.markets-map-unavailable {
    display: grid;
    box-sizing: border-box;
    place-items: center;
    padding: 2rem;
    color: var(--wine-dark);
    font-weight: 700;
    text-align: center;
}

.map-points-list {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.markets-callout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: clamp(2rem, 5vw, 4rem);
    text-align: center;
}

.markets-callout p {
    margin: 0;
    font-size: 1.05rem;
}

.markets-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.3rem 1.25rem;
    border: 2px solid var(--cream);
    border-radius: 999px;
    background: var(--cream);
    color: var(--wine-dark);
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.markets-cta:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-2px);
}

.markets-cta:focus-visible,
.markets-page a:focus-visible,
.markets-page #hamburger-logo:focus-visible {
    outline: 3px solid #d8b97a;
    outline-offset: 4px;
}

.markets-page footer {
    box-sizing: border-box;
    min-height: 10vh;
    height: auto;
    padding: 1.25rem 1rem;
    background: rgba(20, 15, 13, 0.82);
}

@media (max-width: 980px) {
    .markets-page header {
        height: 78px;
        max-height: none;
    }

    .markets-page .containerheadersticky {
        align-items: center;
        height: 78px;
    }

    .markets-page .undercontainer {
        display: none;
    }

    .markets-page .logo {
        width: 100%;
    }

    .markets-page .IMGlogo {
        width: 78px;
    }

    .markets-page .menu {
        top: 15px;
        left: 1rem;
        margin: 0;
    }

    .markets-page #hamburger-logo {
        font-size: 2rem;
    }

    .markets-main {
        min-height: 0;
        margin-top: 0;
        padding: 3rem 1rem;
    }

    .markets-showcase {
        grid-template-columns: 1fr;
        width: min(36rem, 100%);
        margin: 0 auto;
    }

    .markets-intro {
        padding: 0 0 1rem;
    }

    .markets-empty-column {
        display: none;
    }

    .markets-callout {
        flex-direction: column;
        gap: 0.9rem;
    }

    .markets-page footer ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1.5rem;
    }
}

@media (max-width: 460px) {
    .map-heading {
        top: 0.7rem;
        padding: 0.55rem 0.8rem 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .markets-page *,
    .markets-page *::before,
    .markets-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
