/**
 * No-JS enhancements — mobile menu, gallery lightbox, scroll link
 */

/* Mobile menu toggle (checkbox hack) */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header .header-mobile-toggle {
  cursor: pointer;
  margin: 0;
}

#nav-toggle:checked ~ .header-nav-mobile {
  display: block;
}

#nav-toggle:checked + .header-mobile-toggle .bi-list::before {
  content: "\f659";
}

/* Scroll-to-top link (always visible, no JS) */
a.scroll-top {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  text-decoration: none;
}

a.scroll-top:hover {
  color: var(--white);
}

/* CSS gallery lightbox (:target) */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.gallery-lightbox:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-lightbox img {
  max-width: min(1100px, 100%);
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  text-decoration: none;
  opacity: 0.85;
}

.gallery-lightbox-close:hover {
  color: var(--gold, #c9a962);
  opacity: 1;
}

/* Subtle fade-in without JS (respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: revealUp 0.7s ease both;
  }

  @keyframes revealUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Product category jump targets */
.product-category-section {
  scroll-margin-top: 140px;
}

.product-item {
  display: flex;
}

.product-item .product-card {
  width: 100%;
}

.product-category-section:not(:first-of-type) {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.product-category-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--charcoal, #2c2c2c);
}

.product-category-heading .text-gold {
  color: var(--gold, #c9a962);
}
