/* =============================================
   IL MONDO DI REGY — gallery.css
   Pagine categoria (Bambole, Bomboniere, ecc.)
   ============================================= */

/* Body: pagina normale scrollabile */
body.gallery-page {
  overflow: auto;
  min-height: 100vh;
  background: #fff;
}

/* Nav: mantiene stesso stile ma senza slider */
body.gallery-page nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
body.gallery-page .nav-bot-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .35rem 1.2rem;
}

/* Breadcrumb */
.gal-back {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink3);
  text-decoration: none;
  transition: color .2s;
}
.gal-back:hover { color: var(--f); }
.gal-back::before { content: '← '; }

.gal-sep {
  color: var(--ink3);
  font-size: .7rem;
}

.gal-current {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .62rem;
  letter-spacing: .20em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

/* Main content — sotto la nav fissa */
.gal-main {
  padding-top: var(--nav-h);
  padding-bottom: 4rem;
}

/* Header categoria */
.gal-header {
  text-align: center;
  padding: clamp(2rem, 5vw, 4rem) 2rem clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.gal-header-mark {
  width: 44px;
  height: 2px;
  border-radius: 2px;
  margin: 0 auto clamp(12px, 2vw, 20px);
}

.gal-header h1 {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 .4em;
}
.gal-header h1 .period { color: var(--f); }

.gal-header p {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .6rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink3);
  font-weight: 300;
  margin: 0;
}

/* Griglia foto */
.gal-grid {
  columns: 4 220px;
  column-gap: 10px;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 3rem);
  max-width: 1600px;
  margin: 0 auto;
}

.gal-item {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #f5f5f5;
}

.gal-item img {
  width: 100%;
  display: block;
  transition: transform .4s ease;
}

.gal-item:hover img {
  transform: scale(1.04);
}

.gal-item-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .6rem .8rem;
  background: linear-gradient(transparent, rgba(26,5,53,.72));
  font-family: 'Josefin Sans', sans-serif;
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  font-weight: 400;
  opacity: 0;
  transition: opacity .3s;
}
.gal-item:hover .gal-item-label { opacity: 1; }

/* Footer pagina */
.gal-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid rgba(0,0,0,.06);
}

.gal-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.gal-footer-link {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink2);
  font-weight: 400;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.gal-footer-link:hover { color: var(--f); }

.gal-footer-sig {
  font-family: 'Tangerine', cursive;
  font-weight: 700;
  font-size: 3.5rem;
  background: linear-gradient(110deg, var(--f) 0%, #5BBDE5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: block;
  margin-top: 1.5rem;
  line-height: 1;
}

/* Badge "+N foto" */
.gal-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(26,5,53,.72);
  color: rgba(255,255,255,.92);
  font-family: 'Josefin Sans', sans-serif;
  font-size: .52rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: .25rem .55rem;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.gal-item:hover .gal-badge { opacity: 1; }

/* ── LIGHTBOX ── */
#lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10,4,20,.92);
  align-items: center;
  justify-content: center;
}
#lb.lb-open { display: flex; }

#lb-wrap {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lb-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  display: block;
}

#lb-close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: .2rem .5rem;
  transition: color .2s;
  z-index: 1;
}
#lb-close:hover { color: #fff; }

#lb-prev, #lb-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: rgba(255,255,255,.9);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: .4rem .8rem;
  border-radius: 4px;
  transition: background .2s;
  z-index: 1;
}
#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }
#lb-prev:hover, #lb-next:hover { background: rgba(255,255,255,.25); }

#lb-counter {
  position: absolute;
  bottom: 1rem; left: 50%; transform: translateX(-50%);
  font-family: 'Josefin Sans', sans-serif;
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .gal-grid { columns: 2 140px; column-gap: 6px; }
  .gal-item { margin-bottom: 6px; }
  #lb-prev { left: .3rem; }
  #lb-next { right: .3rem; }
  #lb-prev, #lb-next { font-size: 1.8rem; padding: .3rem .5rem; }
}
