.marketing-codes {
  max-width: 1500px;
  margin: auto;
  color: #263545;
}
.codes-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.codes-heading h2 {
  margin: 0 0 8px;
  font-size: 26px;
}
.codes-heading p {
  margin: 0;
  color: #738196;
  line-height: 1.6;
}
.codes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}
.codes-catalog,
.codes-preview {
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 12px;
  padding: 24px;
  min-width: 0;
}
.codes-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.marketing-codes .codes-tabs button {
  margin: 0;
  background: #f4f6f9;
  border-color: transparent;
  border-radius: 7px;
}
.marketing-codes .codes-tabs button.active {
  color: #fff;
  background: #427aff;
}
.marketing-codes .codes-search {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9e0ea;
  border-radius: 7px;
}
.codes-count {
  color: #7b8798;
  font-size: 13px;
  margin: 16px 0 0;
}
.codes-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #edf0f4;
}
.codes-product {
  flex: 1;
  min-width: 0;
}
.codes-product strong {
  display: block;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  margin: 5px 0;
}
.codes-product small {
  font-size: 12px;
  color: #348665;
}
.codes-product .codes-unavailable {
  color: #9099a7;
}
.codes-type {
  display: inline-block;
  font-size: 12px;
  color: #5a6d87;
  background: #f1f4f8;
  border-radius: 4px;
  padding: 3px 7px;
}
.marketing-codes .codes-row button {
  flex: none;
  margin: 0;
  white-space: nowrap;
  border-radius: 6px;
  font-size: 13px;
  padding: 9px 12px;
}
.marketing-codes button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.codes-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 20px;
}
.codes-pagination span {
  font-size: 13px;
  color: #7b8798;
}
.codes-preview {
  position: sticky;
  top: 20px;
  text-align: center;
}
.codes-preview-title {
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  margin: 14px 0;
}
.codes-image {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto;
  background: white;
}
.codes-scan {
  font-size: 13px;
  color: #738196;
}
.codes-download {
  display: block;
  margin-top: 18px;
  background: #427aff;
  color: #fff !important;
  border-radius: 7px;
  padding: 13px;
  text-decoration: none;
}
.codes-message {
  color: #427aff;
  line-height: 1.6;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.codes-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #edf0f4;
  font-size: 12px;
  line-height: 1.8;
  color: #8894a4;
  text-align: left;
}
.codes-placeholder {
  padding: 50px 8px;
  color: #8c98a7;
}
.codes-placeholder > span {
  font-size: 76px;
  color: #d9e2ef;
}
.codes-placeholder h3 {
  font-size: 17px;
  font-weight: 500;
  color: #52637b;
}
.codes-placeholder p,
.codes-empty {
  font-size: 13px;
  line-height: 1.6;
  color: #8c98a7;
}
.codes-empty {
  padding: 40px 0;
  text-align: center;
}
@media (max-width: 1100px) {
  .codes-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 16px;
  }
  .codes-catalog,
  .codes-preview {
    padding: 18px;
  }
}
@media (max-width: 900px) {
  .codes-layout {
    grid-template-columns: 1fr;
  }
  .codes-preview {
    position: static;
  }
  .codes-heading {
    align-items: flex-start;
  }
  .codes-heading h2 {
    font-size: 22px;
  }
  .codes-row {
    gap: 12px;
  }
  .codes-product strong {
    font-size: 14px;
  }
}
