/* ============================================================
   SESSE & CO — Shoe Gallery Lightbox
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
.sg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 10, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.sg-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Modal shell ─────────────────────────────────────────── */
.sg-modal {
  position: relative;
  display: flex;
  width: min(92vw, 1100px);
  height: min(90vh, 700px);
  background: #fff;
  overflow: hidden;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-overlay.open .sg-modal {
  transform: scale(1) translateY(0);
}

/* ── Close button ────────────────────────────────────────── */
.sg-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--text, #2C1810);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}
.sg-close:hover { background: var(--cream, #FEFCF8); }

/* ── Thumbnail strip (left) ──────────────────────────────── */
.sg-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 12px;
  background: var(--cream, #FEFCF8);
  border-right: 1px solid #e8e0d6;
  overflow-y: auto;
  width: 88px;
  flex-shrink: 0;
}

.sg-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
  flex-shrink: 0;
}

.sg-thumb:hover  { opacity: 0.85; }
.sg-thumb.active { border-color: var(--gold, #B8934A); opacity: 1; }

/* ── Main image area ─────────────────────────────────────── */
.sg-main {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sg-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
}

.sg-main-img.zoomed {
  cursor: zoom-out;
  transform: scale(2);
}

/* ── Navigation arrows ───────────────────────────────────── */
.sg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.9);
  color: var(--text, #2C1810);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  z-index: 5;
  transition: background 0.2s, border-color 0.2s;
}
.sg-arrow:hover  { background: #fff; border-color: var(--gold, #B8934A); color: var(--gold, #B8934A); }
.sg-arrow.prev   { left: 12px; }
.sg-arrow.next   { right: 12px; }
.sg-arrow:disabled { opacity: 0.25; pointer-events: none; }

/* ── Info panel (right) ──────────────────────────────────── */
.sg-info {
  width: 240px;
  flex-shrink: 0;
  padding: 28px 24px;
  border-left: 1px solid #e8e0d6;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.sg-brand {
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light, #8a7165);
}

.sg-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text, #2C1810);
  line-height: 1.25;
}

.sg-price-block { display: flex; flex-direction: column; gap: 2px; }

.sg-price-full {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--red, #9B1B1B);
}

.sg-price-deposit {
  font-size: 0.75rem;
  color: #5C6B8A;
  font-family: 'Jost', sans-serif;
}

.sg-divider {
  height: 1px;
  background: linear-gradient(to right, var(--gold, #B8934A), transparent);
}

.sg-detail {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  color: var(--text-mid, #5C4A3A);
  line-height: 1.65;
}

.sg-badge-preorder {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: #5C6B8A;
  color: #fff;
  padding: 5px 10px;
  width: fit-content;
}

.sg-view-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light, #8a7165);
  text-align: center;
  margin-top: auto;
}

.sg-image-counter {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  color: var(--text-light, #8a7165);
  letter-spacing: 0.5px;
}

/* ── Image fade transition ───────────────────────────────── */
.sg-main-img.fading { opacity: 0; }

/* ── Mobile responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .sg-modal {
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    max-width: 100%;
    max-height: 100%;
  }

  .sg-thumbs {
    flex-direction: row;
    width: 100%;
    height: 72px;
    border-right: none;
    border-bottom: 1px solid #e8e0d6;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sg-thumb { width: 54px; height: 54px; }

  .sg-main { flex: 1; min-height: 0; }

  .sg-info { display: none; }

  .sg-arrow.prev { left: 6px; }
  .sg-arrow.next { right: 6px; }
}
