* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #151515;
  background: #f6f3ee;
}

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

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

.menu-body {
  background: #f7f3ec;
}

.hero {
  min-height: 280px;
  background: linear-gradient(145deg, #111, #2a2118);
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  align-items: end;
  border-radius: 0 0 34px 34px;
  overflow: hidden;
}

.hero-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 46px 18px 34px;
}

.eyebrow {
  color: var(--accent, #d7b56d);
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(34px, 8vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.category-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 16px;
  background: rgba(247, 243, 236, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #2d2a25;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  font-weight: 800;
  text-transform: uppercase;
}

.tab.active,
.tab:hover {
  background: var(--theme, #111);
  color: white;
  border-color: var(--theme, #111);
}

.menu-wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 16px 16px 60px;
}

.category-section {
  scroll-margin-top: 82px;
  padding-top: 20px;
}

.section-head {
  margin: 18px 0;
}

/* ↓ убран clamp — мобильный медиазапрос теперь победит */
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 6px 0 0;
  color: #6e665b;
}

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

.menu-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 14px 40px rgba(43, 33, 20, 0.08);
  display: flex;
  min-height: 190px;
}

.dish-image,
.image-placeholder {
  width: 180px;
  min-width: 180px;
  object-fit: cover;
  background: linear-gradient(145deg, #eee5d8, #faf7ef);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}

.card-content {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

/* ↓ убран font-size отсюда — теперь только десктопное значение */
.card-top h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.price-block {
  text-align: right;
  white-space: nowrap;
}

.price-block strong {
  font-size: 20px;
}

.old-price {
  display: block;
  color: #a9a095;
  text-decoration: line-through;
  font-size: 13px;
}

.mobile-price {
  display: none;
}

.desc {
  margin: 0 0 14px;
  color: #686057;
  font-size: 15px;
  line-height: 1.45;
  max-height: 86px;
  overflow: hidden;
  position: relative;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  color: #82786e;
  font-size: 13px;
}

.pill {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f4efe6;
  color: #655c50;
  font-weight: 800;
}

.pill.accent {
  background: #fff1d8;
  color: #6b3b00;
}

.allergens {
  margin-top: 10px;
  font-size: 12px;
  color: #93887d;
}

.like-btn {
  display: none;
}

.footer {
  text-align: center;
  color: #8d8378;
  padding: 24px 16px 44px;
}

/* ADMIN */

.admin-body {
  background: #f4f4f5;
  color: #171717;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.login-card {
  width: min(420px, 100%);
  background: white;
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.12);
}

.login-card h1 {
  margin: 8px 0 22px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: #333;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 12px 13px;
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.btn {
  border: 0;
  background: #ececec;
  color: #111;
  border-radius: 14px;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  background: #111;
  color: white;
}

.btn.danger {
  background: #fee2e2;
  color: #991b1b;
}

.alert {
  padding: 13px 15px;
  border-radius: 16px;
  margin: 0 0 16px;
  font-weight: 700;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #e8e8e8;
}

.admin-topbar span {
  display: block;
  color: #737373;
  font-size: 13px;
  margin-top: 3px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions form {
  margin: 0;
}

.admin-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px 16px 60px;
}

.panel {
  background: white;
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
}

.panel h2 {
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.grid-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

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

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  align-self: center;
}

.check input {
  width: auto;
}

.admin-list,
.items-admin-list {
  display: grid;
  gap: 12px;
}

.row-card {
  display: grid;
  grid-template-columns: 1fr 1.3fr 100px 130px auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 18px;
  background: #fafafa;
}

.item-edit-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 20px;
  background: #fafafa;
}

.thumb {
  width: 110px;
  height: 110px;
  border-radius: 18px;
  background: #eee;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 34px;
}

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

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

.card-actions {
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-preview {
  width: 100%;
  max-width: 420px;
  height: 180px;
  margin: 8px 0 10px;
  border-radius: 18px;
  overflow: hidden;
  background: #eee;
  border: 1px solid #ddd;
}

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

/* TABLET */

@media (max-width: 820px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .grid-form,
  .edit-grid,
  .row-card,
  .item-edit-card {
    grid-template-columns: 1fr;
  }

  .thumb {
    width: 100%;
    height: 180px;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* PHONE VIEW */

@media (max-width: 560px) {
  body.menu-body {
    background: #0d0d0e;
    color: #f4f4f4;
  }

  .hero {
    display: none;
  }

  .category-tabs {
    top: 0;
    padding: calc(env(safe-area-inset-top) + 12px) 18px 9px;
    gap: 18px;
    background: rgba(13, 13, 14, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  }

  .tab {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #77777b;
    font-size: 13px;
    line-height: 1;
    letter-spacing: -0.01em;
    font-weight: 800;
    text-transform: uppercase;
  }

  .tab.active,
  .tab:hover {
    background: transparent;
    color: var(--accent, #ff9f2d);
  }

  .menu-wrap {
    width: 100%;
    padding: 10px 18px 34px;
  }

  .category-section {
    padding-top: 20px;
    scroll-margin-top: 68px;
  }

  .section-head {
    margin: 0 0 8px;
    padding-bottom: 11px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  }

  /* ↓ font-size с !important перебивает clamp из базовых стилей */
  .section-head h2 {
    color: var(--accent, #ff9f2d);
    text-transform: uppercase;
    font-size: 18px !important;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.03em;
  }

  .section-head p {
    color: #8c8c8f;
    font-size: 11px;
  }

  .cards-grid {
    gap: 0;
  }

  .menu-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 126px;
    gap: 14px;
    min-height: 0;
    padding: 12px 8px 13px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.13);
  }

  .card-content {
    min-width: 0;
    padding: 0;
    display: block;
  }

  .card-top {
    display: block;
  }

  /* ↓ !important перебивает .card-top h3 { font-size: 21px } из базовых стилей */
  .card-top h3 {
    margin: 0 0 4px;
    color: #f6f6f6;
    font-size: 14.5px !important;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .desktop-price {
    display: none;
  }

  .mobile-price {
    display: block;
    text-align: left;
    margin: 0 0 5px;
  }

  .mobile-price strong {
    color: var(--accent, #ff9f2d);
    font-size: 13.5px;
    line-height: 1;
    font-weight: 800;
  }

  .old-price {
    color: #777;
    font-size: 10.5px;
  }

  /* ↓ !important перебивает .desc { font-size: 15px } из базовых стилей */
  .desc {
    margin: 0 0 7px;
    color: #c8c8c8;
    font-size: 12.5px !important;
    line-height: 1.36;
    max-height: 52px;
    overflow: hidden;
    position: relative;
  }

  .desc:not(.is-overflow) .desc-more {
    display: none;
  }

  .desc.is-overflow::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100px;
    height: 20px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(13, 13, 14, 0), #0d0d0e 45%, #0d0d0e 100%);
  }

  .desc-more {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    border: 0;
    padding: 0 0 0 14px;
    background: transparent;
    color: #7a7a7c;
    font-size: 12.5px;
    line-height: 1.36;
    font-weight: 800;
    cursor: pointer;
  }

  .desc.expanded {
    max-height: none;
    overflow: visible;
  }

  .desc.expanded::after {
    display: none;
  }

  .dish-image,
  .image-placeholder {
    align-self: start;
    width: 126px;
    min-width: 126px;
    height: 108px;
    border-radius: 8px;
    object-fit: cover;
    background: #1a1a1b;
    font-size: 26px;
  }

  /* ↓ !important перебивает .meta-row { font-size: 13px } из базовых стилей */
  .meta-row {
    display: flex;
    gap: 5px;
    margin: 0 0 6px;
    color: #aaa;
    font-size: 11px !important;
  }

  .pill {
    padding: 0;
    background: transparent;
    color: #c73551;
    font-size: 11px;
    font-weight: 800;
  }

  .pill::before {
    content: '✺ ';
  }

  .pill.accent {
    background: transparent;
    color: #ffb340;
  }

  .new-pill {
    color: #c73551;
  }

  /* ↓ !important перебивает .allergens { font-size: 12px } из базовых стилей */
  .allergens {
    color: #777;
    margin-top: 6px;
    font-size: 10.5px !important;
  }

  .footer {
    color: #5e5e61;
    padding-bottom: 30px;
  }
}

@media (max-width: 380px) {
  .menu-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .menu-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 12px;
    padding: 11px 8px 12px 0;
  }

  .dish-image,
  .image-placeholder {
    width: 112px;
    min-width: 112px;
    height: 98px;
  }

  .card-top h3 {
    font-size: 14px !important;
  }

  .desc {
    font-size: 12px !important;
    max-height: 50px;
  }

  .desc-more {
    font-size: 12px;
  }
}

.promo-offer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 9px;
}

.promo-label {
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff2f4b, #ff7a18);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(255, 47, 75, 0.35);
}

.promo-text {
  color: #ffcc4d;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

.promo-discount .promo-label {
  background: linear-gradient(135deg, #ff3b30, #ff9500);
}

.promo-hot .promo-label {
  background: linear-gradient(135deg, #ff004c, #ff7a00);
  animation: promoPulse 1.7s ease-in-out infinite;
}

@keyframes promoPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(255, 47, 75, 0.35);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(255, 47, 75, 0.55);
  }
}

@media (max-width: 560px) {
  .promo-offer {
    gap: 5px;
    margin: 0 0 7px;
  }

  .promo-label {
    padding: 3px 7px;
    font-size: 9.5px;
  }

  .promo-text {
    font-size: 12px;
  }
}
/* ===== Admin v2 layout ===== */

.admin-body {
  margin: 0;
  background: #f4f5f7;
  color: #171717;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

.admin-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: #111214;
  color: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  padding: 12px 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d7b56d, #9f7d37);
  color: #111;
  font-size: 22px;
  margin-bottom: 12px;
}

.sidebar-name {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.sidebar-sub {
  margin-top: 4px;
  color: #a3a3a3;
  font-size: 13px;
}

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

.nav-section-label {
  margin: 16px 12px 7px;
  color: #727272;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-item,
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 13px;
  color: #d8d8d8;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-item:hover,
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-item.active {
  background: #fff;
  color: #111;
}

.nav-item-add {
  color: #f0d08a;
}

.nav-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 11px;
}

.nav-item.active .nav-badge {
  background: #ececec;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
  color: #ffb4b4;
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.flash-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 16px;
  margin-bottom: 18px;
  font-weight: 800;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.page-title {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-sub,
.panel-sub {
  margin: 6px 0 0;
  color: #777;
  font-size: 14px;
}

.panel {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid #e9e9e9;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.045);
}

.panel-promo {
  border-color: #ffd7a1;
  background: linear-gradient(180deg, #fffaf0, #fff);
}

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

.panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.panel-count {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #666;
  font-size: 12px;
  font-weight: 900;
}

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

.stat-card {
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.04);
}

.stat-label {
  color: #777;
  font-size: 13px;
  font-weight: 800;
}

.stat-value {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.form-group {
  display: grid;
  gap: 7px;
}

.form-group-sm {
  max-width: 220px;
}

.form-group-full {
  grid-column: 1 / -1;
  max-width: none;
}

.form-label {
  color: #3b3b3b;
  font-size: 13px;
  font-weight: 900;
}

.form-input,
.form-select {
  width: 100%;
  border: 1px solid #dedede;
  border-radius: 14px;
  padding: 12px 13px;
  background: #fff;
  color: #171717;
  outline: none;
  font: inherit;
}

.form-input:focus,
.form-select:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.form-textarea {
  min-height: 96px;
  resize: vertical;
}

.form-check-group {
  align-self: center;
}

.form-check,
.form-flags {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #444;
  font-size: 14px;
  font-weight: 800;
}

.form-flags {
  flex-wrap: wrap;
  align-self: center;
}

.form-check input {
  width: auto;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.form-footer-between {
  justify-content: space-between;
}

.btn {
  border: 0;
  background: #f0f0f0;
  color: #111;
  border-radius: 14px;
  padding: 11px 15px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
}

.btn:hover {
  filter: brightness(0.98);
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

.btn-sm {
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 13px;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input {
  width: 54px;
  height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.color-hint {
  color: #777;
  font-size: 13px;
  font-weight: 800;
}

.cover-preview {
  width: 100%;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  background: #eee;
  border: 1px solid #e7e7e7;
}

.cover-preview img,
.thumb-preview img,
.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-preview {
  width: 160px;
  height: 120px;
  overflow: hidden;
  border-radius: 16px;
  background: #eee;
  border: 1px solid #e7e7e7;
}

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

.item-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 18px;
  background: #fafafa;
}

.item-thumb {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: #e9e9e9;
  font-size: 26px;
}

.item-info {
  min-width: 0;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.item-name {
  font-size: 15px;
  font-weight: 950;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
  color: #777;
  font-size: 13px;
  font-weight: 700;
}

.item-price {
  color: #111;
  font-weight: 950;
}

.item-old-price {
  color: #999;
  text-decoration: line-through;
}

.item-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
}

.badge-new {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-popular {
  background: #dcfce7;
  color: #166534;
}

.badge-inactive {
  background: #eee;
  color: #666;
}

.badge-promo {
  background: #fee2e2;
  color: #b91c1c;
}

.panel-filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

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

.cat-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.5fr) 100px 140px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 18px;
  background: #fafafa;
}

.form-input-sm {
  max-width: 100px;
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: auto;
    padding: 10px;
    border-right: 0;
  }

  .sidebar-brand,
  .nav-section-label,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 38px;
  }

  .admin-main {
    padding: 18px;
  }

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

  .form-grid,
  .cat-row {
    grid-template-columns: 1fr;
  }

  .form-group-sm {
    max-width: none;
  }

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

  .item-thumb {
    width: 58px;
    height: 58px;
    border-radius: 13px;
  }

  .item-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-title {
    font-size: 28px;
  }
}

@media (max-width: 560px) {
  .admin-main {
    padding: 14px;
  }

  .panel {
    padding: 16px;
    border-radius: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
    border-radius: 18px;
  }

  .stat-value {
    font-size: 28px;
  }

  .panel-filter-row {
    flex-direction: column;
  }

  .form-footer,
  .form-footer-between {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }
}
/* ════════════════════════════════════════════════════════
   ПОДРАЗДЕЛЫ (sub-group)
════════════════════════════════════════════════════════ */

.sub-group {
  margin-bottom: 6px;
}

.sub-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 4px 11px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-bottom: 1.5px solid rgba(184, 139, 49, 0.25);
  margin-bottom: 16px;
  font-family: inherit;
  gap: 12px;
}

.sub-group-title {
  color: var(--accent, #b88b31);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-align: left;
  line-height: 1;
}

.sub-group-icon {
  flex-shrink: 0;
  color: var(--accent, #b88b31);
  transition: transform 0.3s ease;
}

.sub-group-toggle[aria-expanded='false'] .sub-group-icon {
  transform: rotate(-90deg);
}

.sub-group-list {
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Когда collapsed — height задаётся через JS */

/* ════════════════════════════════════════════════════════
   ФОТО — курсор-лупа
════════════════════════════════════════════════════════ */

.classic-image[onclick] {
  cursor: zoom-in;
}

.classic-image[onclick]:active {
  opacity: 0.92;
}

/* ════════════════════════════════════════════════════════
   LIGHTBOX
════════════════════════════════════════════════════════ */

.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    background 0.28s ease,
    backdrop-filter 0.28s ease;
  padding: 20px;
}

.lb-overlay.lb-open {
  opacity: 1;
  pointer-events: all;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
}

.lb-img {
  max-width: min(680px, 100%);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.88);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.lb-overlay.lb-open .lb-img {
  transform: scale(1);
}

.lb-close {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.18s;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ════════════════════════════════════════════════════════
   MOBILE адаптация подразделов
════════════════════════════════════════════════════════ */

@media (max-width: 560px) {
  .sub-group-toggle {
    padding: 11px 2px 9px;
    margin-bottom: 12px;
  }

  .sub-group-title {
    font-size: 16px;
  }

  .sub-group-icon {
    width: 15px;
    height: 15px;
  }

  .lb-img {
    border-radius: 10px;
  }

  .lb-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
}

/* ════════════════════════════════════════════════════════
   ADMIN — подсказка под полем
════════════════════════════════════════════════════════ */
.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--color-text-tertiary, #999);
  font-weight: 400;
  line-height: 1.4;
}
