:root {
  color: #171717;
  background: #f5f5f6;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 300px minmax(380px, 560px) 390px;
  gap: 24px;
  min-height: 100vh;
  padding: 48px;
  align-items: start;
}

.product-list-panel,
.editor {
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.06);
}

.product-list-panel {
  min-height: 520px;
  padding: 24px;
}

.editor {
  padding: 32px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

header p,
.panel-header p {
  margin: 0 0 8px;
  color: #737883;
  font-size: 14px;
}

h1,
h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.editor header {
  margin-bottom: 28px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #000;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.product-list {
  display: grid;
  gap: 10px;
}

.empty-list {
  margin: 0;
  color: #737883;
  font-size: 14px;
  line-height: 1.6;
}

.product-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 8px;
  border: 1px solid #ebecef;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.product-row-active {
  border-color: #111;
  background: #f7f7f7;
}

.product-row img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: #ececec;
}

.product-row-copy {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.product-row-copy strong,
.product-row-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-row-copy strong {
  font-size: 14px;
}

.product-row-copy small {
  color: #737883;
  font-size: 12px;
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 44px;
  border: 1px solid #d9dce1;
  border-radius: 6px;
  padding: 0 12px;
}

input:focus {
  outline: 2px solid #000;
  outline-offset: 1px;
}

.upload {
  padding: 16px;
  border: 1px dashed #c7cad1;
  border-radius: 8px;
  background: #fafafa;
}

.upload span {
  color: #787d86;
  font-size: 13px;
  font-weight: 400;
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}

.preview-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid #ececec;
  background: #eee;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item button {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  cursor: pointer;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.actions button {
  height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #fff;
  background: #000;
  font-weight: 600;
  cursor: pointer;
}

.actions .danger-button {
  color: #b42318;
  background: #fff1f0;
}

#status {
  min-height: 20px;
  margin: 0;
  color: #3c7a33;
}

.phone {
  position: sticky;
  top: 32px;
}

.phone-screen {
  width: 375px;
  height: 812px;
  overflow: hidden;
  border-radius: 30px;
  background: #fdfdfe;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.16);
  padding: 102px 20px 0;
}

.preview-card {
  height: 509px;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.81);
  box-shadow: 0 10px 80px rgba(0, 0, 0, 0.11);
}

.preview-card img {
  display: block;
  width: 336px;
  height: 370px;
  object-fit: cover;
  border-radius: 30px;
  background: #e6ded6;
}

.preview-card h2 {
  margin: 17px 20px 0;
  font-size: 19px;
  line-height: 27px;
}

.preview-card p {
  margin: 3px 20px 0;
  color: #787d86;
  font-size: 14px;
}

.preview-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 20px 0;
}

.preview-bottom strong {
  color: #fa1111;
  font-size: 25px;
}

.preview-bottom strong span {
  font-size: 36px;
}

.preview-bottom > span {
  width: 88px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  background: #000;
  text-align: center;
  line-height: 36px;
}

@media (max-width: 1220px) {
  .shell {
    grid-template-columns: 280px minmax(380px, 1fr);
  }

  .phone {
    display: none;
  }
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}
