@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans Cyrillic';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root,
html[data-theme="dark"] {
  --font-main: 'DM Sans', 'DM Sans Cyrillic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg: #080808;
  --bg-elevated: #111111;
  --bg-subtle: #191919;
  --bg-media: #131313;
  --fg: #ffffff;
  --fg-secondary: #d0d0d0;
  --fg-muted: #808080;
  --border: #242424;
  --border-strong: #454545;
  --accent-bg: #ffffff;
  --accent-fg: #000000;
  --backdrop: rgba(0, 0, 0, 0.78);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.68);
}

html[data-theme="light"] {
  --font-main: 'DM Sans', 'DM Sans Cyrillic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg: #ffffff;
  --bg-elevated: #fafafa;
  --bg-subtle: #f1f1f1;
  --bg-media: #f3f3f3;
  --fg: #0a0a0a;
  --fg-secondary: #2e2e2e;
  --fg-muted: #737373;
  --border: #e5e5e5;
  --border-strong: #b8b8b8;
  --accent-bg: #0a0a0a;
  --accent-fg: #ffffff;
  --backdrop: rgba(0, 0, 0, 0.52);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button,
input,
textarea,
select {
  font-family: var(--font-main);
}

.hidden {
  display: none !important;
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  position: relative;
}

.content-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 14px;
}

@media (min-width: 768px) {
  .content-container {
    padding: 0 24px;
  }
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 54px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (min-width: 768px) {
  .topbar-inner {
    height: 60px;
    padding: 0 24px;
  }
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.brand-logo {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  display: block;
}

@media (min-width: 768px) {
  .brand-logo {
    width: 26px;
    height: 26px;
    max-width: 26px;
    max-height: 26px;
    border-radius: 6px;
  }
}

.brand-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .brand-name {
    font-size: 17px;
  }
}

.age-badge {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--fg-muted);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.tg-channel-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 2px;
  transition: transform 0.14s ease, border-color 0.15s ease;
}

@media (min-width: 768px) {
  .tg-channel-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
}

.tg-channel-btn:hover {
  border-color: #23a5e8;
}

.tg-channel-btn:active {
  transform: scale(0.93);
}

.tg-channel-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: none !important;
  opacity: 1 !important;
}

@media (max-width: 390px) {
  .brand-name {
    font-size: 13.5px;
  }
  .brand {
    gap: 6px;
  }
  .brand-row {
    gap: 5px;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-cart-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--accent-bg);
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.header-cart-btn:active {
  transform: scale(0.96);
}

@media (max-width: 440px) {
  .header-cart-btn span:first-child {
    display: none;
  }
  .header-cart-btn {
    padding: 0 10px;
  }
}

.header-cart-count {
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-fg);
  color: var(--accent-bg);
  font-size: 11px;
  font-weight: 800;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .icon-btn:hover,
  .admin-trigger-btn:hover,
  .cat-tab:hover,
  .chip-choice:hover,
  .flavor-pill:hover {
    border-color: var(--border-strong);
  }
}

.icon-btn:active {
  transform: scale(0.94);
}

.admin-trigger-btn {
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-trigger-btn.is-active {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

/* Sticky Category Bar — Strict Sequence */
.categories-wrap {
  position: sticky;
  top: 54px;
  z-index: 25;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .categories-wrap {
    top: 60px;
  }
}

.categories-bar {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (min-width: 768px) {
  .categories-bar {
    padding: 12px 24px;
    gap: 10px;
  }
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

@media (min-width: 768px) {
  .cat-tab {
    height: 38px;
    padding: 0 18px;
    font-size: 14px;
  }
}

.cat-tab:active {
  transform: scale(0.96);
}

.cat-tab.active {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

/* Catalog Meta Line */
.catalog-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 0 10px;
}

.catalog-category-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
}

/* Responsive Product Grid: 2 cols Phone -> 3 cols Tablet -> 4 cols PC */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 20px;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 980px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.14s ease;
}

@media (hover: hover) {
  .product-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
  }
}

.product-card:active {
  transform: scale(0.985);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--bg-media);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bw-photo {
  filter: none !important;
}

.card-svg-art {
  width: 70%;
  height: 70%;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-svg-art svg {
  width: 100%;
  height: 100%;
}

.card-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  justify-content: space-between;
}

.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.32;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.price-current {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 800;
  color: var(--fg);
}

.price-old {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: line-through;
}

.card-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--accent-bg);
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.card-add-btn:active {
  transform: scale(0.9);
}

.card-add-btn.in-cart {
  width: auto;
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  padding: 48px 16px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--fg-muted);
  font-size: 13px;
}

/* Floating Bottom Cart */
.floating-cart {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 28px);
  max-width: 460px;
  height: 54px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: var(--accent-bg);
  color: var(--accent-fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 40;
  user-select: none;
  transition: transform 0.15s ease;
}

.floating-cart:active {
  transform: translateX(-50%) scale(0.985);
}

.floating-cart-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.floating-cart-badge {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--accent-fg);
  color: var(--accent-bg);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-cart-label {
  font-weight: 700;
  font-size: 14px;
}

.floating-cart-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floating-cart-total {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 15px;
}

.floating-cart-arrow {
  font-size: 13px;
  font-weight: 700;
}

/* Modals: Bottom Sheet on Phone -> Centered Dialog on PC */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--backdrop);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.16s ease;
}

@media (min-width: 720px) {
  .sheet-backdrop {
    align-items: center;
    padding: 24px;
  }
}

.sheet-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg);
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@media (min-width: 720px) {
  .sheet-card {
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
  }
  .product-sheet-card {
    max-width: 780px;
  }
  .cart-sheet-card {
    max-width: 540px;
  }
}

.compact-sheet {
  max-width: 400px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(28px); opacity: 0.65; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sheet-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.sheet-close-inline {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  cursor: pointer;
}

/* Opened Product Card Layout (1 col Phone, 2-col split on PC) */
.modal-product-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 720px) {
  .modal-product-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
  }
}

.modal-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 13;
  background: var(--bg-media);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 720px) {
  .modal-card-media {
    aspect-ratio: 1 / 1;
  }
}

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

.modal-card-media .card-svg-art {
  width: 60%;
  height: 60%;
}

.modal-product-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modal-cat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.modal-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  padding-right: 28px;
}

.modal-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.52;
  color: var(--fg-secondary);
}

.flavors-section {
  margin-bottom: 18px;
}

.flavors-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.flavors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.flavor-pill {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.flavor-pill.active {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

.modal-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.modal-price-big {
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 800;
}

/* Cart Items */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 36dvh;
  overflow-y: auto;
}

.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.cart-row-info {
  min-width: 0;
  flex: 1;
}

.cart-row-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-row-sub {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.cart-qty-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 3px 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.qty-val {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.cart-summary-row strong {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 800;
}

/* Admin Panel (Responsive PC + Phone) */
.admin-view {
  padding: 16px 0 32px;
}

.admin-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
}

.admin-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-header-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 520px;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elevated);
}

.admin-tab {
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.admin-tab.active {
  background: var(--accent-bg);
  color: var(--accent-fg);
}

.tab-count {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  opacity: 0.85;
}

/* Admin Create Layout: Stacked on Phone, 2-Column on PC */
.admin-create-layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 18px;
}

@media (min-width: 860px) {
  .admin-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: start;
  }
}

.live-preview-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-elevated);
}

@media (min-width: 860px) {
  .live-preview-box {
    position: sticky;
    top: 84px;
  }
}

.live-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.live-preview-stage {
  max-width: 230px;
  margin: 0 auto;
}

.preview-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
}

/* Forms & Buttons */
.mono-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.mono-input,
.mono-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.mono-input:focus,
.mono-textarea:focus {
  border-color: var(--fg);
}

.pin-input {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.pin-hint {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 4px;
}

.pin-hint code {
  font-family: var(--font-main);
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-choice {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chip-choice.active {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--fg);
}

.mt-xs {
  margin-top: 4px;
}

.upload-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.upload-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px dashed var(--border-strong);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.upload-controls .mono-input {
  flex: 1;
  min-width: 160px;
}

.publish-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

@media (min-width: 600px) {
  .publish-actions {
    flex-direction: row;
  }
}

.solid-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--accent-bg);
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.solid-btn:active {
  transform: scale(0.985);
}

.solid-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ghost-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.solid-btn.sm,
.ghost-btn.sm {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
}

.full-width {
  width: 100%;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.error-line {
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--fg);
  border-radius: 8px;
}

/* Admin Products & Orders Lists */
.admin-filter-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.admin-filter-strip::-webkit-scrollbar {
  display: none;
}

.admin-products-list,
.admin-orders-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 860px) {
  .admin-products-list,
  .admin-orders-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.admin-prod-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.admin-prod-row.is-draft {
  border-style: dashed;
}

.admin-prod-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-prod-thumb {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-media);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.admin-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-prod-thumb .card-svg-art {
  width: 72%;
  height: 72%;
}

.admin-prod-info {
  flex: 1;
  min-width: 0;
}

.admin-prod-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-prod-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--fg-muted);
}

.status-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pill.pub {
  background: var(--accent-bg);
  color: var(--accent-fg);
}

.status-pill.draft {
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
}

.admin-prod-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.admin-prod-actions-left,
.admin-prod-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Admin Orders */
.order-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-card.done {
  opacity: 0.62;
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 13px;
}

.order-items {
  font-size: 13px;
  color: var(--fg-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

/* SPb Metro Station Picker & 30-min Time Slots in Cart */
.metro-selected-btn {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease;
}

.metro-selected-btn.has-station {
  border-color: var(--fg);
}

.metro-selected-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metro-badges-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.metro-toggle-action {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

.metro-selected-btn.has-station .metro-toggle-action {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

.metro-picker-panel {
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metro-search-input {
  padding: 8px 11px;
  font-size: 13px;
  background: var(--bg);
}

.metro-filter-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.metro-filter-pills::-webkit-scrollbar {
  display: none;
}

.metro-filter-chip {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.metro-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.metro-filter-dot[data-line="М1"],
.metro-line-badge[data-line="М1"] {
  background: #D6083B;
}

.metro-filter-dot[data-line="М2"],
.metro-line-badge[data-line="М2"] {
  background: #0078C9;
}

.metro-filter-dot[data-line="М3"],
.metro-line-badge[data-line="М3"] {
  background: #009A49;
}

.metro-filter-dot[data-line="М4"],
.metro-line-badge[data-line="М4"] {
  background: #EA7125;
}

.metro-filter-dot[data-line="М5"],
.metro-line-badge[data-line="М5"] {
  background: #6E0A78;
}

.metro-filter-dot[data-line="М6"],
.metro-line-badge[data-line="М6"] {
  background: #8C5646;
}

.metro-filter-chip.active {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

.metro-filter-chip[data-metro-filter="М1"].active {
  background: #D6083B;
  color: #ffffff;
  border-color: #D6083B;
}
.metro-filter-chip[data-metro-filter="М2"].active {
  background: #0078C9;
  color: #ffffff;
  border-color: #0078C9;
}
.metro-filter-chip[data-metro-filter="М3"].active {
  background: #009A49;
  color: #ffffff;
  border-color: #009A49;
}
.metro-filter-chip[data-metro-filter="М4"].active {
  background: #EA7125;
  color: #ffffff;
  border-color: #EA7125;
}
.metro-filter-chip[data-metro-filter="М5"].active {
  background: #6E0A78;
  color: #ffffff;
  border-color: #6E0A78;
}
.metro-filter-chip[data-metro-filter="М6"].active {
  background: #8C5646;
  color: #ffffff;
  border-color: #8C5646;
}

.metro-stations-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 205px;
  overflow-y: auto;
  padding-right: 2px;
}

.metro-station-row {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

@media (hover: hover) {
  .metro-station-row:hover {
    border-color: var(--border-strong);
  }
}

.metro-station-row.active {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

.metro-station-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.metro-line-badge {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  line-height: 1.2;
}

.metro-station-row.active .metro-line-badge {
  border-color: rgba(0, 0, 0, 0.25);
}

.metro-station-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metro-fee-tag {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.85;
}

/* 30-Minute Time Slots Grid (15:00 - 22:00) */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

@media (max-width: 360px) {
  .time-slots-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.time-slot-btn {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

@media (hover: hover) {
  .time-slot-btn:hover {
    border-color: var(--border-strong);
  }
}

.time-slot-btn.active {
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-color: var(--accent-bg);
}

/* Cart Price Breakdown */
.cart-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.cart-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--fg-secondary);
  font-variant-numeric: tabular-nums;
}

.cart-breakdown .cart-summary-row {
  padding: 8px 0 2px;
  margin-top: 2px;
}

/* Admin Surcharge Bar & Order Delivery Line */
.surcharge-setting-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elevated);
}

.surcharge-setting-label {
  font-size: 13px;
  font-weight: 700;
}

.surcharge-setting-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-input {
  width: 90px;
  height: 32px;
  padding: 4px 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.order-delivery-meta {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

/* Toast */
.mono-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  pointer-events: none;
}
