/* Madina Jewellers · lightbox.css */
/* LIGHTBOX: layout=B overlay=X transition=3 */

/* ── Clickable card cursor ── */
[data-product-id] { cursor: pointer; }

/* ── Gallery hint badge (appears on hover) ── */
.lb-hint {
  position: absolute;
  bottom: .65rem;
  left: .65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .6rem;
  background: rgba(5, 7, 5, .82);
  border: 1px solid rgba(201, 168, 76, .28);
  border-radius: 2px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .58rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #C9A84C;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  white-space: nowrap;
}
[data-product-id]:hover .lb-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ── Backdrop ── */
.lb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, .90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.lb-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Panel ── */
.lb-panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: calc(100dvh - 3rem);
  display: grid;
  grid-template-columns: 60% 40%;
  background: #101610;
  border: 1px solid rgba(201, 168, 76, .2);
  border-radius: 6px;
  overflow: hidden;
  transform: scale(.94) translateY(14px);
  opacity: 0;
  transition: transform .38s cubic-bezier(.4, 0, .2, 1), opacity .32s ease;
}
.lb-backdrop.is-open .lb-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ── Close button ── */
.lb-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  z-index: 10;
  width: 34px;
  height: 34px;
  background: rgba(8, 12, 8, .78);
  border: 1px solid rgba(201, 168, 76, .18);
  border-radius: 3px;
  color: #E8E3D4;
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.lb-close:hover {
  border-color: rgba(201, 168, 76, .55);
  color: #C9A84C;
  background: rgba(8, 12, 8, .96);
}
.lb-close:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 2px;
}

/* ── Hero column (left 60%) ── */
.lb-hero-col {
  position: relative;
  overflow: hidden;
  background: #0b120b;
  display: flex;
  align-items: stretch;
}
.lb-hero-wrap {
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: calc(100dvh - 3rem);
}
.lb-hero-wrap.no-img-hero {
  cursor: default;
}
.lb-hero-wrap.no-img-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at 50% 45%, rgba(201,168,76,.07) 0%, transparent 70%),
    linear-gradient(135deg, #141d14 0%, #0c130c 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M30 5L50 25L30 55L10 25Z' fill='none' stroke='%23C9A84C' stroke-width='1' opacity='.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80px;
}
.lb-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* transform controlled inline by JS for transition-origin; opacity transition only here */
  transition: opacity .26s ease, transform .32s cubic-bezier(.4, 0, .2, 1);
}
.lb-hero-img.is-zoomed {
  transform: scale(1.65) !important;
  cursor: zoom-out;
}
.lb-hero-img.lb-swap-out {
  opacity: 0;
  transform: scale(.55) !important;
}

/* ── Info column (right 40%) ── */
.lb-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 2rem 1.75rem 1.75rem;
  overflow-y: auto;
  border-left: 1px solid rgba(201, 168, 76, .1);
  background: #101610;
  min-height: 0;
}
.lb-cat {
  display: block;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #C9A84C;
  opacity: .8;
}
.lb-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 700;
  color: #E8E3D4;
  line-height: 1.2;
  margin-top: .25rem;
}
.lb-desc {
  font-size: .875rem;
  color: #6B7D6B;
  line-height: 1.72;
}
.lb-rule {
  width: 2.2rem;
  height: 1px;
  background: rgba(201, 168, 76, .25);
  flex-shrink: 0;
}

/* ── Thumbnails 2×2 grid ── */
.lb-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
}
.lb-thumbs:empty { display: none; }

.lb-thumb-btn {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1.5px solid rgba(201, 168, 76, .12);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  background: #0c130c;
  position: relative;
  transition: border-color .22s, transform .18s;
}
.lb-thumb-btn:hover {
  border-color: rgba(201, 168, 76, .4);
  transform: scale(1.04);
}
.lb-thumb-btn.is-active,
.lb-thumb-btn[aria-pressed="true"] {
  border-color: #C9A84C;
  box-shadow: 0 0 0 1px rgba(201, 168, 76, .22);
}
.lb-thumb-btn:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 2px;
}
.lb-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .32s ease;
}
.lb-thumb-btn:hover .lb-thumb-img { transform: scale(1.09); }
.lb-thumb-btn.no-img-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #141d14, #0c130c);
}

/* ── Image counter ── */
.lb-counter {
  font-size: .6rem;
  letter-spacing: .14em;
  color: #6B7D6B;
  text-transform: uppercase;
  flex-shrink: 0;
}
.lb-counter:empty { display: none; }

/* ── WhatsApp CTA ── */
.lb-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  background: #C9A84C;
  color: #080C08;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 2px;
  text-decoration: none;
  flex-shrink: 0;
  margin-top: auto;
  transition: background .22s, transform .2s, box-shadow .2s;
}
.lb-wa-btn:hover {
  background: #967A30;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, .2);
}

/* ── Reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .lb-backdrop,
  .lb-panel,
  .lb-hero-img,
  .lb-thumb-btn,
  .lb-thumb-img,
  .lb-wa-btn,
  .lb-hint { transition: none !important; animation: none !important; }
}

/* ── Tablet ── */
@media (max-width: 900px) {
  .lb-panel { grid-template-columns: 52% 48%; }
  .lb-info-col { padding: 1.5rem 1.25rem 1.5rem; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .lb-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .lb-panel {
    grid-template-columns: 1fr;
    max-height: 92dvh;
    border-radius: 14px 14px 0 0;
    transform: translateY(50px) !important;
    opacity: 0;
    overflow-y: auto;
  }
  .lb-backdrop.is-open .lb-panel {
    transform: translateY(0) !important;
    opacity: 1;
  }
  .lb-hero-col { border-right: none; }
  .lb-hero-wrap {
    aspect-ratio: 4 / 3;
    max-height: none;
    height: auto;
    cursor: default;
  }
  .lb-hero-img.is-zoomed { transform: none !important; }
  .lb-info-col {
    padding: 1.2rem 1.2rem 2.5rem;
    border-left: none;
    border-top: 1px solid rgba(201, 168, 76, .1);
  }
  /* Horizontal pill strip on mobile */
  .lb-thumbs {
    display: flex;
    flex-direction: row;
    gap: .4rem;
    overflow-x: auto;
    scrollbar-width: none;
    grid-template-columns: unset;
    padding-bottom: .15rem;
  }
  .lb-thumbs::-webkit-scrollbar { display: none; }
  .lb-thumb-btn {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    aspect-ratio: 1 / 1;
    border-radius: 26px;
  }
  .lb-close { top: .7rem; right: .7rem; }
}
