﻿/* =============================================
   CATEGORY PAGE SHARED STYLES – cat-page.css
   ============================================= */

.cp-hero {
  position: relative;
  height: 50vh;
  min-height: 340px;
  margin-top: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #2a2318;
}
.cp-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 700px;
  padding: 0 6vw;
}
.cp-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 14px;
}
.cp-hero-content h1 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.1;
}
.cp-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
}

/* Product grid – matches cat-collection layout */
main > .cp-section:first-child {
  padding-top: 124px; /* 64px + 68px navbar offset */
}
.cp-section {
  background: #FAF7F2;
  padding: 64px 20px 80px;
}
.cp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Mid-band – dark brown, sleek horizontal bar matching collection pages */
.cp-mid-band {
  grid-column: 1 / -1;
  background: #3a2e26;
  padding: 20px 40px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-mid-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 960px;
  flex-wrap: wrap;
}
.cp-mid-band-eyebrow { display: none; }
.cp-mid-band-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 500;
  color: #fff;
  margin: 0;
  line-height: 1.4;
  flex: 1;
}
.cp-mid-band-sub { display: none; }
.cp-mid-band-btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3a2e26;
  background: #fff;
  padding: 10px 28px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.cp-mid-band-btn:hover { background: #C4B5A5; color: #3a2e26; }
.cp-mid-band-btn::after { display: none !important; }
.cp-mid-band p, .cp-mid-band a:not(.cp-mid-band-btn) { color: #fff; }
.cp-mid-band a:not(.cp-mid-band-btn):hover { color: #C4B5A5; }
@media (max-width: 640px) {
  .cp-mid-band { padding: 18px 20px; }
  .cp-mid-band-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Thumbnail swatches */
.cp-swatches {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.cp-swatch {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.7;
}
.cp-swatch:hover { opacity: 1; border-color: #8B7355; }
.cp-swatch--active { opacity: 1; border-color: #3a2e26; }
.cp-card {
  cursor: pointer;
  display: block;
}
.cp-card:hover .cp-img img { transform: scale(1.04); }
.cp-img {
  overflow: hidden;
  background: #e8e0d5;
  aspect-ratio: 3/4;
}
.cp-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.cp-name {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #1a1a1a;
  margin-top: 12px;
  margin-bottom: 2px;
}
.cp-type {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: #8B7355;
  letter-spacing: 0.04em;
}

/* Lightbox */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,14,10,0.88);
  z-index: 9999;
  overflow-y: auto;
  padding: 40px 20px;
  align-items: flex-start;
  justify-content: center;
}
.lb-overlay.active { display: flex; }
.lb-box {
  background: #FAF7F2;
  max-width: 1060px;
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.lb-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.lb-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 480px;
}
.lb-info {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid #E0D8CE;
}
.lb-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8B7355;
  margin-bottom: 12px;
}
.lb-info h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.2;
}
.lb-rule { width: 48px; height: 1px; background: #C4B5A5; margin: 16px 0; }
.lb-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #5A5048;
  line-height: 1.85;
  margin-bottom: 32px;
}
.lb-cta {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 28px;
  background: #3a2e26;
  color: #fff;
  text-decoration: none;
  border: 1px solid #3a2e26;
  transition: background 0.2s;
  align-self: flex-start;
}
.lb-cta:hover { background: #1a1a1a; }
.lb-cta::after { display: none !important; }
.lb-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: #fff;
  border: 1px solid #E0D8CE;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #3a2e26;
  z-index: 10;
  transition: background 0.2s, color 0.2s;
}
.lb-close:hover { background: #3a2e26; color: #fff; }

/* CTA strip */
.cp-cta-section {
  background: #F2EDE6;
  text-align: center;
  padding: 72px 20px;
  border-top: 1px solid #E0D8CE;
}
.cp-cta-section h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  margin-bottom: 12px;
  color: #1a1a1a;
}
.cp-cta-section p {
  font-size: 0.95rem;
  color: #5A5048;
  margin-bottom: 32px;
  font-family: 'Inter', sans-serif;
}

/* Responsive */
@media (max-width: 900px) { .cp-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; } }
@media (max-width: 768px) {
  .cp-hero { margin-top: 63px; min-height: 240px; height: 38vh; }
  main > .cp-section:first-child { padding-top: 103px; } /* 40px + 63px navbar */
  .cp-section { padding: 40px 12px 60px; }
  .cp-mid-band { padding: 40px 24px; }
  .lb-box { grid-template-columns: 1fr; }
  .lb-images { grid-template-columns: 1fr 1fr; }
  .lb-images img { min-height: 220px; }
  .lb-info { border-left: none; border-top: 1px solid #E0D8CE; padding: 28px 20px; }
}
@media (max-width: 480px) {
  .cp-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
  .cp-swatch { width: 30px; height: 30px; }
}
