@font-face {
  font-family: Editorial;
  src: url("/assets/editorial.woff2") format("woff2");
  font-display: swap;
}
:root {
  --ink: #392831;
  --paper: #fcf9f5;
  --rose: #78434e;
  --muted: #614951;
  --line: #d9c9c9;
  --petal: #efd9d5;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Editorial, Georgia, serif; font-weight: 400; line-height: 1; }
h1 { font-size: clamp(2.6rem, 6vw, 4.3rem); letter-spacing: -.035em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.1rem; }
button, input, textarea, select { font: inherit; }
button, a { color: inherit; }
button { cursor: pointer; }
:focus-visible, .upload-label:focus-within { outline: 2px solid var(--rose); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(calc(100% - 2rem), 1170px); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); }
.top-inner, .section-top, .overview, .overview-actions, .variant-actions, .form-footer {
  display: flex; align-items: center; gap: .8rem;
}
.top-inner, .section-top, .overview, .form-footer { justify-content: space-between; }
.top-inner { padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-family: Editorial, Georgia, serif; }
.brand img { flex: none; }
.overview { margin-top: 1.3rem; padding: clamp(1rem, 4vw, 2.2rem); background: #f1e3df; }
.overview p { margin-top: .45rem; }
.overview-actions, .variant-actions { flex-wrap: wrap; }
.secondary, .hint { font-size: .875rem; color: var(--muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  padding: .6rem .92rem; min-height: 44px; border: 1px solid var(--ink);
  border-radius: 2px; color: var(--ink); background: transparent; font-size: .9rem; text-align: center;
}
.button.primary { background: var(--ink); color: #fff; }
.button:not(:disabled):hover, .upload-label:hover { box-shadow: inset 0 0 0 2px #92556055; }
.button:disabled { opacity: .52; cursor: default; }
.page-status { margin-block: .8rem; }
.page-status:empty { margin: 0; }
[data-error="true"] { color: #9f2537; }
.workspace { display: grid; grid-template-columns: minmax(245px, .75fr) minmax(0, 1.6fr); gap: 1rem; margin-block: 1rem 3rem; align-items: start; }
.catalog-list, .editor { border: 1px solid var(--line); padding: clamp(.85rem, 2vw, 1.35rem); background: #fffdfb; }
.section-top { flex-wrap: wrap; margin-bottom: .75rem; }
#product-list { padding: 0; margin: .75rem 0 0; list-style: none; }
#product-list li + li { border-top: 1px solid var(--line); }
.product-row { width: 100%; display: grid; grid-template-columns: 3rem 1fr; gap: .65rem; align-items: center; padding: .5rem; background: transparent; border: 0; text-align: left; }
.product-row:hover, .product-row[aria-pressed="true"] { background: #f4e7e5; }
.product-row img { width: 3rem; height: 3.5rem; object-fit: cover; }
.product-row span, .product-row small { display: block; }
.product-row small { color: var(--muted); font-size: .82rem; }
label { display: block; font-size: .9rem; }
input:not([type="checkbox"]):not([type="file"]), textarea, select {
  width: 100%; min-height: 44px; margin-top: .25rem; padding: .48rem .55rem;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 2px;
}
textarea { resize: vertical; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
#product-form { display: grid; gap: .85rem; }
fieldset { min-width: 0; margin: 0; padding: .65rem .8rem .8rem; border: 1px solid var(--line); }
legend { padding-inline: .28rem; }
.check { display: flex; gap: .5rem; align-items: center; min-height: 38px; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.variant { margin-bottom: .7rem; }
.variant-fields { display: grid; grid-template-columns: minmax(0,1fr) 4.5rem; gap: .65rem; }
input[type="color"] { padding: .28rem !important; }
.photos { display: flex; flex-wrap: wrap; gap: .65rem; margin-block: .38rem .75rem; }
.photo { display: grid; align-content: start; width: 4.2rem; font-size: .75rem; text-align: center; }
.photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 2px; }
.photo button, .text-button { min-height: 40px; padding: .2rem; border: 0; background: transparent; text-decoration: underline; }
.upload-label { position: relative; cursor: pointer; }
.upload { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.form-footer { flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: .8rem; }
.closed { min-height: 80vh; display: grid; place-content: center; justify-items: center; padding: 1rem; text-align: center; gap: 1rem; }
@media (max-width: 720px) {
  .overview, .workspace { display: block; }
  .overview-actions { margin-top: .75rem; }
  .editor { margin-top: 1rem; }
}
@media (max-width: 420px) {
  .pair { grid-template-columns: 1fr; }
  .brand { line-height: 1.1; }
  .brand img { width: 37px; }
}
