/* ── Event gallery (event-gallery.aspx) ── uses the site tokens from partyedit.css so colour themes apply */

.eg-page {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 72px;
}

/* ── Hero + search ── */
.eg-hero {
    text-align: center;
    padding: 56px 0 8px;
}

.eg-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 10px;
}

.eg-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(32px, 4.4vw, 56px);
    font-weight: 600;
    line-height: 1.05;
    color: var(--plum);
}

.eg-hero .eg-title { text-transform: capitalize; }

.eg-title em { font-style: italic; color: var(--coral); }

.eg-sub {
    max-width: 520px;
    margin: 14px auto 28px;
    color: var(--grey);
    font-size: 15px;
    line-height: 1.6;
}

.eg-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 100px;
    padding: 6px 6px 6px 22px;
    box-shadow: 0 8px 28px rgba(75, 38, 50, 0.1);
}

.eg-search svg { width: 18px; height: 18px; stroke: var(--grey); fill: none; stroke-width: 2; flex-shrink: 0; }

.eg-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--plum);
    padding: 10px 0;
}

.eg-search input::-webkit-search-cancel-button { cursor: pointer; }

.eg-search button {
    border: none;
    border-radius: 100px;
    background: var(--plum);
    color: var(--white);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.eg-search button:hover { background: var(--coral); }

.eg-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.eg-chip {
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--accent-pink);
    color: var(--plum);
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
}

.eg-clear { font-size: 13px; color: var(--coral); text-decoration: underline; }

/* ── Masonry ── */
.eg-section { padding-top: 40px; }

.eg-masonry {
    column-count: 4;
    column-gap: 20px;
}

.eg-masonry > * {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* ── Album card: 3-photo mosaic ── */
.eg-album {
    display: block;
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(75, 38, 50, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.eg-album:hover,
.eg-album:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(75, 38, 50, 0.14);
}

.eg-mosaic {
    display: grid;
    gap: 3px;
    background: var(--beige);
    overflow: hidden;
}

.eg-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.eg-album:hover .eg-mosaic img { transform: scale(1.04); }

/* 3 photos: one big on top, two below. Alternate cards flip the layout for a less uniform wall. */
.eg-mosaic--3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 110px;
}
.eg-mosaic--3 img:first-child { grid-column: 1 / 3; }

.eg-album:nth-child(3n+2) .eg-mosaic--3 {
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: 130px 130px;
}
.eg-album:nth-child(3n+2) .eg-mosaic--3 img:first-child { grid-column: 1; grid-row: 1 / 3; }

.eg-album:nth-child(3n) .eg-mosaic--3 { grid-template-rows: 240px 120px; }

.eg-mosaic--2 { grid-template-columns: 1fr 1fr; grid-template-rows: 220px; }
.eg-mosaic--1 { grid-template-rows: 260px; }
.eg-mosaic--0 { height: 160px; }

.eg-album__info { padding: 14px 16px 16px; }

.eg-album__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--plum);
}

.eg-album__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.eg-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--grey);
}

.eg-count svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.eg-theme-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--accent-pink);
    color: var(--coral);
}

/* ── Buttons, pager, empty ── */
.eg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--plum);
    border-radius: 100px;
    background: var(--plum);
    color: var(--white);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 11px 22px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.eg-btn:hover { background: var(--coral); border-color: var(--coral); color: var(--white); }

.eg-btn--ghost { background: transparent; color: var(--plum); }

.eg-pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.eg-empty {
    text-align: center;
    padding: 56px 16px;
    color: var(--grey);
}

.eg-empty--page { padding-top: 96px; }
.eg-empty__icon { font-size: 44px; margin-bottom: 12px; }
.eg-empty p { margin: 10px 0 22px; }

/* ── Album page ── */
.eg-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 24px;
    font-size: 13px;
    color: var(--grey);
}

.eg-crumbs a:hover { color: var(--coral); }
.eg-crumbs__current { color: var(--plum); font-weight: 500; }

.eg-album-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding-top: 22px;
}

.eg-album-head__meta { margin-top: 8px; font-size: 14px; color: var(--grey); }

.eg-album-head__desc {
    max-width: 680px;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.65;
}

.eg-album-head__actions { display: flex; gap: 10px; flex-shrink: 0; }

.eg-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.eg-details div {
    background: var(--white);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 1px 6px rgba(75, 38, 50, 0.05);
}

.eg-details dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey); }
.eg-details dd { font-size: 14px; font-weight: 500; }

.eg-masonry--photos { column-gap: 14px; }
.eg-masonry--photos > * { margin-bottom: 14px; }

.eg-photo {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: var(--beige);
    cursor: zoom-in;
}

.eg-photo img {
    width: 100%;
    height: auto;
    transition: transform 0.4s ease, opacity 0.3s;
}

.eg-photo:hover img { transform: scale(1.03); }

/* ── Lightbox ── */
.eg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;        /* above the master's floating theme switcher */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 14, 20, 0.94);
    touch-action: pan-y;
}

.eg-lightbox[hidden] { display: none; }

.eg-lightbox__figure {
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eg-lightbox__figure img {
    max-width: 92vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 6px;
}

.eg-lightbox__figure figcaption {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}

.eg-lightbox__close,
.eg-lightbox__nav {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.eg-lightbox__close:hover,
.eg-lightbox__nav:hover { background: var(--coral); }

.eg-lightbox__close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 28px; }

.eg-lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 34px; }
.eg-lightbox__nav--prev { left: 18px; }
.eg-lightbox__nav--next { right: 18px; }

/* ── Responsive ── */
@media (max-width: 1100px) { .eg-masonry { column-count: 3; } }

@media (max-width: 768px) {
    .eg-page { width: 92%; }
    .eg-hero { padding-top: 36px; }
    .eg-masonry { column-count: 2; column-gap: 12px; }
    .eg-masonry > * { margin-bottom: 12px; }
    .eg-album { border-radius: 14px; }
    .eg-mosaic--3 { grid-template-rows: 140px 80px; }
    .eg-album:nth-child(3n+2) .eg-mosaic--3 { grid-template-rows: 95px 95px; }
    .eg-album:nth-child(3n) .eg-mosaic--3 { grid-template-rows: 170px 85px; }
    .eg-mosaic--2 { grid-template-rows: 150px; }
    .eg-mosaic--1 { grid-template-rows: 180px; }
    .eg-album__info { padding: 10px 12px 12px; }
    .eg-album__title { font-size: 17px; }
    .eg-album-head { flex-direction: column; align-items: flex-start; }
    .eg-search button { padding: 11px 16px; }
    .eg-lightbox__nav { display: none; }      /* swipe instead */
}

@media (prefers-reduced-motion: reduce) {
    .eg-album, .eg-mosaic img, .eg-photo img { transition: none; }
    .eg-album:hover, .eg-album:hover .eg-mosaic img, .eg-photo:hover img { transform: none; }
}

/* ── Shop this theme: large horizontal banner on an album page ── */
.eg-shop-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 200px;
    margin-top: 28px;
    padding: 32px 40px;
    border-radius: 22px;
    overflow: hidden;
    color: #fff;
    background-color: var(--plum);
    background-size: cover;
    background-position: center;
    isolation: isolate;
    box-shadow: 0 10px 30px rgba(75, 38, 50, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.eg-shop-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(40, 18, 26, 0.88) 0%, rgba(40, 18, 26, 0.62) 50%, rgba(40, 18, 26, 0.2) 100%);
}

.eg-shop-banner:hover,
.eg-shop-banner:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(75, 38, 50, 0.26);
}

.eg-shop-banner:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.eg-shop-banner__text { display: flex; flex-direction: column; gap: 6px; max-width: 620px; }

.eg-shop-banner__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-pink);
}

.eg-shop-banner__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 600;
    line-height: 1.1;
}

.eg-shop-banner__sub { font-size: 14px; opacity: 0.85; }

.eg-shop-banner__cta {
    flex-shrink: 0;
    padding: 14px 28px;
    border-radius: 100px;
    background: var(--white);
    color: var(--plum);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.eg-shop-banner:hover .eg-shop-banner__cta { background: var(--coral); color: var(--white); }

@media (max-width: 768px) {
    .eg-shop-banner {
        flex-direction: column;
        align-items: flex-start;
        min-height: 0;
        padding: 26px 22px;
        border-radius: 16px;
    }
    .eg-shop-banner::before { background: linear-gradient(180deg, rgba(40, 18, 26, 0.55) 0%, rgba(40, 18, 26, 0.88) 100%); }
    .eg-shop-banner__cta { padding: 12px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .eg-shop-banner { transition: none; }
    .eg-shop-banner:hover, .eg-shop-banner:focus-visible { transform: none; }
}
