/* Sticky filter bar height, used by :target scroll-margin-top. */
:root { --sticky-base: 62px; }

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}
.hero-banner {
  position: relative;
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #e8e0d8 0%, #ddd5cd 40%, transparent 100%),
                  url('https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?auto=format&fit=crop&w=1600&q=80') center right / cover no-repeat;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 0 48px;
}
.hero-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  max-width: 480px;
}
.hero-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 10px;
  line-height: 1.1;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.result-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
}
.toolbar-actions {
  display: flex;
  gap: 12px;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-ghost:hover {
  border-color: var(--black);
}
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar {
  display: none;
}
.filter-chips {
  display: flex;
  gap: 8px;
  min-width: max-content;
}
.filter-chip {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--white);
  font-size: 13px;
  color: var(--gray);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.filter-chip:hover {
  border-color: var(--black);
  color: var(--black);
}
.filter-chip.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}
.product-section {
  padding: 0;
  background: var(--white);
}
/* 1px gaps over a tinted backdrop draw the grid lines. Unlike nth-child
   borders these stay correct when cards are filtered out. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.product-card {
  position: relative;
  background: var(--white);
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card[hidden] {
  display: none;
}
.product-card:hover {
  background: #fafafa;
}
/* Full-card click target sitting under the wishlist/add controls. */
.product-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
  overflow: hidden;
}
.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.product-card:hover .product-image-wrap img {
  transform: scale(1.05);
}
.wishlist-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
}
.wishlist-btn:hover {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.wishlist-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--black);
  fill: none;
  stroke-width: 1.5;
}
.wishlist-btn.active svg {
  fill: var(--black);
}
.color-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 11px;
  color: var(--gray);
  background: rgba(255,255,255,0.9);
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 5;
}
.product-info {
  padding: 0 16px 24px;
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}
/* Text sits above the overlay link but must not swallow its clicks —
   only the real button takes pointer events back. */
.new-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 4px;
  line-height: 1.3;
}
.product-desc {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.4;
}
.product-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  margin-top: 10px;
}
.product-add {
  pointer-events: auto;
  width: 100%;
  margin-top: auto;
  padding: 11px 12px;
  background: var(--white);
  border: 1px solid var(--black);
  color: var(--black);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.product-add:hover {
  background: var(--black);
  color: var(--white);
}
.no-results {
  display: none;
  text-align: center;
  padding: 64px 32px;
  font-size: 14px;
  color: var(--gray);
}
/* The listing is filtered server-side now, so an empty result set means the
   message is rendered only when it should show. */
.no-results.show { display: block; }
.no-results a { color: var(--black); }

/* Paging under the results-end rule. */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.page-link {
  min-width: 38px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 13px;
  color: var(--gray);
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}
.page-link:hover {
  border-color: var(--black);
  color: var(--black);
}
.page-link.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}
.results-end {
  text-align: center;
  padding: 40px 32px;
  background: var(--white);
}
.results-end p {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
}
.results-end .line {
  width: 120px;
  height: 1px;
  background: var(--black);
  margin: 0 auto;
}
.content-section {
  background: var(--cream);
  padding: 64px 32px;
}
.content-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.content-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 16px;
  color: var(--black);
}
.content-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--black);
  max-width: 800px;
}
.content-section a.read-more {
  font-size: 14px;
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-left: 4px;
}
.you-may-like {
  text-align: center;
  padding: 48px 32px 64px;
  background: var(--cream);
}
.you-may-like h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--black);
}
.tag-pills {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.tag-pill {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 24px;
  background: #e0ddd6;
  font-size: 13px;
  color: var(--black);
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.tag-pill:hover {
  background: #d4d0c8;
}
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}
.btn-primary:hover {
  opacity: 0.85;
}
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-content h1 {
    font-size: 32px;
  }
}
@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .toolbar {
    padding: 16px;
  }
  .hero-banner {
    height: 180px;
  }
  .hero-content {
    padding: 0 24px;
  }
  .hero-content p {
    font-size: 14px;
  }
  .content-section {
    padding: 48px 24px;
  }
  .content-section h2 {
    font-size: 28px;
  }
}
@media (max-width: 479px) {
  .product-image-wrap {
    padding: 16px;
  }
  .btn-ghost {
    padding: 8px 14px;
    font-size: 12px;
  }
}
