/* =========================================================
   RADIANCE HOUSE — MASTER CATALOG
   products.css
   ========================================================= */

.catalog-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 25%, rgba(255, 211, 89, .20), transparent 24rem),
    linear-gradient(180deg, #eef9fb 0%, #f8fcfd 100%);
  border-bottom: 1px solid rgba(36, 86, 113, .08);
}

.catalog-hero__flow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .9;
}

.catalog-hero__flow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.catalog-hero__flow path {
  fill: none;
  stroke-linecap: round;
}

.catalog-hero__flow path:nth-child(1) {
  stroke: rgba(35, 55, 65, .30);
  stroke-width: 5;
}

.catalog-hero__flow path:nth-child(2) {
  stroke: rgba(35, 150, 171, .34);
  stroke-width: 3;
}

.catalog-hero__flow path:nth-child(3) {
  stroke: rgba(226, 181, 45, .42);
  stroke-width: 2;
}

.catalog-hero__inner {
  position: relative;
  z-index: 1;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding-top: 150px;
  padding-bottom: 56px;
}

.catalog-hero__copy {
  max-width: 760px;
}

.catalog-hero__copy h1 {
  margin: 6px 0 10px;
  font-size: clamp(2.55rem, 5vw, 4.75rem);
  line-height: .98;
  font-weight: 500;
  letter-spacing: -.045em;
}

.catalog-hero__copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.62;
  color: #405865;
}

.catalog-tools {
  position: relative;
  z-index: 3;
  margin-top: -25px;
}

.catalog-tools__panel {
  display: block;
  min-height: 0 !important;
  height: auto !important;
  padding: 18px 22px;
  border: 1px solid rgba(44, 90, 112, .12);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 45px rgba(32, 73, 94, .09);
}

.catalog-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.catalog-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(39, 87, 110, .20);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}

.catalog-search input:focus {
  outline: 3px solid rgba(35, 150, 171, .14);
  border-color: rgba(35, 150, 171, .56);
}

.catalog-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  color: #667a85;
  font-size: .82rem;
}

.catalog-suggestions button {
  appearance: none;
  border: 0;
  padding: 2px 3px;
  background: none;
  color: #176d86;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(23, 109, 134, .25);
  text-underline-offset: 3px;
}

.catalog-filter-group {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.catalog-filter-label {
  padding-top: 7px;
  color: #61737d;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.catalog-filter {
  appearance: none;
  border: 1px solid rgba(38, 87, 111, .16);
  border-radius: 999px;
  padding: 7px 12px;
  background: #f7fbfc;
  color: #34505e;
  font: inherit;
  font-size: .86rem;
  line-height: 1.2;
  cursor: pointer;
}

.catalog-filter:hover,
.catalog-filter:focus-visible {
  border-color: rgba(24, 118, 151, .38);
  background: #edf8fb;
}

.catalog-filter.is-active {
  border-color: #176f8a;
  background: #176f8a;
  color: #fff;
}

.catalog-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(47, 84, 103, .09);
}

.catalog-status p {
  margin: 0;
  color: #5d717c;
  font-size: .9rem;
}

.catalog-clear {
  appearance: none;
  border: 0;
  padding: 3px 0;
  background: none;
  color: #176d86;
  font: inherit;
  font-size: .84rem;
  cursor: pointer;
}

.catalog-results {
  padding-top: 38px;
  padding-bottom: 70px;
}

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

.catalog-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 13px;
  padding: 12px;
  border: 1px solid rgba(46, 84, 103, .11);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(28, 66, 87, .05);
}

.catalog-card__media {
  align-self: start;
}

.catalog-card__cover-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 9px;
  background: #eef5f6;
}

.catalog-card__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  background:
    linear-gradient(145deg, #dff4f6, #eef7e6 55%, #fff4cc);
  text-align: center;
  color: #214a5d;
}

.catalog-card__placeholder span,
.modal-cover-placeholder span {
  display: block;
  margin-bottom: 5px;
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.catalog-card__placeholder strong,
.modal-cover-placeholder strong {
  font-size: .75rem;
  line-height: 1.15;
}

.catalog-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.catalog-card__topline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}

.catalog-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef7f9;
  color: #21677b;
  font-size: .67rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.catalog-card__badge--games {
  background: #fff3d6;
  color: #795a12;
}

.catalog-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.012em;
}

.catalog-card__author {
  margin: 4px 0 0;
  color: #687982;
  font-size: .78rem;
  line-height: 1.3;
}

.catalog-card__meta {
  margin: 7px 0 0;
  color: #78868d;
  font-size: .72rem;
  line-height: 1.35;
}

.catalog-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.catalog-card__actions .button {
  padding: 6px 9px;
  min-height: 0;
  font-size: .73rem;
}

.catalog-empty {
  max-width: 560px;
  margin: 55px auto;
  text-align: center;
}

.catalog-empty h2 {
  margin-bottom: 7px;
}

.catalog-empty p {
  color: #657780;
}

.catalog-more {
  background: #123f55;
  color: #fff;
}

.catalog-more__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding-top: 44px;
  padding-bottom: 44px;
}

.catalog-more h2 {
  margin: 3px 0 8px;
  color: #fff;
}

.catalog-more p:not(.eyebrow) {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, .80);
}

.catalog-more__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.product-modal {
  width: min(860px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
}

.product-modal::backdrop {
  background: rgba(12, 31, 40, .55);
  backdrop-filter: blur(2px);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
  color: #244b5d;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-product {
  display: grid;
  grid-template-columns: minmax(160px, 235px) minmax(0, 1fr);
  gap: 25px;
  padding: 30px;
}

.modal-cover-wrap {
  position: relative;
  align-self: start;
  min-height: 250px;
  overflow: hidden;
  border-radius: 12px;
  background: #eef5f6;
}

.modal-cover {
  display: block;
  width: 100%;
  height: auto;
}

.modal-cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(145deg, #dff4f6, #eef7e6 55%, #fff4cc);
  text-align: center;
  color: #214a5d;
}

.modal-product__copy {
  min-width: 0;
}

.modal-product__copy h2 {
  margin-top: 5px;
}

.modal-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 18px;
}

.modal-keyword {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef6f8;
  color: #426371;
  font-size: .75rem;
}

@media (max-width: 1050px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .catalog-hero__inner {
    min-height: 270px;
    padding-top: 125px;
    padding-bottom: 44px;
  }

  .catalog-tools {
    margin-top: -18px;
  }

  .catalog-filter-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .catalog-filter-label {
    padding-top: 0;
  }

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

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

  .catalog-more__actions {
    justify-content: flex-start;
  }

  .modal-product {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .modal-cover-wrap {
    width: min(210px, 70%);
    min-height: 220px;
  }
}

.catalog-hero__inner {
  justify-content: space-between;
  gap: 40px;
}

.catalog-hero__copy {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
}

.catalog-hero__art {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  align-self: flex-end;
  width: min(174px, 14vw);
  margin-bottom: -35px;
  margin-right: 20px;
  pointer-events: none;
}

.catalog-hero__art img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 18px rgba(24, 61, 82, .12));
}

@media (max-width: 760px) {
  .catalog-hero__inner {
    gap: 18px;
  }

  .catalog-hero__art {
    width: min(180px, 34vw);
    margin-right: 0;
    margin-bottom: -20px;
  }
}

@media (max-width: 520px) {
  .catalog-hero__art {
    width: 145px;
    margin-bottom: -14px;
  }
}

@media (max-width: 520px) {
  .catalog-search {
    grid-template-columns: 1fr;
  }

  .catalog-tools__panel {
    padding: 16px;
  }

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

  .catalog-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }
}
