/* ===========================
   Base & Reset
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f7f6f4;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===========================
   Header
   =========================== */
header {
  text-align: center;
  padding: 3.5rem 2rem 2rem;
  border-bottom: 1px solid #e2e0db;
  background: #ffffff;
}

header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 200;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a1a1a;
}

header p {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: #888;
  text-transform: uppercase;
}

/* ===========================
   Filter Bar
   =========================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e0db;
  position: sticky;
  top: 0;
  z-index: 100;
}

.filter-btn {
  padding: 0.4rem 1.1rem;
  border: 1px solid #bbb;
  background: none;
  cursor: pointer;
  border-radius: 2rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #444;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.filter-btn:hover {
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.filter-btn.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* ===========================
   Gallery Grid
   =========================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  padding: 4rem 0;
}

/* ===========================
   Card
   =========================== */
.card {
  background: #ffffff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 8px 32px rgba(0,0,0,0.06);
}

.card.hidden {
  display: none;
}

.card-image-wrap {
  background: #f0efed;
  overflow: hidden;
  cursor: zoom-in;
}

.card-image-wrap img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card:hover .card-image-wrap img {
  transform: scale(1.03);
}

.card-info {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-number {
  font-size: 0.75rem;
  color: #aaa;
  letter-spacing: 0.06em;
}

.card-group {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
}

.colour-swatches {
  display: flex;
  gap: 5px;
  align-items: center;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.enquire-btn {
  margin-top: auto;
  padding: 0.45rem 0;
  border: 1px solid #1a1a1a;
  background: none;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  color: #1a1a1a;
  transition: background 0.18s, color 0.18s;
  width: 100%;
}

.enquire-btn:hover {
  background: #1a1a1a;
  color: #fff;
}

/* ===========================
   Lightbox
   =========================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.lightbox-close:hover {
  color: #fff;
}

/* ===========================
   Enquire Modal
   =========================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.6);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 4px;
  padding: 2rem 2rem 1.75rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.modal-box h2 {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.modal-box p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.modal-note {
  font-size: 0.8rem;
  color: #999;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover {
  color: #1a1a1a;
}

.modal-email-btn {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  padding: 0.65rem 1rem;
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.18s;
}

.modal-email-btn:hover {
  background: #333;
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.78rem;
  color: #bbb;
  border-top: 1px solid #e2e0db;
  background: #ffffff;
  letter-spacing: 0.04em;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .card-image-wrap img {
    height: 150px;
  }
}
