.page-gallery-catalogue #mainContent {
    background: var(--color-surface);
}

.page-gallery-catalogue .breadcrumbs {
    display: none;
}

.gallery-catalogue {
    min-height: 100vh;
    padding: 112px 0 92px;
    color: var(--color-primary);
    background: var(--color-surface);
}

.gallery-catalogue-shell {
    width: min(calc(100% - 40px), 1290px);
    margin: 0 auto;
}

.page-gallery-catalogue .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gallery-catalogue-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 68px;
}

.gallery-catalogue-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border: 1px solid var(--color-secondary);
    border-radius: 999px;
    color: var(--color-primary);
    background: var(--color-white);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.gallery-catalogue-pill:hover,
.gallery-catalogue-pill.active {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 10px 22px rgba(139, 105, 20, .22);
    transform: translateY(-1px);
}

.gallery-catalogue-search {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 52px;
}

.gallery-catalogue-searchbox {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(100%, 396px);
    min-height: 45px;
    padding: 0 16px;
    border: 1px solid var(--color-secondary);
    border-radius: 999px;
    color: var(--color-accent);
    background: var(--color-white);
}

.gallery-catalogue-searchbox input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--color-primary);
    background: transparent;
    font: 500 13px/1 var(--font-body);
}

.gallery-catalogue-searchbox input::placeholder {
    color: var(--color-primary);
    opacity: 1;
}

.gallery-catalogue-search button,
.gallery-catalogue-empty a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 28px;
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    color: #ffffff;
    background: var(--color-primary);
    font: 800 12px/1 var(--font-body);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(26, 26, 26, .16);
}

.gallery-catalogue-rule {
    height: 1px;
    margin-bottom: 46px;
    background: var(--color-border);
}

.gallery-catalogue-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 38px 30px;
}

.gallery-slab-card {
    display: flex;
    min-height: 362px;
    flex-direction: column;
    justify-content: space-between;
    padding: 29px 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    color: inherit;
    background: var(--color-white);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 18px 38px rgba(8, 20, 35, .045);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.gallery-slab-card:hover {
    border-color: rgba(139, 105, 20, .32);
    box-shadow: 0 22px 46px rgba(26, 26, 26, .09);
    transform: translateY(-4px);
}

.gallery-slab-image {
    position: relative;
    display: flex;
    min-height: 183px;
    align-items: center;
    justify-content: center;
}

.gallery-slab-image::before,
.gallery-slab-image::after {
    content: "";
    position: absolute;
    bottom: -7px;
    width: 11px;
    height: 21px;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    transform: skewX(-18deg);
    z-index: 1;
}

.gallery-slab-image::before {
    left: 31px;
}

.gallery-slab-image::after {
    right: 31px;
}

.gallery-slab-image img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    aspect-ratio: 1.68 / 1;
    object-fit: cover;
    box-shadow: 0 14px 18px rgba(0, 0, 0, .22);
    transition: transform .25s ease;
}

.gallery-slab-card:hover .gallery-slab-image img {
    transform: translateY(-3px);
}

.gallery-slab-body {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding-top: 34px;
    text-align: center;
}

.gallery-slab-body span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 11px;
    border-radius: 4px;
    color: var(--color-accent);
    background: rgba(201, 168, 76, .14);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1;
    text-transform: uppercase;
}

body.page-gallery-catalogue .gallery-slab-body h2 {
    margin: 0;
    color: #050505 !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 16px;
    font-weight: 900 !important;
    line-height: 1.25;
    opacity: 1;
    text-shadow: none;
}

.gallery-catalogue-pagination {
    margin-top: 58px;
}

.gallery-catalogue-empty {
    max-width: 640px;
    margin: 30px auto 0;
    padding: 60px 24px;
    text-align: center;
}

.gallery-catalogue-empty h1 {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.gallery-catalogue-empty p {
    max-width: 430px;
    margin: 0 auto 24px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

@media (max-width: 1100px) {
    .gallery-catalogue-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .gallery-catalogue {
        padding-top: 98px;
    }

    .gallery-catalogue-pills {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        margin-bottom: 40px;
    }

    .gallery-catalogue-pill {
        flex: 0 0 auto;
    }

    .gallery-catalogue-search {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-catalogue-searchbox,
    .gallery-catalogue-search button {
        width: 100%;
    }

    .gallery-catalogue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

@media (max-width: 560px) {
    .gallery-catalogue-shell {
        width: calc(100% - 24px);
    }

    .gallery-catalogue-grid {
        grid-template-columns: 1fr;
    }

    .gallery-slab-card {
        min-height: 330px;
    }
}

/* Corrected gallery UI: image-first archive, not product cards. */
.gallery-catalogue {
    padding: 128px 0 96px;
    background: #f7f4ee;
}

.gallery-catalogue-hero {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.gallery-catalogue-hero span {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.gallery-catalogue-hero h1 {
    margin: 0;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.02;
}

.gallery-catalogue-hero p {
    max-width: 560px;
    margin: 18px auto 0;
    color: var(--color-text-muted);
    font-size: 15px;
    line-height: 1.75;
}

.gallery-catalogue-pills {
    margin-bottom: 28px;
}

.gallery-catalogue-search {
    margin-bottom: 34px;
}

.gallery-catalogue-rule {
    margin-bottom: 30px;
}

.gallery-catalogue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 18px;
}

.gallery-slab-card {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #111;
    box-shadow: none;
}

.gallery-slab-card:nth-child(6n + 1),
.gallery-slab-card:nth-child(6n + 4) {
    grid-row: span 2;
}

.gallery-slab-card:hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.gallery-slab-image {
    display: block;
    min-height: 0;
}

.gallery-slab-image::before,
.gallery-slab-image::after {
    content: none;
}

.gallery-slab-image img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    box-shadow: none;
    filter: saturate(.9);
    transition: transform .45s ease, filter .45s ease;
}

.gallery-slab-card:nth-child(6n + 1) .gallery-slab-image img,
.gallery-slab-card:nth-child(6n + 4) .gallery-slab-image img {
    min-height: 660px;
}

.gallery-slab-card:hover .gallery-slab-image img {
    filter: saturate(1.05);
    transform: scale(1.04);
}

.gallery-slab-body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 64px 22px 22px;
    color: #fff;
    text-align: left;
    background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
}

.gallery-slab-body span {
    min-height: 0;
    padding: 0;
    border-radius: 0;
    color: rgba(255,255,255,.72);
    background: transparent;
    font-size: 10px;
}

body.page-gallery-catalogue .gallery-slab-body h2 {
    margin-top: 8px;
    color: #fff !important;
    font-family: var(--font-heading) !important;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    font-weight: 500 !important;
}

@media (max-width: 900px) {
    .gallery-catalogue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gallery-catalogue {
        padding-top: 104px;
    }

    .gallery-catalogue-grid {
        grid-template-columns: 1fr;
    }

    .gallery-slab-card:nth-child(n) .gallery-slab-image img {
        min-height: 360px;
    }
}

/* Gallery colour repair: keep image mosaic, restore dark/gold theme. */
body.page-gallery-catalogue,
body.page-gallery-catalogue #mainContent,
body.page-gallery-catalogue .gallery-catalogue {
    background: var(--lux-bg);
}

body.page-gallery-catalogue .gallery-catalogue {
    color: var(--lux-white);
}

body.page-gallery-catalogue .gallery-catalogue-hero span {
    color: var(--lux-gold);
}

body.page-gallery-catalogue .gallery-catalogue-hero h1 {
    color: var(--lux-white);
}

body.page-gallery-catalogue .gallery-catalogue-hero p {
    color: var(--lux-muted);
}

body.page-gallery-catalogue .gallery-catalogue-pill {
    border-color: rgba(245,242,238,.18);
    color: rgba(245,242,238,.78);
    background: rgba(255,255,255,.04);
    box-shadow: none;
}

body.page-gallery-catalogue .gallery-catalogue-pill:hover,
body.page-gallery-catalogue .gallery-catalogue-pill.active {
    border-color: var(--lux-gold);
    color: #111;
    background: var(--lux-gold);
    box-shadow: none;
}

body.page-gallery-catalogue .gallery-catalogue-searchbox {
    border-color: rgba(201,168,76,.65);
    color: var(--lux-gold);
    background: rgba(255,255,255,.04);
}

body.page-gallery-catalogue .gallery-catalogue-searchbox input {
    color: var(--lux-white);
}

body.page-gallery-catalogue .gallery-catalogue-searchbox input::placeholder {
    color: rgba(245,242,238,.62);
}

body.page-gallery-catalogue .gallery-catalogue-search button,
body.page-gallery-catalogue .gallery-catalogue-empty a {
    border-color: var(--lux-gold);
    color: #111;
    background: var(--lux-gold);
    box-shadow: none;
}

body.page-gallery-catalogue .gallery-catalogue-search button:hover,
body.page-gallery-catalogue .gallery-catalogue-empty a:hover {
    color: var(--lux-white);
    background: transparent;
}

body.page-gallery-catalogue .gallery-catalogue-rule {
    background: var(--lux-line);
}

body.page-gallery-catalogue .gallery-catalogue-empty h1 {
    color: var(--lux-white);
}

body.page-gallery-catalogue .gallery-catalogue-empty p {
    color: var(--lux-muted);
}

body.page-gallery-catalogue .pagination-link {
    border-color: rgba(245,242,238,.18);
    color: rgba(245,242,238,.78);
    background: rgba(255,255,255,.04);
}

body.page-gallery-catalogue .pagination-link:hover,
body.page-gallery-catalogue .pagination-link.active {
    border-color: var(--lux-gold);
    color: #111;
    background: var(--lux-gold);
}

/* Minimal gallery viewer, replacing the reused inspection modal. */
body.page-gallery-catalogue .lightbox {
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 56px);
    background: rgba(0,0,0,.92);
    backdrop-filter: blur(10px);
}

body.page-gallery-catalogue .lightbox-dialog {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: min(100%, 1320px);
    height: min(100%, 880px);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

body.page-gallery-catalogue .lightbox.active .lightbox-dialog {
    transform: none;
}

body.page-gallery-catalogue .lightbox-stage {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.page-gallery-catalogue .lightbox-stage:hover .lightbox-image {
    transform: none;
}

body.page-gallery-catalogue .lightbox-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 28px 90px rgba(0,0,0,.45);
}

body.page-gallery-catalogue .lightbox-close,
body.page-gallery-catalogue .lightbox-prev,
body.page-gallery-catalogue .lightbox-next {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    background: rgba(10,10,10,.62);
    box-shadow: none;
}

body.page-gallery-catalogue .lightbox-close {
    top: 0;
    right: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
}

body.page-gallery-catalogue .lightbox-prev,
body.page-gallery-catalogue .lightbox-next {
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 34px;
    transform: translateY(-50%);
}

body.page-gallery-catalogue .lightbox-prev {
    left: 0;
}

body.page-gallery-catalogue .lightbox-next {
    right: 0;
}

body.page-gallery-catalogue .lightbox-close:hover,
body.page-gallery-catalogue .lightbox-prev:hover,
body.page-gallery-catalogue .lightbox-next:hover {
    border-color: var(--lux-gold);
    color: #111;
    background: var(--lux-gold);
}

body.page-gallery-catalogue .lightbox-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 20px;
    align-items: end;
    width: min(100%, 900px);
    margin: 18px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.page-gallery-catalogue .lightbox-title {
    margin: 0;
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 500;
    line-height: 1.2;
}

body.page-gallery-catalogue .lightbox-caption {
    grid-column: 1 / -1;
    max-width: 760px;
    margin: 0;
    color: rgba(255,255,255,.68);
    font-size: 14px;
    line-height: 1.6;
}

body.page-gallery-catalogue .lightbox-counter {
    color: var(--lux-gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

@media (max-width: 700px) {
    body.page-gallery-catalogue .lightbox {
        padding: 14px;
    }

    body.page-gallery-catalogue .lightbox-image {
        max-height: calc(100vh - 150px);
    }

    body.page-gallery-catalogue .lightbox-close {
        top: 4px;
        right: 4px;
    }

    body.page-gallery-catalogue .lightbox-prev,
    body.page-gallery-catalogue .lightbox-next {
        width: 42px;
        height: 42px;
        font-size: 30px;
    }

    body.page-gallery-catalogue .lightbox-meta {
        grid-template-columns: 1fr;
        padding: 0 4px;
    }
}
