/* =========================================================
   CATALOGUE.CSS — CATALOG PAGE (DARK)
   ========================================================= */


/* =========================================================
   0) GLOBAL / THEME TOKENS
   ========================================================= */

html { scroll-behavior: smooth; }

:root {
  --bg: #0b0b0c;
  --surface: rgba(255,255,255,0.06);
  --surface-2: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.14);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --muted2: rgba(255,255,255,0.58);
  --shadow: 0 14px 34px rgba(0,0,0,0.35);
  --radius: 18px;
  --nav-offset: 98px;
}

body.theme-dark {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  padding-top: var(--nav-offset);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Make anchor jumps land below the fixed navbar */
section, header { scroll-margin-top: var(--nav-offset); }


/* =========================================================
   1) SHARED UI (BUBBLES / CHIPS)
   ========================================================= */

.bubble {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 12px;
  border-radius: 999px;

  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);

  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease, background .15s ease, border-color .15s ease;
}

.chip:hover {
  transform: translateY(-1px);
  opacity: 0.95;
  background: rgba(255,255,255,0.09);
}


/* =========================================================
   2) FILTERS SECTION (CATALOG HEADER + TOGGLES)
   ========================================================= */

.catalog-filters {
  padding: 180px 0 100px 0;
}

.filters-card {
  padding: 16px 14px;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.filters-title {
  margin: 0;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  align-items: center;
}

/* label chips */
.filter-chip {
  cursor: pointer;
  user-select: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* checkbox */
.filter-chip input {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  accent-color: #ffffff;
}

/* icon + text */
.filter-chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* OFF state (default): clearly "disabled" */
.filter-chip {
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.12);
  opacity: 0.45;
  box-shadow: none;
}

/* OFF hover */
.filter-chip:hover {
  opacity: 0.70;
  background: rgba(255,255,255,0.06);
}

/* ON state (selected): clearly highlighted */
.filter-chip.is-on {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.40);
  opacity: 1;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

.filter-chip.is-on span {
  color: rgba(255,255,255,0.96);
}

/* icon visibility */
.filter-chip i { opacity: 0.70; }
.filter-chip.is-on i { opacity: 1; }

/* modern browsers: if JS class fails, still show ON */
.filter-chip:has(input:checked) {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.40);
  opacity: 1;
}

.filters-empty {
  height: 150px;
  margin-top: 10px;

  opacity: 0.8;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);

  padding: 10px 12px;
  text-align: center;

  display: grid;
  place-items: center;
}

/* Responsive header text + button */
.filters-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap; /* allows button to drop under text */
}

.filters-title {
  margin: 0;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.filters-sub {
  margin: 6px 0 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: clamp(14px, 1.6vw, 16px);
  max-width: 680px;
}

/* Make the "Show all" button responsive */
#filtersAll.chip {
  padding: 10px 14px;
  font-size: clamp(13px, 1.4vw, 14px);
  white-space: nowrap;
}

/* Small screens: button becomes full width */
@media (max-width: 600px) {
  #filtersAll.chip {
    width: 100%;
  }
  .filters-sub, .filters-title {
    text-align: center !important;
    padding: 0 15px;
  }
  .filters-row {
    margin-top: 2rem;
  }
}


/* =========================================================
   4) CATALOG SECTIONS (GALLERY + HEADERS)
   ========================================================= */

.catalog-section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.gallery {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.gallery-grid .img-card:nth-child(6n + 1) { grid-column: span 4; }
.gallery-grid .img-card:nth-child(6n + 2) { grid-column: span 4; }
.gallery-grid .img-card:nth-child(6n + 3) { grid-column: span 4; }
.gallery-grid .img-card:nth-child(6n + 4) { grid-column: span 6; }
.gallery-grid .img-card:nth-child(6n + 5) { grid-column: span 3; }
.gallery-grid .img-card:nth-child(6n + 6) { grid-column: span 3; }

.img-card {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  text-decoration: none;
}

.img-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.45);
  opacity: 0.98;
}

.img-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}


/*
=========================================================
5) MOBILE
=========================================================
*/

@media (max-width: 991.98px) {
  :root { --nav-offset: 104px; }

  body.theme-dark { padding-top: var(--nav-offset); }

  .gallery { padding: 12px; }

  /* Hide native checkbox – chip is the control */
  .filter-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
  }

  /* make OFF even more obvious on mobile */
  .filter-chip {
    opacity: 0.40;
  }

  .filter-chip.is-on {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.45);
    opacity: 1;
  }

  .gallery-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .gallery-grid::-webkit-scrollbar { height: 10px; }
  .gallery-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
  }

  .img-card {
    min-width: 78%;
    scroll-snap-align: start;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-bubble {
    width: calc(100% - 16px);
    border-radius: 16px;
    padding: 10px 10px;
  }

  .navbar-collapse {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(11, 11, 12, 0.92);
    padding: 10px;
  }

  .nav-pill {
    width: 100%;
    text-align: center;
    padding: 12px 14px !important;
  }
}


/* =========================================================
   LIGHTBOX (IMAGE PREVIEW)
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: relative;
  z-index: 2;

  max-width: min(92vw, 1200px);
  max-height: 90vh;

  margin: auto;
  top: 50%;
  transform: translateY(-50%);

  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(11,11,12,0.85);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);

  padding: 12px;
}

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

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;

  width: 42px;
  height: 42px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(11,11,12,0.9);
  color: #fff;

  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.1);
}