.gallery-item { position: relative; margin: 0; }
.gallery-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
}
.gallery-trigger img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.gallery-item:hover .gallery-trigger img { transform: scale(1.04); }
.gallery-trigger::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(23,19,16,.28), transparent 45%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}
.gallery-item:hover .gallery-trigger::after { opacity: 1; }

.glbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(23,19,16,.82);
}
.glbox[hidden] { display: none !important; }
.glbox-dialog {
    position: relative;
    max-width: min(1080px, 94vw);
    max-height: 90dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.glbox-img {
    max-width: 100%;
    max-height: calc(90dvh - 72px);
    width: auto;
    height: auto;
    object-fit: contain;
    background: #111;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.glbox-caption {
    color: rgba(255,255,255,.88);
    font-size: 14px;
    letter-spacing: 0.04em;
    text-align: center;
}
.glbox-close,
.glbox-prev,
.glbox-next {
    appearance: none;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(23,19,16,.45);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.glbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    z-index: 2;
    font-size: 22px;
    line-height: 1;
}
.glbox-prev,
.glbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    z-index: 2;
}
.glbox-prev { left: 16px; }
.glbox-next { right: 16px; }
.glbox-close:hover,
.glbox-prev:hover,
.glbox-next:hover {
    border-color: var(--gold, #b8956a);
    color: var(--gold-light, #d4b88c);
}
.glbox-close:focus-visible,
.glbox-prev:focus-visible,
.glbox-next:focus-visible,
.gallery-trigger:focus-visible {
    outline: 2px solid var(--gold, #b8956a);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .glbox { padding: 12px; }
    .glbox-prev { left: 8px; }
    .glbox-next { right: 8px; }
    .glbox-close { top: 10px; right: 10px; width: 38px; height: 38px; }
    .gallery-trigger img { height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-trigger img { transition: none; }
}
