.eg-markets-page {
    --paper: #fbf8ef;
    background-image: radial-gradient(ellipse at 85% 50%, #ead6ac70 0%, transparent 36%), radial-gradient(ellipse at 0% 64%, #eceddf 0%, transparent 36%);
}

.eg-markets-page .eg-site-header {
    background: linear-gradient(#0b241eef, #0b241e00);
}

@media (min-width: 641px) {
    .eg-markets-page .eg-footer-grid { grid-template-columns: 1.6fr repeat(2, 1fr); }
}

.eg-markets-page .eg-brand-footer img {
    display: block;
    width: 145px;
    height: auto;
    padding: 2px 6px;
    border-radius: 8px;
    background: #fff;
}

.eg-markets-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: #102b26;
}

.eg-markets-hero > img,
.eg-markets-hero::before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.eg-markets-hero > img {
    z-index: -2;
    object-fit: cover;
    object-position: 54% 60%;
}

.eg-markets-hero::before {
    z-index: -1;
    background: linear-gradient(90deg, #0b211df5, #0b211da3 48%, #0b211d24 84%), linear-gradient(0deg, #0b211d7a, transparent 38%);
    content: "";
}

.eg-markets-hero-inner {
    position: relative;
    padding-block: clamp(113px, 12vw, 165px) clamp(86px, 9vw, 116px);
}

.eg-markets-hero h1 {
    max-width: 13ch;
    color: #fff;
    font-size: clamp(50px, 9.5vw, 116px);
    font-weight: 800;
    line-height: .87;
    letter-spacing: -.075em;
}

.eg-markets-hero h1 em {
    display: block;
    margin-top: 3px;
    color: #ffcd75;
    font: 700 1.22em/.78 Caveat, cursive;
    letter-spacing: -.055em;
}

.eg-markets-hero p {
    max-width: 33ch;
    margin-top: 24px;
    color: #f7f8f1;
    font-size: clamp(16px, 2vw, 22px);
}

.eg-markets-page .eg-markets-hero a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 43px;
    margin-top: 24px;
    padding: 10px 15px;
    border-radius: 9px;
    border: 1px solid #f3c97c;
    background: #ffe2a4;
    color: #15362d;
    font-weight: 800;
}

.eg-markets-page .eg-markets-hero a:hover { background: #fff0d4; }

.eg-market-snow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.eg-market-snow::before,
.eg-market-snow::after {
    position: absolute;
    inset: -240px -20px 0;
    background-repeat: repeat;
    content: "";
}

.eg-market-snow::before {
    background-image:
        radial-gradient(circle at 23px 42px, #fff 0 1px, transparent 2px),
        radial-gradient(circle at 90px 104px, #fff 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 158px 31px, #fff 0 1px, transparent 2px),
        radial-gradient(circle at 231px 137px, #fff 0 1px, transparent 2px),
        radial-gradient(circle at 64px 204px, #fff 0 1px, transparent 2px),
        radial-gradient(circle at 190px 189px, #fff 0 1px, transparent 2px);
    background-size: 256px 240px;
    opacity: .46;
}

.eg-market-snow::after {
    background-image:
        radial-gradient(circle at 50px 68px, #fff 0 2px, transparent 3.5px),
        radial-gradient(circle at 173px 121px, #fff 0 1.5px, transparent 3px),
        radial-gradient(circle at 270px 33px, #fff 0 2px, transparent 3.5px),
        radial-gradient(circle at 303px 190px, #fff 0 1.5px, transparent 3px);
    background-size: 330px 240px;
    opacity: .5;
}

.eg-market-lights {
    position: absolute;
    inset: auto 0 0;
    height: 36px;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 0 4%;
    background: linear-gradient(0deg, #102b26, #102b2600);
    pointer-events: none;
}

.eg-market-lights::before {
    position: absolute;
    inset: -3px -2px auto;
    height: 17px;
    border-bottom: 1px solid #bca871b3;
    border-radius: 0 0 55% 55%;
    content: "";
}

.eg-market-lights span {
    --bulb: #ffe398;
    position: relative;
    top: 13px;
    width: 7px;
    height: 10px;
    border-radius: 45% 45% 55% 55%;
    background: var(--bulb);
    box-shadow: 0 0 12px 2px var(--bulb);
}

.eg-market-lights span:nth-child(3n + 2) { --bulb: #f57978; }
.eg-market-lights span:nth-child(3n) { --bulb: #9ce8bd; }
.eg-market-lights span:nth-child(-n + 3),
.eg-market-lights span:nth-last-child(-n + 3) { top: 10px; }
.eg-market-lights span:first-child,
.eg-market-lights span:last-child { top: 6px; }

.eg-market-lights span::before {
    position: absolute;
    inset: -2px 1px auto;
    height: 3px;
    border-radius: 1px;
    background: #908263;
    content: "";
}
.eg-markets-page .eg-markets-section { margin-block: clamp(30px, 5vw, 61px); }
.eg-markets-page .eg-markets-section h2 { color: #15362d; font-size: clamp(25px, 4vw, 43px); }
.eg-markets-page .eg-markets-section .eg-section-heading { margin-bottom: 20px; }

.eg-markets-grid,
.eg-festive-places-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.eg-markets-page .eg-market-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e6dc;
    border-top: 3px solid #8a1b30;
    border-radius: 17px;
    background: #fff;
    color: #183229;
    box-shadow: 0 9px 28px #293e2214;
}

.eg-markets-page .eg-market-card:nth-child(even) { border-top-color: #35654f; }
.eg-markets-page .eg-market-card h3 { font-size: clamp(19px, 2vw, 24px); font-weight: 800; line-height: 1.1; }
.eg-markets-page .eg-market-card p { color: #445a51; }
.eg-markets-page .eg-market-card .eg-market-location { color: #845127; font-size: 13px; font-weight: 800; }
.eg-market-card-art {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.55;
    background: #193b30;
}

.eg-market-card-art::after {
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(transparent, #101c16c2);
    content: "";
}

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

.eg-markets-page .eg-market-card-art .eg-market-location {
    position: absolute;
    z-index: 1;
    inset: auto 11px 11px;
    color: #fff9ec;
    font-size: 13px;
    text-shadow: 0 1px 5px #101c16;
}

.eg-market-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 17px;
}

.eg-markets-page .eg-market-card-body > a {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 7px 10px;
    border-radius: 8px;
    background: #f8ecee;
    color: #83162a;
    font-size: 13px;
    font-weight: 800;
}

.eg-markets-page .eg-market-card a:hover { text-decoration: underline; }

.eg-markets-page .eg-market-art-note {
    margin-top: 10px;
    color: #53665b;
    font-size: 12px;
}
.eg-markets-page .eg-festive-places {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(20px, 4vw, 46px);
    border-radius: 22px;
    background:
        linear-gradient(90deg, #10243bf0, #142945a0 58%, #1a304351),
        #152c44 url("../images/christmas/cabin.webp") 70% center / cover no-repeat;
    box-shadow: 0 12px 30px #152c4424;
}

.eg-festive-places .eg-market-snow {
    z-index: -1;
    opacity: .7;
}

.eg-markets-page .eg-festive-places .eg-section-heading h2 { color: #fff8eb; }
.eg-markets-page .eg-festive-places .eg-section-heading p { color: #e2edf7; }

.eg-festive-places-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eg-festive-place > img { display: block; width: 100%; height: auto; aspect-ratio: 30 / 17; object-fit: cover; }
.eg-festive-place > div { display: grid; gap: 6px; padding: 16px; }

@media (max-width: 880px) {
    .eg-markets-grid, .eg-festive-places-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .eg-markets-hero::before { background: linear-gradient(90deg, #0b211deb, #0b211d70); }
    .eg-markets-grid, .eg-festive-places-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
    .eg-markets-page[data-markets-motion] .eg-market-snow::before {
        animation: eg-market-snowfall 17s linear infinite;
    }

    .eg-markets-page[data-markets-motion] .eg-market-snow::after {
        animation: eg-market-snowfall 11s linear infinite;
    }

    .eg-markets-page[data-markets-motion] .eg-market-lights span {
        animation: eg-market-twinkle 3s ease-in-out infinite alternate;
    }

    .eg-markets-page[data-markets-motion] .eg-market-lights span:nth-child(3n + 2) { animation-delay: -1s; }
    .eg-markets-page[data-markets-motion] .eg-market-lights span:nth-child(3n) { animation-delay: -2s; }

    .eg-markets-page[data-markets-motion] .eg-featured-market.is-in-view {
        animation: eg-market-card-in .55s ease-out backwards;
    }

    .eg-markets-page[data-markets-motion] .eg-featured-market:nth-child(even) { animation-delay: .1s; }
    .eg-markets-page[data-markets-motion] .eg-market-card-art img { transition: transform .35s ease; }
    .eg-markets-page[data-markets-motion] .eg-featured-market:is(:hover, :focus-within) img { transform: scale(1.045); }

    @keyframes eg-market-snowfall {
        0% { transform: translate(0, 0); }
        50% { transform: translate(12px, 120px); }
        100% { transform: translate(0, 240px); }
    }

    @keyframes eg-market-twinkle {
        from { opacity: .48; }
        to { opacity: 1; }
    }

    @keyframes eg-market-card-in {
        from { opacity: .52; transform: translateY(14px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
