/* =========================================================
   Luxury Gallery — V-Vision Frontend
   Tone: #233C3A / #17201F / #F6F4EF / #C8B89A
   Font: Plus Jakarta Sans
   ========================================================= */

.luxgal-wrap {
    --luxgal-primary: #233C3A;
    --luxgal-primary-dark: #17201F;
    --luxgal-primary-soft: #315D59;
    --luxgal-text: #293130;
    --luxgal-muted: #7E8582;
    --luxgal-bg: #F6F4EF;
    --luxgal-bg-soft: #ECE9E1;
    --luxgal-white: #FFFFFF;
    --luxgal-accent: #C8B89A;
    --luxgal-line: rgba(35, 60, 58, .10);
    --luxgal-per-row: 8;

    position: relative;
    isolation: isolate;
    width: min(1340px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--luxgal-text);
}

.luxgal-wrap::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 16px;
    left: 50%;
    width: min(720px, 78vw);
    height: 240px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 184, 154, .11), transparent 68%);
    pointer-events: none;
}

.luxgal-wrap *,
.luxgal-wrap *::before,
.luxgal-wrap *::after {
    box-sizing: border-box;
}

/* Header */
.luxgal-header {
    position: relative;
    max-width: 760px;
    margin: 0 auto 38px;
    text-align: center;
}

.luxgal-header-eyebrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 1px;
    margin-bottom: 17px;
    background: linear-gradient(90deg, transparent, var(--luxgal-accent), transparent);
}

.luxgal-header-eyebrow::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border: 1px solid rgba(35, 60, 58, .16);
    border-radius: 50%;
    background: var(--luxgal-bg);
    box-shadow: 0 0 0 5px rgba(200, 184, 154, .10);
    transform: translate(-50%, -50%);
}

.luxgal-header-title {
    margin: 0;
    color: var(--luxgal-primary-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(30px, 3.3vw, 48px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -.045em;
    text-transform: none;
}

.luxgal-header-subtitle {
    max-width: 600px;
    margin: 13px auto 0;
    color: var(--luxgal-muted);
    font-size: 14px;
    line-height: 1.75;
    font-weight: 400;
    letter-spacing: 0;
}

/* Grid */
.luxgal-grid {
    display: grid;
    grid-template-columns: repeat(var(--luxgal-per-row), minmax(0, 1fr));
    gap: 11px;
}

.luxgal-item {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid rgba(35, 60, 58, .07);
    border-radius: 14px;
    background: #E9E7E0;
    box-shadow: 0 8px 20px rgba(35, 60, 58, .04);
    transform: translateZ(0);
    transition: transform .38s cubic-bezier(.2,.7,.2,1), box-shadow .38s ease, border-color .38s ease;
}

.luxgal-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}

.luxgal-item-btn {
    all: unset;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.luxgal-item-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.94) contrast(1.01) brightness(1.015);
    transition: transform .75s cubic-bezier(.2,.7,.2,1), filter .45s ease;
}

.luxgal-item-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 10px;
    background: linear-gradient(180deg, transparent 48%, rgba(23, 32, 31, .24) 100%);
    opacity: 0;
    transition: opacity .3s ease;
}

.luxgal-item-overlay i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.52);
    border-radius: 50%;
    color: var(--luxgal-primary);
    background: rgba(255,255,255,.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 22px rgba(23,32,31,.14);
    font-size: 13px;
    transform: translateY(7px) scale(.94);
    transition: transform .3s ease, background .3s ease, color .3s ease;
}

@media (hover:hover) {
    .luxgal-item:hover {
        transform: translateY(-4px);
        border-color: rgba(35,60,58,.15);
        box-shadow: 0 16px 32px rgba(35, 60, 58, .10);
    }
    .luxgal-item:hover .luxgal-item-btn img {
        transform: scale(1.055);
        filter: saturate(1) contrast(1.015) brightness(1.01);
    }
    .luxgal-item:hover .luxgal-item-overlay {
        opacity: 1;
    }
    .luxgal-item:hover .luxgal-item-overlay i {
        transform: translateY(0) scale(1);
    }
    .luxgal-item-overlay i:hover {
        color: #fff;
        background: var(--luxgal-primary);
    }
}

/* Visibility */
.luxgal-item.luxgal-hide-desktop {
    display: none;
}

.luxgal-wrap.is-expanded .luxgal-item.luxgal-hide-desktop,
.luxgal-wrap.is-expanded .luxgal-item.luxgal-hide-mobile {
    display: block;
    animation: luxgal-fade-in .45s ease both;
}

@keyframes luxgal-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* More button */
.luxgal-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.luxgal-more-btn {
    all: unset;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 22px;
    cursor: pointer;
    border: 1px solid rgba(35,60,58,.12);
    border-radius: 999px;
    color: var(--luxgal-primary);
    background: rgba(255,255,255,.82);
    box-shadow: 0 10px 24px rgba(35,60,58,.07), inset 0 1px 0 rgba(255,255,255,.85);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: none;
    transition: transform .28s ease, box-shadow .28s ease, background .28s ease, color .28s ease, border-color .28s ease;
}

.luxgal-more-btn i {
    font-size: 10px;
    transition: transform .28s ease;
}

@media (hover:hover) {
    .luxgal-more-btn:hover {
        color: #fff;
        border-color: var(--luxgal-primary);
        background: var(--luxgal-primary);
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(35,60,58,.16);
    }
    .luxgal-more-btn:hover i {
        transform: translateY(2px);
    }
}

.luxgal-label-less { display: none; }
.luxgal-wrap.is-expanded .luxgal-label-more { display: none; }
.luxgal-wrap.is-expanded .luxgal-label-less { display: inline; }
.luxgal-wrap.is-expanded .luxgal-more-icon { transform: rotate(180deg); }
.luxgal-wrap.is-expanded .luxgal-more-btn:hover i { transform: rotate(180deg) translateY(2px); }

/* Lightbox */
.luxgal-lightbox {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2147483646 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: opacity .28s ease, visibility .28s ease;
}

.luxgal-lightbox.is-open {
    visibility: visible;
    opacity: 1;
}

.luxgal-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(49,93,89,.18), transparent 35%),
        rgba(18, 28, 27, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.luxgal-lightbox-inner {
    position: relative;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.luxgal-lightbox-topbar {
    position: absolute;
    z-index: 8;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
}

.luxgal-lightbox-counter {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
}

.luxgal-current-index {
    color: #fff;
}

.luxgal-lightbox-actions {
    display: flex;
    gap: 8px;
}

.luxgal-lightbox-zoom,
.luxgal-lightbox-close,
.luxgal-lightbox-nav {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.13);
    color: #fff;
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 26px rgba(0,0,0,.14);
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.luxgal-lightbox-zoom,
.luxgal-lightbox-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 13px;
}

.luxgal-lightbox-zoom.is-zoomed {
    color: var(--luxgal-primary-dark);
    background: var(--luxgal-accent);
    border-color: var(--luxgal-accent);
}

@media (hover:hover) {
    .luxgal-lightbox-zoom:hover,
    .luxgal-lightbox-close:hover,
    .luxgal-lightbox-nav:hover {
        background: var(--luxgal-primary-soft);
        border-color: rgba(255,255,255,.20);
        transform: translateY(-2px);
    }
}

.luxgal-lightbox-stage {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 84px;
    overflow: hidden;
}

.luxgal-lightbox-image {
    max-width: min(1160px, 100%);
    max-height: calc(100dvh - 144px);
    object-fit: contain;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(255,255,255,.03);
    box-shadow: 0 34px 90px rgba(0,0,0,.34);
    opacity: 0;
    cursor: zoom-in;
    user-select: none;
    transform: scale(.985);
    transition: transform .25s ease, opacity .25s ease;
}

.luxgal-lightbox-image.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.luxgal-lightbox-image.is-zoomed {
    cursor: grab;
    transform: scale(1.9);
}

.luxgal-lightbox-image.is-zoomed.is-dragging {
    cursor: grabbing;
    transition: none;
}

.luxgal-lightbox-nav {
    position: absolute;
    z-index: 8;
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 13px;
    transform: translateY(-50%);
}

.luxgal-lightbox-prev { left: 22px; }
.luxgal-lightbox-next { right: 22px; }

/* Responsive */
@media (max-width: 1100px) {
    .luxgal-grid {
        grid-template-columns: repeat(min(6, var(--luxgal-per-row)), minmax(0, 1fr));
    }
    .luxgal-wrap {
        width: min(100% - 32px, 980px);
        padding: 52px 0;
    }
}

@media (max-width: 768px) {
    .luxgal-wrap {
        width: calc(100% - 24px);
        padding: 38px 0;
    }
    .luxgal-wrap::before {
        top: 0;
        width: 90vw;
        height: 180px;
    }
    .luxgal-header {
        margin-bottom: 24px;
    }
    .luxgal-header-eyebrow {
        width: 46px;
        margin-bottom: 13px;
    }
    .luxgal-header-title {
        font-size: clamp(25px, 7vw, 34px);
    }
    .luxgal-header-subtitle {
        margin-top: 9px;
        max-width: 92%;
        font-size: 12px;
        line-height: 1.65;
    }
    .luxgal-grid {
        grid-template-columns: repeat(var(--luxgal-per-row-mobile, 3), minmax(0, 1fr));
        gap: 7px;
    }
    .luxgal-item {
        border-radius: 10px;
        box-shadow: 0 5px 14px rgba(35,60,58,.04);
    }
    .luxgal-item.luxgal-hide-desktop { display: block; }
    .luxgal-item.luxgal-hide-mobile { display: none; }
    .luxgal-wrap.is-expanded .luxgal-item.luxgal-hide-mobile { display: block; }
    .luxgal-item-overlay {
        display: none;
    }
    .luxgal-more-wrap {
        margin-top: 22px;
    }
    .luxgal-more-btn {
        min-height: 43px;
        padding: 0 18px;
        font-size: 10px;
        box-shadow: 0 8px 18px rgba(35,60,58,.06);
    }
    .luxgal-lightbox-topbar {
        padding: 12px;
    }
    .luxgal-lightbox-counter {
        min-height: 34px;
        padding: 0 11px;
        font-size: 10px;
    }
    .luxgal-lightbox-zoom,
    .luxgal-lightbox-close {
        width: 36px;
        height: 36px;
    }
    .luxgal-lightbox-stage {
        padding: 62px 14px;
    }
    .luxgal-lightbox-image {
        max-height: calc(100vh - 124px);
        border-radius: 12px;
    }
    .luxgal-lightbox-nav {
        width: 38px;
        height: 38px;
        top: auto;
        bottom: 14px;
        transform: none;
        background: rgba(35,60,58,.78);
    }
    .luxgal-lightbox-prev { left: calc(50% - 46px); }
    .luxgal-lightbox-next { right: calc(50% - 46px); }
}

@media (max-width: 480px) {
    .luxgal-wrap {
        width: calc(100% - 18px);
        padding: 30px 0;
    }
    .luxgal-header-title {
        font-size: 24px;
    }
    .luxgal-grid {
        gap: 5px;
    }
    .luxgal-item {
        border-radius: 8px;
    }
    .luxgal-more-btn {
        min-height: 40px;
        padding: 0 15px;
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .luxgal-item,
    .luxgal-item-btn img,
    .luxgal-lightbox-image,
    .luxgal-more-btn,
    .luxgal-more-btn i,
    .luxgal-lightbox-zoom,
    .luxgal-lightbox-close,
    .luxgal-lightbox-nav {
        transition: none !important;
    }
}

.luxgal-item-btn:focus-visible,
.luxgal-more-btn:focus-visible,
.luxgal-lightbox-nav:focus-visible,
.luxgal-lightbox-zoom:focus-visible,
.luxgal-lightbox-close:focus-visible {
    outline: 2px solid var(--luxgal-accent);
    outline-offset: 3px;
}

body.luxgal-noscroll {
    overflow: hidden !important;
}
