/* ═══════════════════════════════════════════════
   LIGHTBOX — Professional image zoom viewer
   ═══════════════════════════════════════════════ */

/* ─── Overlay backdrop ─── */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 5, 5, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 0;
  overflow: hidden;
}

.lb-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ─── Close button ─── */
.lb-close {
  position: fixed;
  top: 20px; right: 24px;
  z-index: 9100;
  width: 48px; height: 48px;
  background: rgba(10,10,10,0.85);
  border: 1px solid var(--border-gold-bright);
  color: var(--gold);
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.25s;
  backdrop-filter: blur(4px);
  line-height: 1;
}

.lb-close:hover {
  background: var(--gold);
  color: var(--black);
  transform: rotate(90deg);
}

/* ─── Navigation arrows ─── */
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9100;
  width: 52px; height: 52px;
  background: rgba(10,10,10,0.75);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  backdrop-filter: blur(4px);
  border-radius: 4px;
  line-height: 1;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-arrow:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.lb-arrow:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.lb-arrow:disabled:hover {
  background: rgba(10,10,10,0.75);
  color: var(--gold);
}

/* ─── Main container ─── */
.lb-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 140px);
  background: var(--dark);
  border: 1px solid var(--border-gold);
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  overflow: hidden;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: 0 80px;
}

.lb-overlay.open .lb-container {
  transform: scale(1) translateY(0);
}

/* ─── Image zone ─── */
.lb-image-zone {
  position: relative;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 400px;
  cursor: zoom-in;
}

.lb-image-zone.zoomed { cursor: zoom-out; }

/* Loader spinner */
.lb-loader {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  z-index: 2;
  transition: opacity 0.3s;
}

.lb-loader.hidden { opacity: 0; pointer-events: none; }

.lb-spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--border-gold);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: lbSpin 0.8s linear infinite;
}

@keyframes lbSpin {
  to { transform: rotate(360deg); }
}

/* The main image */
.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s;
  opacity: 0;
  position: relative;
  z-index: 1;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-img.loaded  { opacity: 1; }
.lb-img.zoomed  { transform: scale(2); cursor: zoom-out; }

/* Hint overlay */
.lb-zoom-hint {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(201,168,76,0.7);
  text-transform: uppercase;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s;
  background: rgba(0,0,0,0.5);
  padding: 5px 14px;
  border: 1px solid rgba(201,168,76,0.2);
}

.lb-image-zone.zoomed .lb-zoom-hint { opacity: 0; }

/* Image enter animation */
@keyframes lbImgIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lb-img.animating { animation: lbImgIn 0.3s ease forwards; }

/* ─── Info panel ─── */
.lb-info {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  border-left: 1px solid var(--border-gold);
  background: var(--charcoal);
}

.lb-info::-webkit-scrollbar { width: 3px; }
.lb-info::-webkit-scrollbar-thumb { background: var(--gold); }

/* Badge */
.lb-badge-wrap {
  margin-bottom: 14px;
  min-height: 24px;
}

.lb-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
}

.lb-badge.b-badge-nouveau  { background: var(--gold);    color: var(--black); }
.lb-badge.b-badge-promo    { background: #c0392b;         color: #fff; }
.lb-badge.b-badge-exclusif { background: var(--dark);     color: var(--gold); border: 1px solid var(--gold); }
.lb-badge.b-badge-bio      { background: #1a7a4a;          color: #b7f5d0; }

/* Category */
.lb-cat {
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}

/* Name */
.lb-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 14px;
}

/* Price */
.lb-price {
  font-family: 'Cinzel', serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
  line-height: 1;
}

/* Description */
.lb-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--white-muted);
  line-height: 1.9;
  margin-bottom: 18px;
  flex: 1;
}

/* Divider */
.lb-divider {
  width: 100%; height: 1px;
  background: var(--border-gold);
  margin: 16px 0;
}

/* Quality badges row */
.lb-quality-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.lb-q-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--white-muted);
  background: rgba(201,168,76,0.08);
  border: 1px solid var(--border-gold);
  padding: 5px 10px;
  letter-spacing: 0.5px;
}

/* Action buttons */
.lb-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.lb-btn-cart {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}

.lb-btn-cart:hover {
  background: rgba(201,168,76,0.12);
}

.lb-btn-buy {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  border: 2px solid var(--gold);
  color: var(--black);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}

.lb-btn-buy:hover { background: var(--gold-light); }

/* Counter */
.lb-counter {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--white-muted);
  text-align: center;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ─── Thumbnail strip ─── */
.lb-thumbs {
  display: flex;
  gap: 6px;
  padding: 12px 80px;
  overflow-x: auto;
  max-width: 100%;
  background: rgba(5,5,5,0.8);
  border-top: 1px solid var(--border-gold);
  scrollbar-width: none;
  flex-shrink: 0;
}

.lb-thumbs::-webkit-scrollbar { display: none; }

.lb-thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
  opacity: 0.55;
  flex-shrink: 0;
  border-radius: 2px;
}

.lb-thumb:hover   { opacity: 0.85; transform: scale(1.05); }
.lb-thumb.active  { border-color: var(--gold); opacity: 1; }


/* ═══════════════════════════════════════════════
   PRODUCT CARD — Cursor shows it's clickable
   ═══════════════════════════════════════════════ */
.b-product-img-wrap {
  cursor: zoom-in;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE — Lightbox
   ═══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .lb-container {
    grid-template-columns: 1fr 320px;
    margin: 0 60px;
  }

  .lb-thumbs { padding: 10px 60px; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .lb-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    margin: 0 12px;
    max-height: calc(100vh - 160px);
  }

  .lb-image-zone {
    min-height: 260px;
    max-height: 42vh;
  }

  .lb-img { max-height: 40vh; }

  .lb-info {
    padding: 18px 20px;
    border-left: none;
    border-top: 1px solid var(--border-gold);
    overflow-y: auto;
    max-height: 42vh;
  }

  .lb-name  { font-size: 16px; }
  .lb-price { font-size: 22px; }
  .lb-desc  { font-size: 12px; }

  .lb-actions { flex-direction: row; }
  .lb-btn-cart,
  .lb-btn-buy  { flex: 1; padding: 12px 8px; font-size: 9px; letter-spacing: 1.5px; }

  .lb-quality-row { gap: 6px; }
  .lb-q-badge     { font-size: 9px; padding: 4px 8px; }

  .lb-arrow { width: 42px; height: 42px; font-size: 26px; }
  .lb-prev  { left: 6px; }
  .lb-next  { right: 6px; }
  .lb-close { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 16px; }

  .lb-thumbs { padding: 8px 12px; }
  .lb-thumb  { width: 48px; height: 48px; }

  .lb-zoom-hint { display: none; }
}

/* Mobile */
@media (max-width: 480px) {
  .lb-container { margin: 0 6px; }
  .lb-image-zone { min-height: 200px; max-height: 38vh; }
  .lb-img { max-height: 36vh; }
  .lb-info { padding: 14px 16px; max-height: 44vh; }
  .lb-name  { font-size: 14px; }
  .lb-price { font-size: 20px; }
  .lb-desc  { font-size: 11px; line-height: 1.7; }
  .lb-arrow { width: 36px; height: 36px; font-size: 22px; }
  .lb-close { width: 36px; height: 36px; font-size: 14px; }
  .lb-thumb { width: 42px; height: 42px; }
}
