/* ============================================================
   PRODUCTS.CSS — Products Page Styles
   RULE 304: Classes follow [component-name]-[element]-[modifier]
   No global element selectors. No generic class names.
   Colocated with pages/products.html.
   Nav and footer styles live in global.css.
   ============================================================ */


/* ================================================================
   PAGE HERO
   ================================================================ */

.products-hero-section {
  background-color: var(--color-dark);
  background-image: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0f2a2b 100%);
  padding: 80px var(--gutter) 88px;
}

.products-hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.products-hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 20px;
}

.products-hero-heading {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.12;
  letter-spacing: -1.5px;
  max-width: 700px;
  margin-bottom: 20px;
}

.products-hero-subtext {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: #999999;
  max-width: 520px;
  line-height: 1.75;
}


/* ================================================================
   FILTER BAR
   ================================================================ */

.products-filter-section {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 68px; /* height of nav-header */
  z-index: 10;
}

.products-filter-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.products-filter-container::-webkit-scrollbar {
  display: none;
}

.products-filter-bar {
  display: flex;
  gap: 4px;
  padding: 12px 0;
  white-space: nowrap;
}

.products-filter-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-mid);
  background-color: transparent;
  border: 1px solid var(--color-border);
  padding: 7px 16px;
  border-radius: 999px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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


/* ================================================================
   GALLERY
   ================================================================ */

.products-gallery-section {
  padding: 56px var(--gutter) 80px;
  background-color: var(--color-white);
}

.products-gallery-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.products-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Hidden items (filtered out by JS) */
.products-gallery-item--hidden {
  display: none;
}

/* Fade-in when items become visible */
.products-gallery-item {
  cursor: pointer;
  margin: 0;
  position: relative;
}

.products-gallery-item-img-wrap {
  position: relative;
  overflow: hidden;
  background-color: var(--color-light);
  aspect-ratio: 4 / 3;
}

.products-gallery-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

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

/* Placeholder state — shown while image is loading or src is placeholder */
.products-gallery-item-img[src*="placeholder"] {
  object-fit: contain;
  padding: 32px;
  opacity: 0.2;
  filter: grayscale(1);
}

.products-gallery-item-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s;
}

.products-gallery-item:hover .products-gallery-item-overlay {
  background-color: rgba(0, 0, 0, 0.35);
}

.products-gallery-item-zoom {
  font-size: 1.6rem;
  color: var(--color-white);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s, transform 0.25s;
}

.products-gallery-item:hover .products-gallery-item-zoom {
  opacity: 1;
  transform: scale(1);
}

.products-gallery-item-caption {
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.products-gallery-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.3;
}

.products-gallery-item-tag {
  font-size: 0.75rem;
  color: var(--color-green);
  font-weight: 600;
}

/* Empty state */
.products-gallery-empty {
  text-align: center;
  padding: 64px 0;
  font-size: 1rem;
  color: var(--color-grey);
}


/* ================================================================
   LIGHTBOX
   ================================================================ */

.products-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 200;
}

.products-lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.products-lightbox[hidden],
.products-lightbox-backdrop[hidden] {
  display: none;
}

.products-lightbox-inner {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.products-lightbox-img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.products-lightbox-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.products-lightbox-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
}

.products-lightbox-caption {
  font-size: 0.875rem;
  color: #999999;
}

.products-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: var(--color-white);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 202;
}

.products-lightbox-close:hover {
  opacity: 1;
}

.products-lightbox-prev,
.products-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  padding: 16px 12px;
  opacity: 0.7;
  transition: opacity 0.2s, background-color 0.2s;
  z-index: 202;
  border-radius: 2px;
}

.products-lightbox-prev {
  left: 12px;
}

.products-lightbox-next {
  right: 12px;
}

.products-lightbox-prev:hover,
.products-lightbox-next:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
}


/* ================================================================
   QUOTE CTA
   ================================================================ */

.products-quotecta-section {
  padding: 88px var(--gutter);
  background-color: var(--color-green);
}

.products-quotecta-container {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.products-quotecta-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.products-quotecta-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 32px;
}

.products-quotecta-btn {
  display: inline-block;
  background-color: var(--color-white);
  color: var(--color-green);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.products-quotecta-btn:hover {
  background-color: var(--color-light);
}


/* ================================================================
   RESPONSIVE — Tablet 600px+
   ================================================================ */

@media (min-width: 600px) {

  .products-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}


/* ================================================================
   RESPONSIVE — Desktop 1024px+
   ================================================================ */

@media (min-width: 1024px) {

  .products-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}
