/* VΛΖΛ — shop, checkout and admin. Shares tokens and header with the homepage. */
.market {
  --bg-primary: #f8f5f0;
  --bg-card: #fffdf9;
  --bg-sand: #efe8de;
  --bg-sand-soft: #f4efe6;
  --bg-olive: #3f4935;
  --bg-olive-hover: #333c2a;
  --bg-olive-soft: #ebefe8;
  --text-dark: #1c1b19;
  --text-muted: #6f6a62;
  --line: #e3ddd2;
  --line-strong: #cfc7b9;
  --border-subtle: rgba(28, 27, 25, 0.08);
  --danger: #9b3e31;
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-card: 20px;
  overflow-x: hidden;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body.market {
  margin: 0;
  background-color: var(--bg-primary);
  background-image:
    url("/assets/floral-background.svg"),
    radial-gradient(circle at 1px 1px, rgba(137, 159, 119, 0.2) 0 1.15px, transparent 1.5px),
    radial-gradient(circle at 14px 19px, rgba(137, 159, 119, 0.12) 0 0.9px, transparent 1.35px);
  background-position: center top, 0 0, 7px 5px;
  background-repeat: repeat-y, repeat, repeat;
  background-size: min(1600px, 100vw) auto, 32px 32px, 47px 47px;
  color: var(--text-dark);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--bg-olive);
  scrollbar-color: #b9b2a5 transparent;
}
.market ::selection {
  background: #d7dfcd;
  color: var(--text-dark);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 16px;
  min-height: 44px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms var(--ease-out);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-olive);
  color: #fff;
  border-color: var(--bg-olive);
  font-weight: 600;
  font-size: 15px;
}
.primary:hover:not(:disabled) {
  background: var(--bg-olive-hover);
}
.primary svg {
  width: 20px;
  height: 20px;
}
.ghost {
  background: var(--bg-card);
  border-color: var(--line);
  font-size: 13px;
  font-weight: 500;
}
.ghost:hover {
  border-color: var(--line-strong);
  background: #fff;
}
.danger {
  color: var(--danger);
  border-color: #dcbdb5;
  white-space: nowrap;
}
.danger:hover {
  background: #fff2ef;
}
.restore {
  color: var(--bg-olive);
  border-color: #b9c4ae;
  white-space: nowrap;
}
.restore:hover {
  background: #f0f5ec;
}
.link-button {
  border: 0;
  min-height: 44px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}
.link-button:hover {
  color: var(--text-dark);
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--bg-olive);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.muted {
  color: var(--text-muted);
  font-size: 13px;
}
main {
  max-width: 1380px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  min-height: 70vh;
}
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--text-dark);
  text-wrap: balance;
}
h1 {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
h2 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 18px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 48px;
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
input::placeholder,
textarea::placeholder {
  color: #8a847a;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--bg-olive);
  box-shadow: 0 0 0 3px rgba(63, 73, 53, 0.14);
}
[aria-invalid="true"] {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(155, 62, 49, 0.14) !important;
}
select {
  appearance: none;
  padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%233f4935' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
textarea {
  min-height: 84px;
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}
.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
}
.check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--bg-olive);
}

/* ------------------------------------------------------------ shop head */
.shop-head {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 28px;
}
.shop-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 15px;
}

/* category chips stay reachable while scrolling the catalog */
.chips {
  position: sticky;
  top: 80px;
  z-index: 15;
  display: flex;
  gap: 8px;
  margin: 0 -24px;
  padding: 12px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(var(--bg-primary) 78%, rgba(248, 245, 240, 0));
  scroll-padding-inline: 24px;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chips a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.chips a:hover {
  border-color: var(--line-strong);
}
.chips a[aria-current="page"] {
  background: var(--bg-olive);
  border-color: var(--bg-olive);
  color: #fff;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 6px;
}
.toolbar label {
  margin: 0;
}
.field-search {
  position: relative;
  flex: 1 1 260px;
}
.field-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.field-search input {
  padding-left: 44px;
}
.field-sort {
  flex: 0 1 210px;
}
.field-price {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 250px;
  color: var(--text-muted);
}
.field-price label {
  flex: 1;
}
.count {
  margin: 10px 0 18px;
  min-height: 1.5em;
  font-size: 13px;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ product grid */
.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 22px;
}
.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.card-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: linear-gradient(150deg, #efe9df, #e4e1d6);
  isolation: isolate;
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ease-out);
}
.card-photo:hover img {
  transform: scale(1.04);
}
.card-photo:active {
  transform: none;
}
.badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  background: rgba(255, 253, 249, 0.94);
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(28, 27, 25, 0.08);
}
.badge-sale {
  background: #a33a29;
  color: #fff;
}
.badge-ready {
  background: var(--bg-olive);
  color: #fff;
}
.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 2px 0;
}
.card-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}
.price-line {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-variant-numeric: tabular-nums;
}
.price-line strong {
  font-size: 17px;
  font-weight: 600;
}
.price-old {
  color: #8a847a;
  font-size: 13px;
  text-decoration: line-through;
}
.discount-label {
  color: #a33a29;
  font-size: 12px;
  font-weight: 600;
}
.card-add {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-color: var(--bg-olive);
  border-radius: 999px;
  color: var(--bg-olive);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
}
.card-add svg {
  width: 20px;
  height: 20px;
}
.card-add:hover {
  background: var(--bg-olive);
  color: #fff;
}
.card-add.is-added {
  background: var(--bg-olive);
  color: #fff;
}
.card.is-skeleton .card-photo,
.card.is-skeleton .card-body span {
  background: linear-gradient(100deg, #ece6dc 30%, #f5f1ea 50%, #ece6dc 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.card.is-skeleton .card-body span {
  display: block;
  height: 14px;
  border-radius: 6px;
  margin-top: 10px;
  width: 80%;
}
.card.is-skeleton .card-body span + span {
  width: 40%;
}
@keyframes shimmer {
  to {
    background-position: -150% 0;
  }
}
.empty {
  grid-column: 1 / -1;
  text-align: center;
  background: rgba(255, 253, 249, 0.7);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 56px 24px;
}
.empty img {
  width: 64px;
  margin: 0 auto 18px;
}
.empty h2 {
  margin-bottom: 8px;
}
.empty p {
  margin: 0;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ dialogs */
dialog {
  border: 0;
  padding: 0;
  color: var(--text-dark);
  background: var(--bg-primary);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: rgba(28, 31, 24, 0.5);
  backdrop-filter: blur(2px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
}
.icon-button:hover {
  background: rgba(63, 73, 53, 0.08);
}
.icon-button svg {
  width: 22px;
  height: 22px;
}
.sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  margin: 0;
  font-size: 30px;
}
.sheet {
  width: min(500px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border-radius: 24px 0 0 24px;
  box-shadow: -24px 0 60px rgba(28, 31, 24, 0.18);
}
.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-in 380ms var(--ease-out);
}
@keyframes sheet-in {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 28px;
}
.cart-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-row img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-sand);
}
.cart-row p {
  margin: 0;
}
.cart-row-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cart-row-price {
  margin-top: 4px !important;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.stepper button {
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}
.stepper button:hover {
  background: var(--bg-sand-soft);
}
.stepper svg {
  width: 18px;
  height: 18px;
}
.stepper span {
  min-width: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cart-empty,
.order-done {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 56px 12px;
  text-align: center;
}
.cart-empty p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 26px;
}
.order-done svg {
  width: 56px;
  height: 56px;
  padding: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--bg-olive);
}
.order-done h3 {
  margin: 6px 0 0;
  font-size: 32px;
}
.order-done p {
  margin: 0;
  max-width: 34ch;
  color: var(--text-muted);
}
.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.ghost-link:hover {
  background: #fff;
}
#order {
  margin-top: 10px;
}
.step {
  margin: 0;
  padding: 18px 0 6px;
  border: 0;
  min-width: 0;
}
.step legend {
  padding: 0;
  margin-bottom: 12px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
}
.step-label {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 500;
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-sand);
}
.segmented-3 {
  grid-template-columns: repeat(3, 1fr);
}
.step-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-olive-soft);
  font-size: 13px;
  line-height: 1.45;
  color: #3a4230;
}
.test-note {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff4dc;
  color: #6b4b00;
  font-size: 12.5px;
  font-weight: 500;
}
.pay-status {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 12px;
  text-align: center;
}
.pay-status h3 {
  margin: 4px 0 0;
  font-size: 30px;
}
.pay-status p {
  margin: 0;
  max-width: 34ch;
  color: var(--text-muted);
}
.pay-status .primary {
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
}
.pay-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--bg-sand);
  border-top-color: var(--bg-olive);
  animation: spin 900ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.pay-status svg {
  width: 56px;
  height: 56px;
  padding: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--bg-olive);
}
.pay-status.is-failed svg {
  background: var(--danger);
}
.pay-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}
.pay-badge.is-paid {
  background: var(--bg-olive-soft);
  color: var(--bg-olive);
}
.pay-badge.is-pending {
  background: #fff4dc;
  color: #6b4b00;
}
.pay-badge.is-failed {
  background: #fbe9e5;
  color: var(--danger);
}
.segmented label {
  position: relative;
  margin: 0;
}
.segmented input,
.zone input,
.studio input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  pointer-events: none;
}
.segmented span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.segmented input:checked + span {
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 27, 25, 0.1);
  font-weight: 600;
}
.segmented input:focus-visible + span,
.zone input:focus-visible ~ .zone-name,
.studio input:focus-visible + span {
  outline: 2px solid var(--bg-olive);
  outline-offset: 2px;
}
.zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.zone {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.zone:hover {
  border-color: var(--line-strong);
}
.zone:has(input:checked) {
  border-color: var(--bg-olive);
  background: var(--bg-olive-soft);
  box-shadow: inset 0 0 0 1px var(--bg-olive);
}
.zone:has(input[aria-invalid="true"]) {
  border-color: var(--danger);
}
.zone-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}
.zone-price {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--bg-olive);
}
.studios {
  display: grid;
  gap: 8px;
}
.studio {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.studio span {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.studio strong {
  font-size: 14px;
  font-weight: 600;
}
.studio small {
  font-size: 12.5px;
  color: var(--text-muted);
}
.studio input:checked + span {
  border-color: var(--bg-olive);
  background: var(--bg-olive-soft);
  box-shadow: inset 0 0 0 1px var(--bg-olive);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}
.field {
  margin-bottom: 12px;
}
.optional {
  font-weight: 400;
  color: var(--text-muted);
}
.zone-price s {
  margin-right: 4px;
  font-weight: 400;
  color: #8a847a;
}
.summary {
  margin: 10px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.free-meter {
  margin-bottom: 14px;
}
.free-meter p {
  margin: 0 0 8px;
  font-size: 13px;
}
.free-meter-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-sand);
  overflow: hidden;
}
.free-meter-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--bg-olive);
  transform-origin: left center;
  transition: transform 400ms var(--ease-out);
}
.free-meter.is-done {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bg-olive);
  font-weight: 600;
}
.free-meter.is-done p {
  margin: 0;
}
.free-meter.is-done svg {
  width: 20px;
  height: 20px;
}
.summary-lines {
  display: grid;
  gap: 6px;
  margin: 0;
}
.summary-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.summary-lines dt {
  color: var(--text-muted);
}
.summary-lines dd {
  margin: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.summary-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.summary-total dt,
.summary-total dd {
  color: var(--text-dark);
  font-size: 17px;
  font-weight: 600;
}
.agreements {
  display: grid;
  gap: 4px;
  margin: 16px 0 14px;
}
.agree {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}
.agree input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--bg-olive);
}
.agree a,
.fine a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.agree a:hover,
.fine a:hover {
  text-decoration-color: currentColor;
}
.fine {
  margin: 4px 0 0 30px;
  font-size: 12px;
  color: var(--text-muted);
}
.submit {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.message,
#error {
  color: var(--danger);
  white-space: pre-line;
  font-size: 14px;
  margin: 10px 0 0;
}
.message:empty {
  display: none;
}

/* product detail */
.detail {
  width: min(940px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  border-radius: 26px;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(28, 31, 24, 0.25);
}
.detail[open] {
  animation: detail-in 340ms var(--ease-out);
}
@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(248, 245, 240, 0.92);
}
#detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.detail-photo {
  background: var(--bg-sand);
  min-height: 100%;
}
.detail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 48px);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
.detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 40px 32px 32px;
}
.detail-cat {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  align-self: flex-start;
}
.detail-info h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.08;
}
.detail-ready {
  margin: 0;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-olive-soft);
  color: var(--bg-olive);
  font-size: 12.5px;
  font-weight: 600;
}
.detail-price strong {
  font-size: 24px;
}
.detail-text {
  margin: 0;
  color: #4b4842;
  white-space: pre-line;
  overflow-wrap: anywhere;
  max-width: 60ch;
}
.detail-info .primary {
  margin-top: 8px;
  min-height: 52px;
  border-radius: 14px;
}
.detail-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ admin */
.admin h1 {
  margin-bottom: 24px;
}
.panel {
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 20px;
  margin: 0 0 22px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.panel-head h2 {
  margin: 0;
}
.login-panel {
  max-width: 440px;
}
.login-panel .primary {
  width: 100%;
}
.admin-bar {
  position: sticky;
  top: 80px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -24px 18px;
  padding: 10px 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--line);
}
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.admin-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.admin-tabs a:hover {
  border-color: var(--bg-olive);
}
.admin-section {
  scroll-margin-top: 150px;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}
.photo-field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.photo-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--bg-sand-soft);
  overflow: hidden;
  text-align: center;
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-empty {
  padding: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.photo-actions {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.file-button {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--bg-olive);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.file-button:hover {
  background: var(--bg-olive-hover);
}
.file-button:focus-within {
  outline: 2px solid var(--bg-olive);
  outline-offset: 3px;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  min-height: 0;
}
.photo-status {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}
.switches,
.discount-settings {
  display: grid;
  gap: 10px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}
.switches legend,
.discount-settings legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: 13px;
}
.discount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
}
.discount-grid label {
  margin-bottom: 10px;
}
.discount-settings small,
.admin small {
  font-size: 12px;
  color: var(--text-muted);
}
.switch {
  position: relative;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 26px;
  min-height: 0;
  margin: 0;
  cursor: pointer;
}
.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d8d2c6;
  transition: background-color 220ms ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(28, 27, 25, 0.25);
  transition: transform 260ms var(--ease-out);
}
.switch input:checked + .switch-track {
  background: var(--bg-olive);
}
.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--bg-olive);
  outline-offset: 2px;
}
.switch input:disabled + .switch-track {
  opacity: 0.5;
}
.switch.compact {
  gap: 8px;
  font-size: 12px;
}
.switch.compact input,
.switch.compact .switch-track {
  width: 36px;
  height: 22px;
}
.switch.compact .switch-track::after {
  width: 16px;
  height: 16px;
}
.switch.compact input:checked + .switch-track::after {
  transform: translateX(14px);
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.admin-list {
  display: grid;
}
.admin-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.admin-item:first-child {
  border-top: 0;
}
.admin-item > img {
  width: 56px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-sand);
}
.admin-item.is-hidden > img,
.admin-item.is-hidden .admin-item-main strong {
  opacity: 0.45;
}
.admin-item-main {
  min-width: 0;
}
.admin-item-main strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.admin-item-main small {
  display: block;
  margin-top: 2px;
}
.admin-item-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
}
.admin-item-actions {
  display: grid;
  gap: 6px;
}
.admin-item-actions button {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
}
.order-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.row > div {
  min-width: 0;
}
.row p {
  margin: 4px 0;
}
.order-status {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}
.order-comment {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-sand-soft);
  font-style: italic;
}
.uploads-dialog {
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100dvh - 48px);
  border-radius: 24px;
}
.uploads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding: 18px 20px 24px;
}
.upload-tile {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  text-align: left;
  font-size: 11px;
  color: var(--text-muted);
}
.upload-tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  background: var(--bg-sand);
  transition: box-shadow 160ms ease;
}
.upload-tile:hover img {
  box-shadow: 0 0 0 3px var(--bg-olive);
}

.hint {
  display: block;
  margin: -4px 0 4px 56px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-muted);
}
label > .hint,
.actions + .hint,
.list-hint {
  margin-left: 0;
}
.actions + .hint {
  margin-top: 8px;
}
.list-hint {
  margin: 0 0 8px;
}
.admin-guide {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.9);
}
.admin-guide summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.admin-guide summary::-webkit-details-marker {
  display: none;
}
.admin-guide summary::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 200ms var(--ease-out);
}
.admin-guide[open] summary::before {
  transform: rotate(45deg);
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 28px;
  padding: 0 22px 22px;
}
.guide-grid h3 {
  margin: 12px 0 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}
.guide-grid ol,
.guide-grid ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: #4b4842;
}
.guide-grid li + li {
  margin-top: 4px;
}
@media (max-width: 1100px) {
  .guide-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .admin-guide summary {
    font-size: 20px;
    padding: 0 18px;
  }
  .guide-grid {
    padding: 0 18px 18px;
  }
}

/* ------------------------------------------------------------ footer */
.shop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 28px;
  padding: 28px max(24px, calc((100vw - 1332px) / 2));
  background: #e9e5db;
  font-size: 13px;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: 0.28em;
}
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.social-telegram {
  background: #1677b3;
}
.social-max {
  background: linear-gradient(140deg, #2f5fe0, #5b47e8 55%, #8a33e0);
}
.social-whatsapp {
  background: #1d7d45;
}
.social:hover {
  filter: brightness(1.06);
}
.footer-meta {
  display: flex;
  gap: 18px;
  color: var(--text-muted);
}
#toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  display: none;
  z-index: 120;
  max-width: min(90vw, 420px);
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(28, 27, 25, 0.25);
}
#toast.show {
  display: block;
  animation: toast-in 300ms var(--ease-out);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  main {
    padding: 28px 16px 96px;
  }
  .chips {
    top: 72px;
    margin: 0 -16px;
    padding: 10px 16px;
    scroll-padding-inline: 16px;
  }
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 12px;
  }
  .card-photo {
    border-radius: 16px;
  }
  .card-title {
    font-size: 13.5px;
  }
  .price-line strong {
    font-size: 15px;
  }
  .card-add {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .card-add span {
    display: none;
  }
  .field-search,
  .field-sort,
  .field-price {
    flex: 1 1 100%;
  }
  .sheet {
    width: 100vw;
    height: auto;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 50px rgba(28, 31, 24, 0.2);
  }
  .sheet[open] {
    animation-name: sheet-up;
  }
  @keyframes sheet-up {
    from {
      transform: translateY(48px);
      opacity: 0;
    }
  }
  .sheet-head {
    padding: 14px 12px 12px 20px;
  }
  .sheet-head h2 {
    font-size: 26px;
  }
  .sheet-body {
    padding: 4px 20px calc(24px + env(safe-area-inset-bottom));
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  #detail-content {
    grid-template-columns: 1fr;
  }
  .detail-photo img {
    max-height: 56dvh;
  }
  .detail-info {
    padding: 22px 20px 24px;
  }
  .panel {
    padding: 18px;
  }
  .admin-bar {
    top: 72px;
    margin: 0 -16px 16px;
    padding: 8px 16px;
  }
  .admin-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .admin-item > img {
    width: 48px;
    height: 60px;
  }
  .admin-item-actions {
    grid-column: 2;
    display: flex;
  }
  .discount-grid {
    grid-template-columns: 1fr;
  }
  .row {
    flex-direction: column;
  }
  .row > button {
    width: 100%;
  }
  .shop-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 90px;
  }
  #toast {
    bottom: 80px;
  }
}
@media (max-width: 380px) {
  .zones {
    grid-template-columns: 1fr;
  }
  .photo-field {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* Shared VΛΖΛ header: kept in lockstep with the homepage header. */
.market .container{width:100%;max-width:1380px;margin:0 auto;padding:0 24px}
.market .top-bar{background:var(--bg-sand);border-bottom:1px solid var(--border-subtle);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-dark);padding:8px 0;font-weight:500}
.market .top-bar .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
.market .top-bar-left,.market .top-bar-right{display:flex;align-items:center;gap:16px}
.market .top-bar-badge{display:inline-flex;align-items:center;gap:6px}
.market .top-bar a{display:inline-flex;align-items:center;gap:4px;font-weight:600}
.market .meta-parakeet-icon{width:16px;height:16px;object-fit:contain;vertical-align:-2px;margin-right:4px}
.market .site-header{position:sticky;top:0;z-index:100;background:rgba(248,245,240,.96);backdrop-filter:blur(12px);border-bottom:1px solid var(--border-subtle);height:80px;display:flex;align-items:center}
.market .header-inner{display:flex;align-items:center;justify-content:space-between;width:100%}
.market .logo{flex:0 0 auto;white-space:nowrap;font-family:var(--font-serif);font-size:38px;font-weight:500;letter-spacing:.32em;text-transform:uppercase;color:var(--text-dark);line-height:1;display:inline-block;user-select:none}
.market .brand-name{display:inline-block;white-space:nowrap;letter-spacing:.11em;font-kerning:normal}
.market .main-nav{display:flex;align-items:center;gap:28px}
.market .nav-link{font-size:13px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--text-dark);position:relative;padding:6px 0}
.market .nav-link::after{content:'';position:absolute;bottom:0;left:0;width:0;height:1.5px;background:var(--bg-olive);transition:all .3s}
.market .nav-link:hover::after,.market .nav-link.active::after{width:100%}
.market .header-actions{display:flex;align-items:center;gap:20px}
.market .city-selector{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;letter-spacing:.05em;color:var(--text-dark);padding:6px 12px;border-radius:9999px;background:var(--bg-sand);cursor:pointer}
.market .city-selector .meta-parakeet-icon{width:18px;height:18px}
.market .action-icon-btn{position:relative;width:40px;height:40px;min-height:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:var(--text-dark);transition:all .3s;border:0;padding:0;background:transparent}
.market .action-icon-btn:hover{background:var(--bg-sand)}
.market .parakeet-icon{width:22px;height:22px;object-fit:contain;vertical-align:middle;transition:all .3s}
.market .action-icon-btn:hover .parakeet-icon{transform:scale(1.1)}
.market .badge-count{position:absolute;top:4px;right:4px;background:var(--bg-olive);color:#fff;font-size:10px;font-weight:700;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;line-height:1}
.market .mobile-toggle{display:none;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:0;background:transparent}
@media(max-width:992px){.market .main-nav{display:none}.market .mobile-toggle{display:flex}.market .main-nav.is-open{display:flex;position:absolute;top:100%;left:0;right:0;background:#faf7f2;padding:20px 24px;flex-direction:column;align-items:flex-start;gap:14px;z-index:50;box-shadow:0 12px 20px #0002}.market .site-header .container{position:relative}}
@media(max-width:600px){.market .container{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}.market .top-bar{padding:6px 0;font-size:11px;letter-spacing:.04em}.market .top-bar .container{display:block;overflow:hidden}.market .top-bar-left{flex-wrap:nowrap;gap:6px;min-width:0;overflow:hidden}.market .top-bar-left>span{white-space:nowrap}.market .top-bar-left>span:nth-child(-n+2),.market .top-bar-right{display:none}.market .site-header{height:auto;min-height:72px}.market .header-inner{position:relative;min-width:0;gap:8px}.market .logo{flex:0 0 auto;white-space:nowrap;font-size:29px;letter-spacing:.2em}.market .brand-name{letter-spacing:.08em}.market .header-actions{min-width:0;margin-left:auto;gap:4px}.market .city-selector{display:flex;min-width:0;gap:4px;padding:5px 8px;font-size:11px;letter-spacing:.02em}.market .city-selector .meta-parakeet-icon{width:16px!important;height:16px!important;margin-right:0}.market .action-icon-btn{width:36px;height:44px;min-width:36px}.market .action-icon-btn .parakeet-icon{width:20px;height:20px}.market .mobile-toggle{display:flex;flex:0 0 auto;width:auto;height:44px;min-width:44px;min-height:44px;padding:0 3px;font-size:12px}}
@media(max-width:359px){.market .city-selector{display:none}.market .logo{font-size:27px;letter-spacing:.16em}.market .header-actions{gap:2px}}
@media(max-width:767px){body.market{background-image:url("/assets/floral-background-mobile.svg"),radial-gradient(circle at 1px 1px,rgba(137,159,119,.15) 0 1px,transparent 1.4px),radial-gradient(circle at 14px 19px,rgba(137,159,119,.09) 0 .8px,transparent 1.2px);background-position:center top,0 0,7px 5px;background-repeat:repeat-y,repeat,repeat;background-size:100% auto,26px 26px,39px 39px}}
.market .logo{--logo-gap:.32em;letter-spacing:0}.market .brand-name{--logo-gap:.11em;letter-spacing:0}.footer-logo{--logo-gap:.28em;letter-spacing:0}
@media(max-width:600px){.market .logo{--logo-gap:.2em}}
@media(max-width:359px){.market .logo{--logo-gap:.16em}}
.market .header-inner{gap:24px}
@media(min-width:993px) and (max-width:1240px){.market .main-nav{gap:20px}.market .main-nav .nav-link{letter-spacing:.08em}.market .header-actions .city-selector{display:none}}
