/* ============================================================
   VISURIA OCCHIALI — Gallery CSS
   Pagine Uomo e Donna con galleria prodotti
   ============================================================ */

/* ---- HERO GALLERIA ---- */
.gallery-hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(48px, 8vw, 96px);
  overflow: hidden;
  background: var(--near-black);
}

.gallery-hero--uomo {
  background-image: url('images/visuria_collection2.jpg');
  background-size: cover;
  background-position: center 30%;
}

.gallery-hero--donna {
  background-image: url('images/visuria_hero1.jpg');
  background-size: cover;
  background-position: center 20%;
}

.gallery-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.55) 60%,
    rgba(0,0,0,0.85) 100%
  );
}

.gallery-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.gallery-hero__title {
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1;
  margin: 12px 0 16px;
}

.gallery-hero__subtitle {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin-bottom: 32px;
}

/* ---- GENDER NAV ---- */
.gallery-gender-nav {
  display: flex;
  gap: 12px;
}

.gender-btn {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.25s ease;
}

.gender-btn:hover {
  border-color: rgba(255,255,255,0.9);
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.gender-btn--active {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.gender-btn--active:hover {
  background: var(--off-white);
  color: var(--black);
}

/* ---- FILTRI ---- */
.gallery-filters {
  padding: 32px 0 0;
  background: var(--off-white);
  border-bottom: 1px solid var(--light-2);
}

.filters__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 24px;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--light-2);
  background: transparent;
  color: var(--mid);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--black);
  color: var(--black);
}

.filter-btn--active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ---- GRIGLIA GALLERIA ---- */
.gallery-grid {
  padding: clamp(48px, 7vw, 96px) 0;
  background: var(--off-white);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

/* ---- CARD PRODOTTO ---- */
.gallery__item {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.gallery__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.gallery__item.hidden {
  display: none;
}

.gallery__img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--near-black);
}

.gallery__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.gallery__item:hover .gallery__img-wrap img {
  transform: scale(1.04);
}

.gallery__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.gallery__item:hover .gallery__overlay {
  background: rgba(0,0,0,0.3);
}

.gallery__zoom {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery__item:hover .gallery__zoom {
  opacity: 1;
  transform: scale(1);
}

.gallery__info {
  padding: 24px;
}

.gallery__info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.gallery__name {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--black);
}

.gallery__tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(198,160,95,0.1);
  padding: 4px 10px;
  border-radius: 100px;
}

.gallery__desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 16px;
}

.gallery__specs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--light-2);
  border-bottom: 1px solid var(--light-2);
}

.gallery__specs span {
  font-size: 12px;
  color: var(--light-mid);
  letter-spacing: 0.02em;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__caption {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10;
}

.lightbox__close:hover { color: var(--white); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }

.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255,255,255,0.2);
}

/* ---- CTA GALLERIA ---- */
.gallery-cta {
  background: var(--black);
  padding: clamp(64px, 10vw, 120px) 0;
  text-align: center;
}

.gallery-cta .label {
  color: var(--gold);
}

.gallery-cta h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 16px 0 20px;
}

.gallery-cta p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.gallery-cta__btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .gallery__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .filters__row {
    gap: 6px;
  }

  .filter-btn {
    font-size: 12px;
    padding: 7px 14px;
  }

  .lightbox__prev { left: 12px; }
  .lightbox__next { right: 12px; }

  .gallery-cta__btns {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }
}
