.product-preview-section {
  background: #f5f0e7;
}

.product-preview-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.product-preview-heading > div {
  max-width: 720px;
}

.product-preview-heading .btn {
  flex: 0 0 auto;
}

.product-preview-grid,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f0efe9;
}

.product-media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: contain;
  background: #f4f3ee;
}

.product-media-placeholder {
  align-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--white);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(32, 111, 104, 0.86), rgba(21, 21, 21, 0.92)),
    url("../images/optika-omega-frames-wall.jpg") center / cover;
}

.product-media-placeholder strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
}

.product-media-placeholder span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
}

.product-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--white);
  background: rgba(21, 21, 21, 0.72);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.2;
}

.product-badge-reference {
  color: #194842;
  background: rgba(218, 241, 233, 0.92);
}

.product-badge-muted {
  color: #6c4b20;
  background: rgba(253, 235, 194, 0.94);
}

.product-badge-review {
  top: 43px;
  color: #7a3d2b;
  background: rgba(255, 224, 211, 0.95);
}

.product-card-body {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 17px;
}

.product-brand {
  margin: 0 0 7px;
  color: var(--gold-deep) !important;
  font-size: 0.74rem !important;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-card h2,
.product-card h3 {
  min-height: 48px;
  margin: 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.25;
}

.product-card-details {
  margin: 10px 0 0 !important;
  color: var(--muted) !important;
  font-size: 0.86rem !important;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.product-card-footer strong {
  color: var(--ink);
  font-size: 1rem;
}

.text-link {
  border: 0;
  padding: 0;
  color: var(--teal-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(32, 111, 104, 0.35);
  text-underline-offset: 4px;
}

.catalog-page {
  background: var(--paper);
}

.catalog-page .site-header {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(21, 21, 21, 0.08);
  box-shadow: 0 10px 30px rgba(10, 10, 10, 0.08);
}

.catalog-page .brand-mark {
  border-color: rgba(184, 135, 58, 0.36);
  background: rgba(184, 135, 58, 0.08);
}

.catalog-page .menu-toggle {
  border-color: rgba(21, 21, 21, 0.14);
  background: rgba(21, 21, 21, 0.04);
}

.catalog-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 74px;
  color: var(--white);
  background: #171918;
}

.catalog-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 47%;
  opacity: 0.48;
  background:
    linear-gradient(90deg, #171918, rgba(23, 25, 24, 0.25)),
    url("../images/optika-omega-interior.jpg") center / cover;
}

.catalog-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 48px;
  align-items: end;
}

.catalog-breadcrumb {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.85rem;
}

.catalog-breadcrumb a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.catalog-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.98;
  text-wrap: balance;
}

.catalog-hero-copy {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.1rem;
}

.catalog-hero-note {
  max-width: 700px;
  margin: 17px 0 0;
  color: #edc47d;
  font-size: 0.9rem;
  font-weight: 800;
}

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

.catalog-stat {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.catalog-stat strong {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.catalog-stat span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.catalog-main {
  padding: 54px 0 120px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, 0.7fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.catalog-control {
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(21, 21, 21, 0.13);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
}

.catalog-control::placeholder {
  color: #8b8b84;
}

.catalog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 18px;
}

.catalog-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.catalog-summary strong {
  color: var(--ink);
}

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

.catalog-grid .product-card {
  display: flex;
  flex-direction: column;
}

.catalog-grid .product-media {
  min-height: 245px;
}

.catalog-grid .product-media img {
  min-height: 245px;
}

.catalog-grid .product-card-body {
  min-height: 214px;
}

.product-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.product-detail-modal[hidden] {
  display: none;
}

.product-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 8, 0.76);
}

.product-detail-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(860px, 90vh);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
}

.product-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-size: 1.65rem;
  line-height: 1;
}

.product-detail-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
}

.product-detail-media {
  min-height: 500px;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #f2f1eb;
}

.product-detail-media.product-media-placeholder {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(32, 111, 104, 0.86), rgba(21, 21, 21, 0.92)),
    url("../images/optika-omega-frames-wall.jpg") center / cover;
}

.product-detail-media img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.product-detail-copy {
  padding: clamp(26px, 4vw, 48px);
}

.product-detail-copy .product-brand {
  margin-bottom: 10px;
}

.product-detail-copy h2 {
  max-width: 560px;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.product-detail-price {
  display: block;
  margin-top: 18px;
  color: var(--teal-dark);
  font-size: 1.35rem;
}

.product-detail-description {
  margin: 20px 0 0;
  color: var(--muted);
}

.product-review-note {
  margin: 14px 0 0;
  color: var(--gold-deep);
  font-size: 0.88rem;
  font-weight: 800;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 26px 0 0;
}

.product-spec {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.product-spec dt {
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-spec dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.catalog-empty {
  grid-column: 1 / -1;
  padding: 50px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--white);
  text-align: center;
}

@media (max-width: 1100px) {
  .product-preview-grid,
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-toolbar .catalog-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .product-preview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-preview-heading .btn {
    width: 100%;
  }

  .product-preview-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-hero {
    padding-top: 120px;
  }

  .catalog-hero::before {
    inset: 0;
    opacity: 0.2;
  }

  .catalog-hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .catalog-stats {
    max-width: 540px;
  }

  .catalog-main {
    padding-bottom: 72px;
  }

  .product-detail-content {
    grid-template-columns: 1fr;
  }

  .product-detail-media {
    min-height: 320px;
  }
}

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

  .product-card h3 {
    min-height: 0;
  }

  .catalog-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.3rem);
  }

  .catalog-hero-copy {
    font-size: 1rem;
  }

  .catalog-stats {
    grid-template-columns: 1fr;
  }

  .catalog-stat {
    min-height: 88px;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar .catalog-search {
    grid-column: auto;
  }

  .catalog-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-grid .product-media,
  .catalog-grid .product-media img {
    min-height: 260px;
  }

  .product-detail-dialog {
    max-height: 88vh;
  }

  .product-detail-media {
    min-height: 230px;
    padding: 18px;
  }

  .product-detail-copy h2 {
    font-size: 2rem;
  }
}
