/* ============================================================
   Avani Design — Our Products (category list, gallery, viewer)
   Builds on site.css: same palette, same fonts, same motion.
   ============================================================ */

/* ---------- Hero ---------- */
.gx-hero { padding-bottom: 96px; }
.gx-hero__bg { background: radial-gradient(120% 90% at 20% 10%, var(--navy-600), var(--navy-900) 70%); }
.gx-hero__bg img { transform: scale(1.08); animation: gx-kenburns 18s var(--ease) forwards; filter: saturate(1.05); }
@keyframes gx-kenburns { to { transform: scale(1); } }
.gx-hero .page-hero__ov { background: linear-gradient(180deg, rgba(10,31,46,.55) 0%, rgba(10,31,46,.78) 55%, rgba(10,31,46,.96) 100%); }
.gx-hero__kicker { color: var(--gold-soft); justify-content: center; }
.gx-hero__kicker::after { content: ""; width: 34px; height: 2px; background: var(--gold); display: inline-block; }
.gx-hero__lead { max-width: 640px; margin: 6px auto 0; color: #d6e0e7; font-size: 1.05rem; }
.gx-hero__stats {
    display: inline-flex; align-items: center; gap: 14px; margin-top: 22px;
    padding: 10px 22px; border-radius: 50px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px);
    font-size: .9rem; letter-spacing: .5px; color: #e3eaef;
}
.gx-hero__stats b { color: var(--gold-soft); font-size: 1.1rem; margin-right: 4px; font-family: var(--ff-head); }
.gx-hero__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.gx-hero .crumb { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.gx-section { padding-top: 80px; }
.gx-intro { margin-bottom: 48px; }

/* ---------- Category cards ---------- */
/* Up to three a row; with only one or two categories they share the whole row. */
.gx-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-auto-rows: 380px; gap: 24px; }
.gx-cats--feature { grid-template-columns: repeat(3, 1fr); }
.gx-cats--feature > .gx-cat:first-child { grid-column: span 2; grid-row: span 2; }

.gx-cat {
    position: relative; display: block; overflow: hidden; border-radius: 22px;
    background: var(--navy-800); color: #fff; isolation: isolate;
    box-shadow: var(--shadow-md);
    transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.gx-cat::after {
    content: ""; position: absolute; inset: 10px; border-radius: 16px; z-index: 3; pointer-events: none;
    border: 1px solid rgba(228, 201, 131, 0); transition: border-color .6s var(--ease), inset .6s var(--ease);
}
.gx-cat:hover, .gx-cat:focus-visible { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.gx-cat:hover::after, .gx-cat:focus-visible::after { border-color: rgba(228, 201, 131, .75); inset: 14px; }
.gx-cat:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.gx-cat__media { position: absolute; inset: 0; z-index: -2; }
.gx-cat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gx-cat:hover .gx-cat__media img { transform: scale(1.08); }
.gx-cat__shade {
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(10,31,46,0) 30%, rgba(10,31,46,.55) 62%, rgba(10,31,46,.95) 100%);
    transition: opacity .6s var(--ease);
}
.gx-cat__num {
    position: absolute; top: 22px; left: 26px; font-family: var(--ff-head); font-weight: 700; font-size: 1rem;
    letter-spacing: 2px; color: rgba(255,255,255,.85);
    padding-bottom: 4px; border-bottom: 2px solid var(--red);
}
.gx-cat__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; display: grid; gap: 6px; }
.gx-cat__count {
    justify-self: start; display: inline-flex; align-items: center; gap: 7px;
    font-size: .74rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--navy-900); background: var(--gold-soft); padding: 5px 12px; border-radius: 50px;
}
.gx-cat__name { font-family: var(--ff-head); font-weight: 700; font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.15; }
.gx-cats--feature > .gx-cat:first-child .gx-cat__name { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.gx-cat__desc {
    font-size: .9rem; color: #cdd8df; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gx-cat__cta {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 6px;
    font-weight: 600; font-size: .9rem; color: var(--gold-soft);
    opacity: .85; transform: translateY(0); transition: gap .4s var(--ease), color .4s var(--ease);
}
.gx-cat:hover .gx-cat__cta { gap: 16px; color: #fff; }

/* ---------- Empty state ---------- */
.gx-empty { max-width: 560px; margin: 0 auto; text-align: center; padding: 50px 30px; background: #fff; border-radius: 24px; box-shadow: var(--shadow-sm); }
.gx-empty__icon { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-2); color: var(--navy-800); font-size: 2rem; }
.gx-empty h2 { font-size: 1.7rem; }
.gx-empty p { color: var(--muted); }

/* ---------- Category switcher (sticky under the header) ---------- */
.gx-switch {
    position: sticky; top: 70px; z-index: 50;
    background: rgba(247, 242, 232, .92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.gx-switch__inner {
    display: flex; gap: 10px; overflow-x: auto; padding-top: 14px; padding-bottom: 14px;
    scrollbar-width: none; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent);
}
.gx-switch__inner::-webkit-scrollbar { display: none; }
.gx-chip {
    flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 50px; font-size: .88rem; font-weight: 500; white-space: nowrap;
    background: #fff; color: var(--navy-900); border: 1px solid var(--line);
    transition: all .3s var(--ease);
}
.gx-chip span { font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 50px; background: var(--cream-2); color: var(--muted); }
.gx-chip:hover { border-color: var(--gold); transform: translateY(-2px); }
.gx-chip.is-active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); box-shadow: 0 8px 20px rgba(10,31,46,.25); }
.gx-chip.is-active span { background: var(--red); color: #fff; }
.gx-chip--all { background: transparent; }

/* ---------- Gallery toolbar ---------- */
.gx-section--gallery { padding-top: 44px; }
.gx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.gx-toolbar__hint { margin: 0; color: var(--muted); font-size: .92rem; }
.gx-toolbar__hint i { color: var(--red); margin-right: 6px; }
.gx-toolbar__play { padding: 11px 24px; }

/* ---------- Justified photo grid: rows fill the width, nothing is cropped away ---------- */
.gx-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.gx-grid::after { content: ""; flex-grow: 999999; }
.gx-item {
    --row: 290px;
    position: relative; display: block; overflow: hidden; border-radius: 14px;
    flex-grow: calc(var(--ar) * 100);
    flex-basis: calc(var(--ar) * var(--row));
    aspect-ratio: var(--ar);
    background: linear-gradient(110deg, var(--cream-2) 30%, #f6efe2 50%, var(--cream-2) 70%);
    background-size: 200% 100%;
    animation: gx-shimmer 1.6s linear infinite;
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    opacity: 0; transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .4s var(--ease);
}
.gx-item.in { opacity: 1; transform: none; }
.gx-item.is-loaded { animation: none; background: var(--cream-2); }
@keyframes gx-shimmer { to { background-position: -200% 0; } }

.gx-item img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity .6s var(--ease), transform 1s var(--ease);
    -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none;
}
.gx-item.is-loaded img { opacity: 1; }
.gx-item__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,31,46,.8)); opacity: 0; transition: opacity .45s var(--ease); }
.gx-item__zoom {
    position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--navy-900);
    transform: scale(.6); opacity: 0; transition: all .45s var(--ease);
}
.gx-item__cap {
    position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; font-weight: 500; font-size: .9rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transform: translateY(10px); opacity: 0; transition: all .45s var(--ease);
}
.gx-item:hover { box-shadow: var(--shadow-md); }
.gx-item:hover img { transform: scale(1.06); }
.gx-item:hover .gx-item__shade, .gx-item:focus-visible .gx-item__shade { opacity: 1; }
.gx-item:hover .gx-item__zoom, .gx-item:focus-visible .gx-item__zoom { opacity: 1; transform: none; }
.gx-item:hover .gx-item__cap, .gx-item:focus-visible .gx-item__cap { opacity: 1; transform: none; }
.gx-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.gx-more { margin-top: 56px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Photo viewer
   ============================================================ */
html.gx-locked, html.gx-locked body { overflow: hidden; }

.gx-lb {
    position: fixed; inset: 0; z-index: 3000; color: #fff;
    display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
    /* Without this the column grows to fit the thumbnail strip and the viewer
       ends up wider than a phone's screen. */
    grid-template-columns: minmax(0, 1fr);
    opacity: 0; transition: opacity .35s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.gx-lb[hidden] { display: none; }
.gx-lb.is-open { opacity: 1; }
.gx-lb__backdrop { position: absolute; inset: 0; background: rgba(6, 16, 24, .96); z-index: -1; }
@supports (backdrop-filter: blur(1px)) {
    .gx-lb__backdrop { background: rgba(6, 16, 24, .88); backdrop-filter: blur(18px) saturate(1.2); }
}

.gx-lb__top {
    display: flex; align-items: center; gap: 16px;
    padding: max(12px, env(safe-area-inset-top)) 18px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,.45), transparent);
}
.gx-lb__count { font-family: var(--ff-head); font-weight: 700; letter-spacing: 1px; font-size: 1rem; color: var(--gold-soft); white-space: nowrap; }
.gx-lb__title { flex: 1; min-width: 0; font-size: .95rem; color: #dfe7ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-lb__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.gx-lb__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 44px; height: 44px; padding: 0 12px; border-radius: 50px; border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer;
    transition: background .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.gx-lb__btn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); }
.gx-lb__btn:active { transform: scale(.94); }
.gx-lb__btn--accent { background: var(--red); border-color: var(--red); padding: 0 18px; box-shadow: 0 8px 22px rgba(224,52,42,.35); }
.gx-lb__btn--accent:hover { background: var(--red-dark); border-color: var(--red-dark); }
.gx-lb__btn.is-busy { pointer-events: none; opacity: .75; }
.gx-lb__btn.is-on { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }

.gx-lb__progress { height: 3px; background: rgba(255,255,255,.08); }
.gx-lb__progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--red)); }
.gx-lb.is-playing .gx-lb__progress span { animation: gx-progress var(--gx-delay, 4s) linear forwards; }
@keyframes gx-progress { from { width: 0; } to { width: 100%; } }

.gx-lb__stage { position: relative; overflow: hidden; touch-action: none; user-select: none; }
.gx-lb__track { position: absolute; inset: 0; display: flex; will-change: transform; }
.gx-lb__track.is-animating { transition: transform .5s var(--ease); }
/* Flex rather than grid: the picture's max-height needs a parent of definite height to fit into. */
.gx-lb__slide { position: relative; flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 18px 76px; overflow: hidden; }
.gx-lb__slide img {
    max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
    opacity: 0; transform: scale(.97); transition: opacity .45s var(--ease), transform .45s var(--ease);
    -webkit-user-drag: none; -webkit-touch-callout: none; cursor: zoom-in;
}
.gx-lb__slide img.is-loaded { opacity: 1; transform: none; }
.gx-lb__slide.is-zoomed img { transform: scale(2.2); cursor: zoom-out; transition: transform .35s var(--ease); box-shadow: none; }

.gx-lb__spinner {
    position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px;
    border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--gold);
    animation: gx-spin .8s linear infinite; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.gx-lb.is-loading .gx-lb__spinner { opacity: 1; }
@keyframes gx-spin { to { transform: rotate(360deg); } }

.gx-lb__nav {
    position: absolute; top: 50%; z-index: 5; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%;
    display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08); color: #fff; font-size: 1.15rem; cursor: pointer;
    transition: all .3s var(--ease); backdrop-filter: blur(6px);
}
.gx-lb__nav:hover { background: #fff; color: var(--navy-900); transform: scale(1.06); }
.gx-lb__nav--prev { left: 14px; }
.gx-lb__nav--next { right: 14px; }
.gx-lb__nav[disabled] { opacity: 0; pointer-events: none; }

.gx-lb__thumbs {
    display: flex; gap: 8px; overflow-x: auto; padding: 12px 18px max(14px, env(safe-area-inset-bottom));
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
    background: linear-gradient(0deg, rgba(0,0,0,.45), transparent);
}
.gx-lb__thumb {
    flex: none; width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
    border: 2px solid transparent; background: rgba(255,255,255,.06); opacity: .5;
    transition: opacity .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.gx-lb__thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gx-lb__thumb:hover { opacity: .85; }
.gx-lb__thumb.is-active { opacity: 1; border-color: var(--gold); transform: translateY(-3px); }

.gx-lb__toast {
    position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%);
    padding: 10px 20px; border-radius: 50px; background: #fff; color: var(--navy-900);
    font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); white-space: nowrap;
    animation: gx-toast .3s var(--ease);
}
.gx-lb__toast[hidden] { display: none; }
@keyframes gx-toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .gx-cats { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 340px; }
    .gx-cats--feature > .gx-cat:first-child { grid-column: span 2; grid-row: span 1; }
    .gx-item { --row: 230px; }
}

@media (max-width: 768px) {
    .gx-switch { top: 70px; }
    .gx-lb__label, .gx-lb__btn--desk { display: none; }
    .gx-lb__btn--accent { padding: 0 14px; }
    .gx-lb__slide { padding: 10px 6px; }
    .gx-lb__nav { width: 44px; height: 44px; margin-top: -22px; background: rgba(0,0,0,.35); }
    .gx-lb__nav--prev { left: 8px; }
    .gx-lb__nav--next { right: 8px; }
    .gx-lb__thumb { width: 52px; height: 52px; }
    .gx-lb__top { gap: 10px; padding-left: 12px; padding-right: 12px; }
    .gx-lb__title { display: none; }
    .gx-lb__count { flex: 1; }
}

@media (max-width: 560px) {
    .gx-section { padding-top: 56px; }
    .gx-intro { margin-bottom: 32px; }
    .gx-cats { grid-template-columns: 1fr; grid-auto-rows: 300px; gap: 18px; }
    .gx-cats--feature > .gx-cat:first-child { grid-column: auto; }
    .gx-cat__body { padding: 22px; }
    .gx-grid { gap: 8px; }
    .gx-item { --row: 150px; border-radius: 10px; }
    .gx-item__cap, .gx-item__zoom { display: none; }
    .gx-toolbar { justify-content: center; text-align: center; }
    .gx-toolbar__play { width: 100%; justify-content: center; }
    .gx-hero__stats { font-size: .82rem; padding: 8px 16px; }
    .gx-lb__tools { gap: 6px; }
    .gx-lb__btn { min-width: 40px; height: 40px; padding: 0 10px; }
    .gx-lb__nav { display: none; }
}

@media (hover: none) {
    .gx-item__shade { opacity: .55; }
    .gx-item__cap { opacity: 1; transform: none; font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .gx-hero__bg img { animation: none; transform: none; }
    .gx-item, .gx-item img, .gx-cat, .gx-cat__media img, .gx-lb__track.is-animating { transition: none; }
    .gx-item { opacity: 1; transform: none; }
}
