:root {
  --ink: #12131a;
  --muted: #606779;
  --line: #dfe3ec;
  --soft: #f5f6fb;
  --panel: #ffffff;
  --pink: #ff2d75;
  --cyan: #12c9d6;
  --yellow: #f7c948;
  --green: #11a766;
  --red: #cf1f4a;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd4e2;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: #2b3040;
  font-size: 14px;
  font-weight: 700;
}

button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

button,
.primary-button {
  background: var(--ink);
  color: #fff;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.secondary-button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.danger-button {
  background: var(--red);
}

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

.is-muted-field {
  opacity: 0.58;
}

.notice {
  border-radius: 6px;
  margin: 0 0 16px;
  padding: 12px 14px;
  font-weight: 700;
}

.notice.error {
  background: #ffe8ef;
  color: #9d1040;
}

.notice.success {
  background: #e8fff2;
  color: #096b35;
}

.notice.warning {
  background: #fff7d7;
  color: #775300;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.shop-body {
  min-height: 100vh;
  background: #f6f7fb;
}

.shop-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand,
.admin-brand {
  font-weight: 900;
}

.shop-topbar nav,
.shop-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 62px) clamp(16px, 4vw, 48px) 28px;
}

.product-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  aspect-ratio: 4 / 5;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-copy h1 {
  max-width: 620px;
  margin: 0;
  font-size: 44px;
  line-height: 1.02;
}

.product-copy p {
  max-width: 560px;
  color: #43495a;
  font-size: 18px;
  line-height: 1.55;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.price-row strong {
  font-size: 28px;
}

.price-row span {
  border: 1px solid var(--cyan);
  border-radius: 999px;
  padding: 7px 12px;
  color: #087985;
  font-weight: 800;
}

.order-zone,
.more-products,
.product-description-section,
.legal-page,
.success-page,
.empty-state {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 48px) 54px;
}

.product-description-section {
  padding-top: 10px;
  padding-bottom: 24px;
}

.description-content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  color: #343b4b;
  font-size: 16px;
  line-height: 1.7;
}

.product-gallery-strip {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.product-gallery-strip img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.section-heading h2,
.admin-heading h1,
.legal-content h1,
.success-panel h1 {
  margin: 0 0 18px;
  font-size: 30px;
}

.order-form,
.legal-content,
.success-panel {
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.order-form h3 {
  margin: 8px 0 -4px;
  font-size: 18px;
}

.cart-box {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fafbff;
}

.cart-heading,
.cart-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.cart-heading h3 {
  margin: 0 0 4px;
}

.cart-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.cart-heading strong,
.cart-summary strong {
  color: var(--pink);
  font-size: 20px;
  white-space: nowrap;
}

.cart-lines {
  display: grid;
  gap: 10px;
}

.cart-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 110px 120px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.cart-line.is-selected {
  border-color: var(--pink);
}

.cart-line img {
  width: 74px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.cart-line-copy {
  display: grid;
  gap: 4px;
}

.cart-line-total {
  text-align: right;
}

.cart-summary {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-weight: 900;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
}

.check-row input {
  width: auto;
  margin-top: 2px;
}

.check-row a {
  color: var(--pink);
  text-decoration: underline;
}

.legal-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.is-hidden {
  display: none;
}

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

.product-card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
}

.product-card span {
  font-weight: 800;
}

.shop-footer {
  justify-content: center;
  padding: 28px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.legal-content {
  line-height: 1.65;
}

.success-page {
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.success-items {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.success-items span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.success-total {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-weight: 900;
}

.login-body,
.admin-body {
  background: var(--soft);
}

.login-panel {
  width: min(420px, calc(100% - 32px));
  margin: 9vh auto;
  display: grid;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.login-panel h1 {
  margin: 0;
}

.login-panel form,
.admin-form,
.settings-grid {
  display: grid;
  gap: 16px;
}

.admin-body {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #12131a;
  color: #fff;
  padding: 18px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--pink);
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar nav a,
.sidebar-foot a {
  border-radius: 6px;
  padding: 11px 12px;
  color: #d8dceb;
}

.admin-sidebar nav a.active,
.admin-sidebar nav a:hover {
  background: #262a38;
  color: #fff;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
  color: #b8bed0;
  font-size: 14px;
}

.admin-shell {
  min-height: 100vh;
  margin-left: 238px;
}

.admin-top {
  height: 58px;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  align-items: center;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.admin-main {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-heading h1 {
  margin-bottom: 0;
}

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

.metric-card,
.admin-panel,
.filter-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  font-size: 32px;
}

.admin-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 20px;
}

.admin-panel h2,
.admin-panel h3 {
  margin: 0;
}

.admin-panel.wide {
  grid-column: 1 / -1;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-submit {
  width: max-content;
}

.filter-bar {
  display: grid;
  grid-template-columns: 220px minmax(220px, 1fr) 120px;
  gap: 12px;
  padding: 14px;
}

.reports-filter {
  grid-template-columns: 180px 180px minmax(220px, 1fr) 120px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

td a {
  color: #0c7a86;
  font-weight: 800;
}

.align-right {
  text-align: right;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef1f7;
  color: #41495b;
  font-size: 13px;
  font-weight: 800;
}

.status-paid {
  background: #e8fff2;
  color: #096b35;
}

.status-waiting {
  background: #fff7d7;
  color: #775300;
}

.status-preparing {
  background: #e8fbff;
  color: #087985;
}

.status-done {
  background: #edf0f5;
  color: #3c4455;
}

.status-cancelled {
  background: #ffe8ef;
  color: #9d1040;
}

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

.stack-list a,
.stack-list span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.stack-list.compact span {
  display: block;
}

.action-stack {
  display: grid;
  gap: 10px;
}

.tracking-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.document-links,
.ad-preview {
  display: grid;
  gap: 10px;
}

.document-links a,
.ad-preview a {
  color: #0c7a86;
  font-weight: 800;
}

.ad-preview img {
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.refine-box {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.refine-box h3 {
  margin: 0;
}

.image-gallery-admin {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.image-tile-admin {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.image-tile-admin img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}

.image-tile-admin small {
  word-break: break-word;
}

.tile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tile-actions form,
.tile-actions button {
  width: 100%;
}

.active-stack-item {
  border-color: var(--pink) !important;
  background: #fff4f8;
}

.shop-image-manager {
  display: grid;
  gap: 14px;
}

.shop-image-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.shop-image-row img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}

.shop-image-fields,
.shop-image-actions {
  display: grid;
  gap: 10px;
}

.shop-image-fields small {
  word-break: break-word;
}

.shop-image-actions button {
  width: 100%;
}

.prompt-details {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.prompt-details summary {
  cursor: pointer;
  font-weight: 800;
}

.prompt-details pre {
  margin: 10px 0 0;
  overflow-x: auto;
  white-space: pre-wrap;
  color: var(--muted);
}

.compact-filter {
  margin: 0;
}

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

.existing-image-choice {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
}

.existing-image-choice:has(input:checked) {
  border-color: var(--pink);
  background: #fff4f8;
}

.existing-image-choice input {
  width: auto;
}

.existing-image-choice img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}

.existing-image-choice span {
  display: grid;
  gap: 3px;
  font-size: 12px;
  font-weight: 800;
}

.existing-image-choice small {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .product-hero,
  .admin-columns,
  .settings-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .product-copy h1 {
    font-size: 34px;
  }

  .cart-line {
    grid-template-columns: 64px minmax(0, 1fr) 96px;
  }

  .cart-line-total {
    grid-column: 2 / -1;
  }

  .admin-sidebar {
    position: static;
    width: auto;
  }

  .admin-shell {
    margin-left: 0;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shop-topbar,
  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid,
  .product-grid,
  .product-gallery-strip,
  .existing-image-grid,
  .filter-bar,
  .tracking-form {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: 16px;
  }

  .admin-sidebar nav {
    grid-template-columns: 1fr;
  }

  .shop-image-row {
    grid-template-columns: 1fr;
  }

  .cart-heading,
  .cart-summary {
    flex-direction: column;
  }

  .cart-line {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .cart-line label,
  .cart-line-total {
    grid-column: 1 / -1;
  }

  .cart-line-total {
    text-align: left;
  }
}
