/* ─── GALLERY PAGE ──────────────────────────────────────── */
.gallery-page { max-width: var(--container); margin: 0 auto; padding: 1px; }
.gallery-page h1 {
  font-family: 'Jost', Arial, sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: -5px;
}
.gallery-page .sub {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: 'Jost', Arial, sans-serif;
}

.gallery-viewer-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: -70px;
  width: 1008px;   
}


.gallery-viewer-shell {
  position: relative;
  width: 868px;
  height: 579px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-viewer {
  position: relative;
  width: 868px;
  max-width: 868px;
  height: 579px;
  max-height: 579px;
   flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
  background: #fff;
 
}
.gallery-viewer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-page .viewer-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 40%);
}

.btn-closer-look {
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: auto;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-closer-look:hover { background: rgba(255,255,255,0.8); transform: scale(1.03); }

.btn-buy-overlay svg{
  font-family: "jeanne-moderno-geometrique", sans-serif;
  font-size: 20px;
  color: var(--text);
  font-weight: 800;
  font-style: normal;
  width: 100px; height: 40px;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 5px 18px;
  margin-left: auto;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-buy-overlay:hover svg { background: rgba(255,255,255,0.8); transform: scale(1.03); }

.viewer-arrow-outer {
  flex-shrink: 0;
  width: 70px;
  height: 579px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.viewer-arrow-outer svg {
  width: 42px;
  height: 42px;
  margin: 10px;
  fill: rgb(44, 44, 44);
  border-radius: 25px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.2s, transform 0.2s;
}
.viewer-arrow-outer:hover svg {
  fill: var(--text);
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.gallery-viewer-wrap:hover .viewer-arrow-outer {
  opacity: 1;
}

.gallery-btn {
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  cursor: pointer;
  border: none;
  background: rgba(255,255,255,0.5);
  color: var(--text);
  font-family: inherit;
}
.gallery-btn:hover { background: rgba(255,255,255,0.8); transform: scale(1.02); }
.gallery-viewer:hover .gallery-btn {
  transition: opacity 0.4s, background 0.2s, transform 0.2s;
  opacity: 1;
  pointer-events: auto;
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(7, 118px);
  grid-template-rows: 84px;
  gap: 7px;
  margin-top: 10px;
  width: 868px;           /* keep as fallback; JS will update this too */
  overflow: visible;
}

.thumb-item {
  width: 118px;
  height: 84px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.2s ease;
}
.thumb-item:hover { transform: scale(1.03); }
.thumb-item.active { box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* Buy button — always pinned to column 7 */
.thumb-buy-btn {
  grid-column: 7;
  grid-row: 1;
  width: 118px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.2s, transform 0.2s;
}
.thumb-buy-btn:hover {
  background: #fff;
  transform: scale(1.03);
}
.thumb-buy-btn svg {
  width: 62%;
  height: auto;
  fill: rgb(44, 44, 44);
  transition: fill 0.2s;
}
.thumb-buy-btn:hover svg {
  fill: var(--text);
}

/* ─── GALLERY LIGHTBOX ──────────────────────────────────── */
#gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#gallery-lightbox.open {
  display: flex;
}

/* Outer row: [arrow] [image] [arrow] */
.glb-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 96vw;
}

/* Arrow zones — sit outside the image, full image height */
.glb-arrow-zone {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  /* Hidden by default; shown when .glb-inner is hovered */
  opacity: 0;
  transition: opacity 0.2s;
  /* Height matches image via align-self stretch on the row */
  align-self: stretch;
}
.glb-inner:hover .glb-arrow-zone {
  opacity: 1;
}
.glb-arrow-zone svg {
  width: 42px;
  height: 42px;
  fill: #fff;
  background: var(--text);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.068);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  transition: background 0.2s, transform 0.15s;
  padding: 8px;
}
.glb-arrow-zone:hover svg {
  background: rgba(20,20,20,0.9);
  transform: scale(1.08);
}

/* Image wrapper — fixed outer frame so arrows stay put */
.glb-img-wrap {
  position: relative;
  line-height: 0;
  flex-shrink: 0;
  width: 65vw;
  height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inner wrapper sizes to the image's natural aspect ratio */
.glb-img-inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--glb-aspect, 3/2);
  line-height: 0;
}

.glb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 5px;
  border: .1px solid #383838c0;
}
/* Close / Buy stay on the image — shown on image hover */
.glb-btn {
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  cursor: pointer;
  border: none;
  background: rgba(20,20,20,0.5);
  color: #fff;
  font-family: inherit;
}
/* Change these two selectors in gallery.css */
.glb-img-inner:hover .glb-btn {
  background: rgba(20,20,20,0.8);
  opacity: 1;
  pointer-events: auto;
}
.glb-img-inner:hover .glb-thumb-strip {
  opacity: 1; pointer-events: auto;
}
.glb-close {
  position: absolute;
  top: 15px; right: 15px;
  width: 34px; height: 34px;
  border-radius: 50%;
   font-family: 'Jost', Arial, sans-serif;
  font-size: 18px; line-height: 1;
  font-weight: 700;
  background: rgba(20, 20, 20, 0.295);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.glb-img-inner:hover .glb-close:hover {
  background: rgba(20, 20, 20, 0.95);
  transform: scale(1.05);
}


.glb-buy {
  position: absolute;
  bottom: 15px; right: 15px;
  padding: 6px 17px;
  border-radius: 40px; 
  background: rgba(20, 20, 20, 0.295);
  z-index: 2;
  transition: background 0.2s, transform 0.15s;
}

.glb-buy svg {
  height: 25px;
  fill: #fff;
  margin-right: 6px;
}

.glb-img-inner:hover .glb-buy:hover {
  background: rgba(20, 20, 20, 0.95);
  transform: scale(1.05);
}

/* Thumb strip stays inside image wrap */
.glb-thumb-strip {
  position: absolute;
  bottom: 15px; left: 15px;
  display: flex; gap: 10px;
  z-index: 3;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}

.glb-thumb {
  width: clamp(55px, 5.5vw, 95px);
  height: clamp(35px, 3.5vw, 60px);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.75);
  transition: transform 0.2s ease;
}
.glb-thumb:hover { transform: scale(1.03); }
.glb-thumb.active { box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.glb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }