.catalog-page {
  padding: 48px 0 64px;
  background: #f7f7f7;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.catalog-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.2;
  color: #1a1a1a;
}

.catalog-title em {
  font-style: normal;
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.catalog-count {
  color: #8a8a8a;
  font-size: 13px;
  white-space: nowrap;
}

.catalog-sort {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23666' stroke-width='1.4' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

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

.catalog-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}

.catalog-card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.catalog-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee;
}

.catalog-card-media a {
  display: block;
  width: 100%;
  height: 100%;
}

.catalog-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.catalog-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: rgba(20, 20, 20, .45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.catalog-fav svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 1.6;
}

.catalog-fav.is-active svg {
  fill: var(--accent);
  stroke: var(--accent);
}

.catalog-card-body {
  padding: 14px 16px 16px;
}

.catalog-card h2 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.35;
  color: #3a3a3a;
}

.catalog-more {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.catalog-more:hover { color: var(--accent-dark); }

.catalog-cta {
  background: #1a1a1a;
  margin: 48px 0 0;
  padding: 28px 0;
}

.catalog-cta-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.catalog-cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.catalog-cta-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  stroke-width: 1.6;
  fill: none;
}

.catalog-cta-copy {
  flex: 1;
}

.catalog-cta-copy h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(20px, 3vw, 28px);
  color: #fff;
  font-weight: 500;
  margin-bottom: 6px;
}

.catalog-cta-copy p {
  color: #b0b0b0;
  font-size: 14px;
}

.catalog-cta .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}

.pagination button,
.pagination span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #ececec;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  color: #333;
}

.pagination span.current {
  background: var(--accent);
  color: #fff;
}

.pagination span.dots {
  background: none;
  cursor: default;
}

.pagination button:hover:not(:disabled) {
  background: #e0e0e0;
}

.pagination button:disabled {
  opacity: .4;
  cursor: default;
}

.catalog-loading,
.catalog-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.related-products {
  margin-top: 56px;
}

.related-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  margin-bottom: 24px;
}

.related-grid {
  grid-template-columns: repeat(4, 1fr);
}

.related-grid h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.35;
  color: #3a3a3a;
}

/* Product page */
.product-page {
  padding: 32px 0 64px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.product-gallery-main {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #f9f7f4;
}

.product-gallery-main img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, .55);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.gallery-nav:hover { background: rgba(20, 20, 20, .8); }
.gallery-nav-prev { left: 10px; }
.gallery-nav-next { right: 10px; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 48px 72px;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(1200px, 100%);
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-nav:hover { background: rgba(255, 255, 255, .22); }

.lightbox-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #ddd;
  font-size: 14px;
}

.product-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.product-thumbs button {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  width: 72px;
  height: 72px;
}

.product-thumbs button.active,
.product-thumbs button:hover {
  border-color: var(--accent);
}

.product-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 12px;
}

.product-subtitle {
  display: inline-block;
  background: var(--cream);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.product-specs {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 10px;
}

.product-features li {
  font-size: 14px;
  padding-left: 20px;
  position: relative;
}

.product-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.breadcrumbs a:hover { color: var(--accent); }

@media (max-width: 1100px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  .catalog-cta-inner {
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-head { align-items: flex-start; }
  .catalog-toolbar { margin-left: 0; width: 100%; justify-content: space-between; }
  .lightbox { padding: 56px 12px 40px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 24px; }
}

@media (max-width: 480px) {
  .catalog-grid,
  .related-grid { grid-template-columns: 1fr; }
}
