body[data-page="catalog"] {
  background:
    linear-gradient(rgba(245, 240, 232, 0.94), rgba(245, 240, 232, 0.94)),
    repeating-linear-gradient(90deg, rgba(61, 79, 107, 0.045) 0 1px, transparent 1px 42px),
    var(--color-cream);
}

.catalog-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d3a52 60%, #1a1a2e 100%);
  color: var(--color-white);
  padding-top: 112px;
  padding-bottom: 52px;
}

.catalog-hero__inner {
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: rgba(253, 250, 245, 0.7);
  font-size: 0.92rem;
  font-weight: 700;
}

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

.catalog-hero__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.catalog-hero h1 {
  max-width: 800px;
  font-size: 2.55rem;
  overflow-wrap: break-word;
}

.catalog-hero p:not(.section-kicker) {
  max-width: 600px;
  margin-top: 16px;
  color: rgba(253, 250, 245, 0.76);
}

.catalog-hero__ornament {
  position: relative;
  display: none;
  width: 116px;
  height: 160px;
  justify-self: end;
  border: 1px solid rgba(201, 169, 110, 0.56);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(196, 98, 58, 0.22), transparent 0 42px),
    linear-gradient(rgba(253, 250, 245, 0.86), rgba(253, 250, 245, 0.86)),
    repeating-linear-gradient(45deg, rgba(201, 169, 110, 0.28) 0 1px, transparent 1px 24px);
  box-shadow: var(--shadow-gold);
}

.catalog-hero__ornament span {
  position: absolute;
  display: block;
}

.catalog-hero__ornament span:nth-child(1) {
  inset: 22px 27px;
  border: 4px solid var(--color-primary);
  border-bottom: 0;
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
}

.catalog-hero__ornament span:nth-child(2) {
  left: 50%;
  top: 54px;
  width: 50px;
  height: 50px;
  border: 3px solid var(--color-secondary);
  transform: translateX(-50%) rotate(45deg);
}

.catalog-hero__ornament span:nth-child(3) {
  left: 50%;
  top: 73px;
  width: 18px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gold);
  transform: translateX(-50%);
}

.catalog-toolbar {
  position: relative;
  z-index: 2;
  margin-top: -32px;
}

.toolbar-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  border: 1px solid rgba(201, 169, 110, 0.34);
  border-radius: var(--radius-md);
  background: rgba(253, 250, 245, 0.96);
  padding: 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.search-field {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  padding: 0 14px;
  color: var(--color-secondary);
}

.search-field svg {
  width: 22px;
  height: 22px;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  outline: 0;
}

.search-field input::placeholder {
  color: var(--color-text-muted);
}

.sort-field {
  position: relative;
  display: grid;
  gap: 6px;
}

.sort-field__label {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  padding: 0 14px;
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.custom-select__trigger:hover,
.custom-select.is-open .custom-select__trigger {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.14);
}

.custom-select__trigger svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition-fast);
}

.custom-select.is-open .custom-select__trigger svg {
  transform: rotate(180deg);
}

.custom-select__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(201, 169, 110, 0.48);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  padding: 6px;
}

.custom-select__menu[hidden] {
  display: none;
}

.custom-select__option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.custom-select__option:hover,
.custom-select__option:focus-visible {
  background: rgba(201, 169, 110, 0.18);
}

.custom-select__option.is-selected {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 800;
}

.filter-chips {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(201, 169, 110, 0.44);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-dark);
  padding: 9px 15px;
  font-weight: 800;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.chip em {
  display: grid;
  place-items: center;
  min-width: 26px;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(61, 79, 107, 0.09);
  color: var(--color-secondary);
  font-style: normal;
  font-size: 0.78rem;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold);
}

.chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.chip.is-active em {
  background: rgba(253, 250, 245, 0.18);
  color: var(--color-white);
}

.catalog-list {
  padding-top: 48px;
}

.product-grid,
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 18px;
}

.product-grid[hidden],
.skeleton-grid[hidden] {
  display: none;
}

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 169, 110, 0.26);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.product-card::before,
.product-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  opacity: 0.82;
  pointer-events: none;
}

.product-card::before {
  top: 10px;
  left: 10px;
  border-top: 2px solid var(--color-gold);
  border-left: 2px solid var(--color-gold);
}

.product-card::after {
  right: 10px;
  bottom: 10px;
  border-right: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
}

.product-card__image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--color-gray-light);
}

.product-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  border-radius: var(--radius-sm);
  background: rgba(196, 98, 58, 0.94);
  color: var(--color-white);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.product-card__body {
  padding: 18px;
}

.product-card__title {
  color: var(--color-dark);
}

.product-card__desc {
  display: -webkit-box;
  min-height: 3.2em;
  margin-top: 9px;
  overflow: hidden;
  color: var(--color-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  margin: 16px 0;
}

.product-card__price {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
}

.product-card__old-price {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-card__sold-out {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: rgba(26, 26, 46, 0.08);
  color: var(--color-text-muted);
  padding: 5px 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.product-card__order {
  gap: 8px;
}

.product-card__order svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.skeleton-card {
  min-height: 420px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.66), transparent) -160px 0 / 160px 100% no-repeat,
    linear-gradient(var(--color-gray-light) 0 0) top / 100% 58% no-repeat,
    linear-gradient(var(--color-gray-light) 0 0) 18px 65% / 55% 22px no-repeat,
    linear-gradient(var(--color-gray-light) 0 0) 18px 73% / 82% 16px no-repeat,
    linear-gradient(var(--color-gray-light) 0 0) 18px 82% / 45% 26px no-repeat,
    var(--color-white);
  box-shadow: var(--shadow-sm);
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to {
    background-position:
      calc(100% + 160px) 0,
      top,
      18px 65%,
      18px 73%,
      18px 82%,
      0 0;
  }
}

.catalog-state {
  display: grid;
  justify-items: center;
  max-width: 620px;
  margin: 20px auto;
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: var(--radius-md);
  background: var(--color-white);
  padding: 42px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.catalog-state[hidden] {
  display: none;
}

.catalog-state svg {
  width: 76px;
  height: 76px;
  color: var(--color-primary);
  fill: none;
}

.catalog-state h2 {
  margin-top: 14px;
  color: var(--color-dark);
  font-size: 2rem;
}

.catalog-state p {
  margin-top: 10px;
  color: var(--color-text-muted);
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

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

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

.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.72);
  backdrop-filter: blur(12px);
}

.product-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(201, 169, 110, 0.48);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-lg);
}

.product-modal__close {
  position: sticky;
  top: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 14px 14px 0 auto;
  border: 1px solid rgba(201, 169, 110, 0.55);
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-dark);
}

.product-modal__close svg {
  width: 22px;
  height: 22px;
}

.product-modal__content {
  display: grid;
  gap: 24px;
  padding: 0 22px 28px;
}

.product-modal__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--color-gray-light);
}

.product-modal__info h2 {
  color: var(--color-dark);
  font-size: 2.1rem;
}

.product-modal__info p {
  margin-top: 12px;
  color: var(--color-text-muted);
}

.product-modal__meta {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: var(--color-text);
}

.product-modal__meta span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--color-gray-light);
  padding-bottom: 8px;
}

.product-modal__meta em {
  color: var(--color-text-muted);
  font-style: normal;
  text-align: right;
}

.product-modal__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-top: 16px;
}

.product-modal__price strong {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.product-modal__price del {
  color: var(--color-text-muted);
}

.product-modal .btn {
  gap: 8px;
}

.product-modal .btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (min-width: 480px) {
  .product-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .catalog-hero__content {
    grid-template-columns: 1fr auto;
  }

  .catalog-hero h1 {
    font-size: 4rem;
  }

  .catalog-hero__ornament {
    display: block;
  }

  .toolbar-panel {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: end;
    padding: 18px;
  }

  .product-grid,
  .skeleton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-modal__content {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
    padding: 0 30px 34px;
  }
}

@media (min-width: 1200px) {
  .product-grid,
  .skeleton-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

  .state-actions {
    display: grid;
    width: 100%;
  }
}
