@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");

:root {
  --ink: #4b3d38;
  --muted: #7f716c;
  --line: #e6dbd2;
  --surface: #fffdf9;
  --soft: #f8f1ea;
  --cream: #fbf7f0;
  --brand: #A66464;
  --brand-strong: #654943;
  --accent: #A66464;
  --sage: #8b9a78;
  --danger: #a0443c;
  --shadow: 0 18px 44px rgba(86, 68, 62, 0.08);
}

@font-face {
  font-family: "Portofino Gelateria";
  src: url("../fonts/PortofinoGelateria-Script.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
}

a { color: var(--brand-strong); }

.announcement-bar {
  padding: 9px 18px;
  background: #a66464;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.announcement-bar a {
  color: inherit;
  font-weight: inherit;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 34px;
  background: rgba(255, 253, 249, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 210px;
  max-width: 52vw;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.app-header nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}

.app-header nav a {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.app-header nav a:hover { color: var(--accent); }

.app-main {
  width: min(1180px, calc(100% - 36px));
  margin: 36px auto 64px;
  flex: 1 0 auto;
}

.site-footer {
  padding: 28px 18px 32px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer__support,
.site-footer__copyright {
  margin: 0;
}

.site-footer__support {
  font-size: 15px;
  line-height: 1.6;
}

.site-footer__copyright {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

h1, h2, h3 {
  margin: 0 0 10px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--brand-strong);
}

h1, h2 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

h2 {
  font-size: 25px;
  line-height: 1.15;
}

p {
  line-height: 1.58;
  margin: 0 0 12px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.muted { color: var(--muted); }

.eyebrow {
  margin: 0 0 8px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notice {
  padding: 13px 15px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice-success { border-color: #b6c8a0; }
.notice-error { border-color: #d8aaa3; }

.page-title {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-end;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.page-title .muted {
  max-width: 700px;
  margin-bottom: 0;
}

.narrow {
  max-width: 520px;
  margin: 0 auto;
}

.narrow h1 {
  margin-bottom: 18px;
  text-align: center;
}

.panel,
.product-card,
.line-item,
.admin-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel,
.admin-tile {
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.stack { display: grid; gap: 16px; }

.product-card,
.line-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px;
}

.product-card {
  min-height: 220px;
  border-top: 4px solid rgba(185, 141, 126, 0.5);
}

.product-card p:last-child { margin-bottom: 0; }

.bulk-products-form {
  display: grid;
  gap: 16px;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.bulk-actions label {
  min-width: min(280px, 100%);
  margin-bottom: 0;
}

.product-select {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  min-height: 92px;
  margin-bottom: 0;
}

.product-select input {
  width: 18px;
  height: 18px;
}

.admin-product-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.admin-product-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.admin-product-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-product-thumb span {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.admin-tile {
  display: block;
  color: inherit;
  text-decoration: none;
}

.admin-tile:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.search-form {
  display: flex;
  gap: 9px;
  min-width: min(470px, 100%);
}

.motif-page-title {
  align-items: end;
}

.motif-form {
  width: min(360px, 100%);
}

.motif-form label {
  margin-bottom: 7px;
  letter-spacing: 0;
  text-transform: none;
}

.product-slider-section {
  margin-top: 34px;
}

.slider-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.slider-heading-row h2 {
  margin-bottom: 0;
  font-size: 31px;
}

.product-slider-shell {
  position: relative;
  margin-top: 18px;
}

.product-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 3);
  gap: 24px;
  overflow-x: auto;
  padding: 4px 48px 16px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.motif-product-card {
  display: grid;
  grid-template-rows: 250px auto;
  gap: 13px;
  min-width: 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
}

.motif-product-card:hover .motif-product-title {
  color: var(--accent);
}

.motif-product-card:hover .motif-product-cta,
.motif-product-card:focus-visible .motif-product-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.motif-product-image-wrap {
  display: grid;
  place-items: end center;
  min-width: 0;
}

.motif-product-image-wrap img {
  display: block;
  width: 100%;
  max-width: 230px;
  height: 240px;
  object-fit: contain;
}

.motif-product-image-empty {
  display: grid;
  place-items: center;
  width: min(230px, 100%);
  height: 240px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.72);
  font-weight: 700;
}

.motif-product-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.motif-product-title {
  color: var(--brand-strong);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.2;
  transition: color 150ms ease;
}

.motif-product-meta {
  color: var(--muted);
  line-height: 1.25;
}

.motif-product-price {
  color: var(--ink);
  font-size: 13px;
}

.motif-product-cta {
  display: inline-grid;
  place-items: center;
  min-width: 92px;
  min-height: 36px;
  margin-top: 8px;
  padding: 8px 16px;
  border: 1px solid var(--brand-strong);
  border-radius: 999px;
  color: var(--brand-strong);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.slider-arrow {
  position: absolute;
  top: 112px;
  z-index: 2;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-color: rgba(230, 219, 210, 0.68);
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(86, 68, 62, 0.11);
}

.slider-arrow:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--brand-strong);
}

.slider-arrow-prev {
  left: 0;
}

.slider-arrow-next {
  right: 0;
}

.selected-stamp-preview {
  display: grid;
  place-items: center;
  margin: 42px auto 8px;
}

.selected-stamp-preview img {
  display: block;
  width: min(600px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-weight: 700;
}

.check-row input { width: auto; }

.settings-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.view-enable-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px 4px;
  background: var(--cream);
}

.view-enable-group legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline-color: var(--accent);
}

::placeholder {
  color: var(--ink);
  opacity: 0.5;
}

textarea { font-family: Consolas, Monaco, monospace; }

button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

button:hover,
.button:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  transform: translateY(-1px);
}

.secondary {
  background: transparent;
  color: var(--brand-strong);
}

.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--cream);
  font-size: 12px;
  font-weight: 700;
}

.editor-shell { display: grid; gap: 18px; }

.editor-back-link {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.editor-back-link:hover { color: var(--brand-strong); }

.editor-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.product-style-number {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 14px;
}

.product-editor-price {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.view-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.view-tabs button {
  background: var(--surface);
  color: var(--brand-strong);
  border-color: var(--line);
}

.view-tabs button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.editor-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 20px;
  align-items: start;
}

.editor-sidebar {
  display: grid;
  gap: 16px;
  align-items: start;
}

.preview-stage {
  position: relative;
  aspect-ratio: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(135deg, transparent 75%, rgba(255, 255, 255, 0.74) 75%) 0 0 / 32px 32px,
    var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 0;
  display: grid;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.preview-zoom-tools {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 12px 28px rgba(86, 68, 62, 0.1);
}

.preview-zoom-tools button {
  width: 36px;
  min-height: 34px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--brand-strong);
}

.preview-zoom-tools button:hover {
  background: var(--soft);
  border-color: var(--line);
}

.preview-zoom-tools #previewZoomReset {
  width: auto;
  padding: 0 10px;
}

.preview-viewport {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.preview-viewport.is-panning { cursor: grabbing; }

.preview-disclaimer {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

#previewCanvas {
  width: 100%;
  max-width: none;
  height: 100%;
  background: #fff;
  transform-origin: center center;
  will-change: transform;
}

.editor-controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.editor-description {
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
}

.editor-description h2 {
  margin-bottom: 8px;
  color: var(--brand-strong);
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-description-content {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.editor-description-content > :first-child {
  margin-top: 0;
}

.editor-description-content > :last-child {
  margin-bottom: 0;
}

.size-quantity-grid {
  margin-bottom: 18px;
}

#zoneControls:not(:empty) + .size-quantity-grid,
#zoneControls:not(:empty) + label {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 15px;
}

.size-quantity-grid h2 {
  margin-bottom: 10px;
  color: var(--brand-strong);
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.minimum-order-note {
  color: var(--muted);
  font-weight: 700;
  text-transform: none;
}

.size-quantity-grid table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.size-quantity-grid th,
.size-quantity-grid td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.size-quantity-grid th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.size-quantity-grid tr:last-child td { border-bottom: 0; }

.size-quantity-grid td:first-child {
  color: var(--brand-strong);
  font-weight: 800;
}

.size-quantity-grid td:first-child span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.size-quantity-grid td:last-child {
  width: 155px;
  white-space: nowrap;
}

.size-quantity-grid input {
  display: inline-block;
  width: 64px;
  margin: 0 7px;
  padding: 9px 10px;
  text-align: center;
}

.case-quantity-prefix,
.case-quantity-equals {
  color: var(--muted);
  font-weight: 800;
}

.case-quantity-total {
  color: var(--brand-strong);
}

.customization-mode {
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.customization-mode label {
  margin-bottom: 0;
}

.customization-mode p,
.zone-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.zone-control {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 15px;
}

#zoneControls .zone-control:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

#zoneControls .customization-mode + .zone-control {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatches label {
  display: inline-flex;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.swatches input { width: auto; }

.thumb-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.thumb-row figure {
  margin: 0;
  width: 120px;
}

.image-zoom-trigger {
  display: block;
  width: 120px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.image-zoom-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.thumb-row img,
.image-zoom-trigger img {
  width: 120px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.thumb-row figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.customized-zone-list {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.customized-zone-list div {
  display: block;
}

.customized-zone-list dt,
.customized-zone-list dd {
  display: inline;
  margin: 0;
}

.customized-zone-list dt {
  font-weight: 700;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(31, 22, 18, 0.84);
  color: #fff;
}

.image-viewer[hidden] { display: none; }

.image-viewer__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(31, 22, 18, 0.94);
}

.image-viewer__title {
  flex: 1;
  min-width: 0;
  font-weight: 800;
}

.image-viewer__button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.48);
  color: #fff;
  background: transparent;
}

.image-viewer__button:hover { background: rgba(255, 255, 255, 0.14); }

.image-viewer__viewport {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}

.image-viewer__viewport.is-panning { cursor: grabbing; }

.image-viewer__image {
  max-width: min(92vw, 1400px);
  max-height: calc(100vh - 96px);
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.variant-quantity-summary {
  width: min(460px, 100%);
  margin: 8px 0 14px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.variant-quantity-summary th,
.variant-quantity-summary td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.variant-quantity-summary th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.variant-quantity-summary tr:last-child td { border-bottom: 0; }

.line-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.button-row,
.template-manage-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.template-actions {
  display: grid;
  gap: 12px;
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.inline-form label {
  min-width: min(260px, 100%);
  margin-bottom: 0;
}

.template-line-item {
  align-items: stretch;
}

.template-manage-actions {
  justify-content: flex-end;
  max-width: 650px;
}

.line-actions strong {
  color: var(--brand-strong);
  font-size: 24px;
  font-weight: 400;
}

.totals {
  margin-left: auto;
  margin-top: 20px;
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 11px;
  box-shadow: var(--shadow);
}

.totals div {
  display: flex;
  justify-content: space-between;
}

.totals .cart-option {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.cart-option label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.cart-option input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
}

.cart-option label span {
  min-width: 0;
}

.totals .cart-upc-fee {
  color: var(--muted);
}

.totals div:last-of-type {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--brand-strong);
  font-size: 18px;
}

.checkout-grid,
.admin-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 20px;
  align-items: start;
}

.checkout-consent {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 8px 0 8px;
  width: 100%;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.checkout-consent input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
}

.checkout-consent span {
  min-width: 0;
}

.checkout-submit-note {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.compact-form {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.builder-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.visual-zone-editor {
  margin-bottom: 20px;
  padding: 0;
  overflow: hidden;
}

.visual-zone-editor[hidden] {
  display: none;
}

.zone-editor-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fffdf9;
}

.zone-editor-topbar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.zone-editor-workspace {
  display: grid;
  grid-template-columns: 310px minmax(420px, 1fr) 280px;
  min-height: 720px;
}

.zone-tool-panel,
.zone-editor-controls {
  background: #f7f7f5;
}

.zone-tool-panel {
  border-right: 1px solid var(--line);
}

.zone-tool-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.zone-tool-section h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.zone-tool-section[hidden] {
  display: none;
}

.curve-settings {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.curve-settings[hidden] {
  display: none;
}

.zone-stage-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  background-color: #f8f8f6;
  background-image: radial-gradient(rgba(75, 61, 56, 0.28) 1px, transparent 1px);
  background-size: 12px 12px;
}

.zone-stage-hint {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.9);
}

.zone-stage-hint p:last-child {
  margin-bottom: 0;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.zoom-controls button {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

#zoomLevel {
  min-width: 48px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.zone-canvas-wrap {
  display: grid;
  place-items: center;
  min-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(86, 68, 62, 0.08);
}

#zoneBuilderCanvas {
  width: min(720px, 100%);
  height: auto;
  cursor: crosshair;
  touch-action: none;
}

.zone-editor-controls {
  padding: 18px;
  border-left: 1px solid var(--line);
}

.zone-editor-controls .zone-tool-section-inline {
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.zone-delete-button {
  width: 100%;
  margin-bottom: 14px;
}

.zone-delete-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

pre {
  overflow: auto;
  background: #493832;
  color: #fff7ef;
  padding: 14px;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .announcement-bar {
    font-size: 11px;
    line-height: 1.4;
  }

  .app-header {
    display: grid;
    justify-items: center;
    padding: 16px 18px;
  }

  .app-header nav {
    justify-content: center;
    gap: 14px;
  }

  .page-title,
  .editor-toolbar,
  .product-card,
  .line-item {
    display: grid;
  }

  .editor-form,
  .zone-editor-workspace,
  .checkout-grid,
  .admin-config-grid {
    grid-template-columns: 1fr;
  }

  .zone-editor-workspace {
    min-height: 0;
  }

  .zone-tool-panel,
  .zone-editor-controls {
    border: 0;
  }

  .zone-canvas-wrap {
    min-height: 360px;
  }

  .zone-stage-hint {
    display: grid;
  }

  .line-actions { justify-items: start; }

  .admin-product-summary {
    align-items: flex-start;
  }

  .search-form {
    min-width: 0;
    width: 100%;
  }

  .motif-form {
    width: 100%;
  }

  .product-slider {
    grid-auto-columns: calc((100% - 20px) / 2);
    gap: 20px;
    padding-inline: 42px;
  }

  .motif-product-card {
    grid-template-rows: 220px auto;
  }

  .motif-product-image-wrap img,
  .motif-product-image-empty {
    height: 210px;
  }

  .slider-arrow {
    top: 94px;
  }
}

@media (max-width: 560px) {
  .app-main {
    width: min(100% - 24px, 1180px);
    margin-top: 26px;
  }

  .search-form {
    display: grid;
  }

  .product-slider {
    grid-auto-columns: 100%;
    padding-inline: 36px;
  }

  .slider-heading-row h2 {
    font-size: 25px;
  }

  .motif-product-card {
    grid-template-rows: 210px auto;
  }

  .motif-product-image-wrap img,
  .motif-product-image-empty {
    height: 200px;
  }

  .brand { width: 180px; }
}
