:root {
  --ink: #162019;
  --muted: #667168;
  --paper: #fbfaf4;
  --surface: #ffffff;
  --surface-2: #f3f0e6;
  --line: #ddd8c9;
  --green: #2f6d3d;
  --green-2: #4d8a47;
  --coral: #d9583b;
  --gold: #d99d2b;
  --danger: #b9382f;
  --shadow: 0 18px 48px rgba(35, 31, 24, .12);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --max: 1220px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body.overlay-open {
  overflow: hidden;
}

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

button {
  touch-action: manipulation;
}

a {
  color: inherit;
}

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

.hide {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.credential-username {
  display: none !important;
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.top-strip {
  background: #142118;
  color: #fff8e7;
  overflow: hidden;
}

.top-strip__track {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 20px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(221, 216, 201, .82);
  background: rgba(251, 250, 244, .9);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.site-header__inner--simple {
  grid-template-columns: auto auto;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green), var(--coral));
  color: #fff;
  font-size: 19px;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(47, 109, 61, .22);
}

.brand__text {
  display: grid;
  gap: 2px;
  font-weight: 950;
  letter-spacing: .01em;
  line-height: 1.05;
}

.brand__text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.search {
  position: relative;
  min-width: 0;
}

.search span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
}

.search input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px 0 44px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.search input:focus {
  border-color: rgba(47, 109, 61, .62);
  box-shadow: 0 0 0 4px rgba(47, 109, 61, .10);
}

.site-header__actions,
.hero__actions,
.contact-actions,
.admin-form-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.btn:disabled {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: .72;
}

.btn:focus-visible,
.icon-btn:focus-visible,
.chip:focus-visible,
.category-card:focus-visible,
.product-card__title:focus-visible,
.favorite-dot:focus-visible,
.quick-nav a:focus-visible {
  outline: 3px solid rgba(47, 109, 61, .24);
  outline-offset: 2px;
}

.btn:active,
.icon-btn:active,
.chip:active,
.category-card:active,
.product-card__title:active {
  transform: scale(.98);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .category-card:hover,
  .product-card:hover,
  .news-card:hover {
    transform: translateY(-1px);
  }
}

.btn-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 26px rgba(47, 109, 61, .20);
}

.btn-secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .30);
}

.cart-button span {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .18);
  font-size: 12px;
}

.quick-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar {
  display: none;
}

.quick-nav a {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .68);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 420px;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(12, 24, 17, .78), rgba(12, 24, 17, .24)), url("https://images.unsplash.com/photo-1610832958506-aa56368176cf?auto=format&fit=crop&w=1600&q=82") center/cover;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: end;
  padding: 44px 0 26px;
}

.hero__copy {
  max-width: 760px;
  color: #fff;
}

.eyebrow,
.section-kicker {
  width: fit-content;
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .14);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.section-kicker {
  border-color: rgba(47, 109, 61, .22);
  background: rgba(47, 109, 61, .08);
  color: var(--green);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 4.9vw, 64px);
  line-height: .98;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(16px, 1.35vw, 19px);
}

.hero__actions {
  margin-top: 22px;
}

.hero-panel {
  display: grid;
  gap: 8px;
}

.hero-panel > div {
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  backdrop-filter: blur(12px);
}

.hero-panel span {
  color: #ffd37a;
  font-size: 12px;
  font-weight: 900;
}

.hero-panel b {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.hero-panel p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.35;
}

.catalog-preview,
.catalog,
.product-section,
.news,
.contacts {
  padding: 44px 0 0;
}

.section-head,
.catalog-toolbar,
.admin-head,
.admin-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.section-head h2,
.catalog-toolbar h2,
.contacts h2,
.admin-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
}

.section-head p,
.admin-head p,
.contacts p {
  margin: 8px 0 0;
  color: var(--muted);
}

.notice {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.category-card {
  min-height: 170px;
  position: relative;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 160ms var(--ease-out);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 13, .04), rgba(10, 20, 13, .80));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card span,
.category-card b,
.category-card small {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 20px;
  font-weight: 950;
}

.category-card b {
  margin-top: 4px;
  color: #ffe29a;
}

.category-card small {
  margin-top: 8px;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
}

.catalog-toolbar {
  align-items: center;
}

.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

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

.chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
  transition: transform 150ms var(--ease-out), background 150ms var(--ease-out), color 150ms var(--ease-out);
}

.chip.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

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

.horizontal-products {
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  grid-template-columns: none;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.product-card,
.news-card,
.admin-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(35, 31, 24, .06);
}

.product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}

.product-card__image {
  position: relative;
  aspect-ratio: 1 / .78;
  background: var(--surface-2);
}

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

.favorite-dot {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: var(--green);
  font-size: 20px;
  cursor: pointer;
}

.badge,
.discount {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.product-card .badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: #fff;
  color: var(--green);
}

.discount {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: var(--coral);
  color: #fff;
}

.product-card__body {
  flex: 1;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.product-card__title {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.product-card p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-end;
  margin-top: auto;
}

.price {
  font-size: 22px;
  font-weight: 950;
}

.old-price {
  margin-left: 7px;
  color: #9d9485;
  text-decoration: line-through;
  font-size: 13px;
}

.unit {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.add-btn {
  width: 100%;
}

.info-band {
  margin-top: 50px;
  padding: 54px 0;
  background: #172018;
  color: #fff;
}

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

.info-band article {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, .06);
}

.info-band span,
.news-card span {
  color: #f0bd51;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.info-band h2 {
  margin: 10px 0;
  font-size: 24px;
  line-height: 1.08;
}

.info-band p {
  margin: 0;
  color: rgba(255, 255, 255, .76);
}

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

.news-card {
  padding: 20px;
  transition: transform 160ms var(--ease-out);
}

.news-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.news-card p {
  margin: 0;
  color: var(--muted);
}

.contacts {
  margin-bottom: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.contacts p {
  max-width: 740px;
}

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer__inner {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--green);
  font-weight: 850;
  text-decoration: none;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.static-page {
  padding: 46px 0 70px;
}

.static-hero {
  max-width: 920px;
  padding: 42px 0 26px;
}

.static-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(36px, 6vw, 62px);
  line-height: .98;
}

.static-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

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

.content-card,
.legal-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(35, 31, 24, .06);
}

.content-card {
  padding: 22px;
}

.content-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.content-card h2 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.08;
}

.content-card p,
.legal-text p {
  margin: 0;
  color: var(--muted);
}

.content-card a,
.legal-text a {
  color: var(--green);
  text-decoration: none;
}

.legal-text {
  max-width: 920px;
  padding: 28px;
}

.legal-text h2 {
  margin: 26px 0 8px;
  font-size: 24px;
}

.legal-text h2:first-child {
  margin-top: 0;
}

.not-found {
  min-height: 100dvh;
  padding: 42px 0;
  display: grid;
  align-content: center;
  gap: 26px;
}

.not-found h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 76px);
  line-height: .96;
}

.not-found p:not(.section-kicker) {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, .62);
  color: var(--muted);
}

.product-empty {
  grid-column: 1 / -1;
}

.cart-drawer,
.quick-view,
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out);
}

.cart-drawer.is-open,
.quick-view.is-open,
.admin-modal:not(.hide) {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer__shade,
.quick-view__shade,
.admin-modal__shade {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 22, 18, .52);
  cursor: pointer;
}

.cart,
.quick-view__card,
.admin-modal__card {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(460px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: -20px 0 50px rgba(0, 0, 0, .18);
  transform: translateX(100%);
  transition: transform 220ms var(--ease-out);
}

.cart-drawer.is-open .cart,
.quick-view.is-open .quick-view__card,
.admin-modal:not(.hide) .admin-modal__card {
  transform: translateX(0);
}

.cart__head,
.cart__foot {
  padding: 18px;
  background: #fff;
}

.cart__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.cart__head b {
  font-size: 24px;
}

.cart__head div div {
  color: var(--muted);
  font-size: 13px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform 150ms var(--ease-out);
}

.cart__items {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.cart-item img {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}

.cart-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.qty {
  display: grid;
  grid-template-columns: 34px 30px 34px;
  align-items: center;
  justify-items: center;
}

.qty button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background 120ms var(--ease-out);
}

.qty button:active {
  transform: scale(.96);
}

.cart__foot {
  border-top: 1px solid var(--line);
}

.cart-total {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.cart-total b {
  font-size: 24px;
}

.form {
  display: grid;
  gap: 10px;
}

.form input,
.form textarea,
.form-input,
.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.form textarea,
.admin-field textarea {
  min-height: 92px;
  resize: vertical;
}

.form-note {
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.form-note:not(:empty) {
  padding: 10px 12px;
}

.form-note.is-ok {
  border-color: rgba(47, 109, 61, .18);
  background: rgba(47, 109, 61, .08);
  color: var(--green);
}

.form-note.is-warning {
  border-color: rgba(217, 157, 43, .28);
  background: rgba(217, 157, 43, .10);
  color: #855b13;
}

.form-note.is-error {
  border-color: rgba(185, 56, 47, .24);
  background: rgba(185, 56, 47, .08);
  color: var(--danger);
}

.form input:focus,
.form textarea:focus,
.form-input:focus,
.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  border-color: rgba(47, 109, 61, .62);
  box-shadow: 0 0 0 4px rgba(47, 109, 61, .10);
}

.quick-view__card {
  width: min(760px, 100vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr);
  align-items: stretch;
}

.quick-view__card img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.quick-view__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.quick-view__body .badge {
  width: fit-content;
  background: rgba(47, 109, 61, .10);
  color: var(--green);
}

.quick-view__body h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.03;
}

.quick-view__body p {
  margin: 0;
  color: var(--muted);
}

.quick-view__close,
.admin-modal__close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 200;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 800;
  transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out);
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Admin */
.admin-body {
  background: #f5f2ea;
}

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(420px, 100%);
  padding: 24px;
  display: grid;
  gap: 18px;
}

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

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  padding: 20px;
  background: #fff;
}

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

.admin-nav button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 850;
  cursor: pointer;
}

.admin-nav button.is-active {
  background: rgba(47, 109, 61, .10);
  color: var(--green);
}

.admin-logout {
  margin-top: auto;
}

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

.admin-head {
  align-items: center;
}

.admin-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-head h1 {
  font-size: 38px;
}

.admin-head p {
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.launch-card {
  margin-bottom: 16px;
}

.launch-card .admin-card-head {
  gap: 16px;
}

.launch-card .admin-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.launch-score {
  min-width: 72px;
  min-height: 38px;
  border: 1px solid rgba(217, 157, 43, .42);
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 157, 43, .12);
  color: #855b13;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.launch-score.is-ready {
  border-color: rgba(47, 109, 61, .30);
  background: rgba(47, 109, 61, .10);
  color: var(--green);
}

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

.launch-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, .72);
}

.launch-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 157, 43, .14);
}

.launch-item.is-ok .launch-mark {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 109, 61, .13);
}

.launch-item b,
.launch-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-item b {
  font-size: 14px;
}

.launch-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.btn-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.admin-card {
  padding: 18px;
}

.admin-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.admin-bulk-bar {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  background: rgba(255, 255, 255, .62);
}

.admin-actions-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.admin-search {
  display: grid;
  gap: 6px;
  min-width: min(420px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.admin-search input,
.admin-filter select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.admin-filter {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.admin-result-note {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, .64);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

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

.diagnostic-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(35, 31, 24, .06);
}

.diagnostic-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.diagnostic-card b {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 24px;
}

.diagnostic-card.is-warning b {
  color: var(--danger);
}

.diagnostic-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.event-list {
  display: grid;
  gap: 8px;
}

.event-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, .68);
}

.event-row span,
.event-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.admin-search input:focus,
.admin-filter select:focus {
  border-color: rgba(47, 109, 61, .62);
  box-shadow: 0 0 0 4px rgba(47, 109, 61, .10);
}

.admin-card-head h2 {
  margin: 0;
}

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

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

.admin-field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.admin-field small {
  color: var(--muted);
  font-weight: 600;
}

.admin-field-wide {
  grid-column: span 2;
}

.admin-field-action {
  align-self: end;
}

.admin-check {
  align-self: end;
}

.admin-check span {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.admin-check input {
  width: 18px;
  min-height: 18px;
}

.file-input {
  width: 100%;
  min-height: 42px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.file-input::file-selector-button {
  min-height: 28px;
  border: 0;
  border-radius: 7px;
  margin-right: 10px;
  padding: 6px 10px;
  background: rgba(47, 109, 61, .10);
  color: var(--green);
  font-weight: 900;
  cursor: pointer;
}

.admin-product-row,
.admin-category-row,
.admin-news-row,
.admin-order-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: #fff;
}

.admin-product-row {
  grid-template-columns: 34px 84px minmax(0, 1fr) auto;
}

.admin-category-row {
  grid-template-columns: 104px minmax(0, 1fr) auto;
}

.admin-order-row {
  grid-template-columns: 92px minmax(0, 1fr) auto;
}

.admin-news-row {
  grid-template-columns: 118px minmax(0, 1fr) auto;
}

.admin-product-row img,
.admin-category-row img {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.admin-row-select {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}

.admin-row-select input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.admin-category-row img {
  width: 104px;
}

.admin-product-row div,
.admin-category-row div,
.admin-news-row div,
.admin-order-row div {
  min-width: 0;
}

.admin-product-row div div,
.admin-category-row div div,
.admin-news-row div div,
.admin-order-row div div,
.admin-order-row small {
  color: var(--muted);
  font-size: 13px;
}

.admin-order-main {
  display: grid;
  gap: 5px;
}

.admin-order-line,
.admin-order-contact {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-order-total {
  font-size: 18px;
}

.admin-order-contact span,
.admin-order-contact a,
.admin-order-address {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.admin-order-contact a {
  color: var(--green);
  text-decoration: none;
}

.admin-order-address {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-category-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-news-row p {
  margin: 6px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.admin-news-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-news-date {
  width: fit-content;
  max-width: 100%;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(217, 157, 43, .14);
  color: #916119;
  font-size: 12px;
  font-weight: 900;
}

.admin-flag {
  width: fit-content;
  margin-top: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  display: inline-flex;
  background: rgba(185, 56, 47, .10);
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.admin-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.status {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(217, 157, 43, .14);
  color: #916119;
  font-size: 12px;
  font-weight: 900;
}

.source-chip {
  width: fit-content;
  max-width: 100%;
  margin: 3px 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  display: inline-flex;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.status-done {
  background: rgba(47, 109, 61, .12);
  color: var(--green);
}

.status-accepted {
  background: rgba(217, 157, 43, .16);
  color: #916119;
}

.status-assembling,
.status-delivery {
  background: rgba(47, 109, 61, .12);
  color: var(--green);
}

.status-cancelled {
  background: rgba(185, 56, 47, .12);
  color: var(--danger);
}

.admin-modal__card {
  width: min(560px, 100vw);
  padding: 24px;
  overflow: auto;
}

.admin-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.admin-modal-head span,
.order-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.admin-modal-head h2 {
  margin: 4px 0 0;
  font-size: 36px;
}

.admin-modal-head > b {
  font-size: 26px;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.order-detail-grid > div,
.admin-note,
.order-item-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.order-detail-grid b {
  display: block;
  margin-top: 5px;
}

.admin-note {
  margin-bottom: 14px;
  color: var(--muted);
}

.order-items {
  display: grid;
  gap: 8px;
}

.modal-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, .64);
}

.modal-actions .form-input {
  width: auto;
  min-width: 170px;
}

.order-item-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.order-item-line img,
.order-item-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.order-item-line span {
  display: grid;
  gap: 2px;
}

.order-item-line small {
  color: var(--muted);
  font-size: 12px;
}

.manual-order-items {
  display: grid;
  gap: 8px;
}

.manual-order-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  background: #fff;
}

.manual-order-line img,
.manual-order-line .order-item-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.manual-order-line span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-form-grid,
  .stat-grid,
  .launch-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 28px, var(--max));
  }

  .site-header__inner {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 0;
  }

  .site-header__inner--simple {
    grid-template-columns: 1fr;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  .btn-phone {
    display: none;
  }

  .quick-nav {
    padding-bottom: 10px;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    padding: 64px 0 24px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .category-cards,
  .grid,
  .news-grid,
  .info-band__grid,
  .content-grid,
  .content-grid--two,
  .diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-toolbar,
  .section-head,
  .contacts,
  .admin-head,
  .admin-card-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .admin-sidebar {
    position: static;
    height: auto;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px;
  }

  .admin-nav {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .admin-nav button {
    flex: 0 0 auto;
    min-width: max-content;
    text-align: center;
    white-space: nowrap;
  }

  .admin-logout {
    margin-top: 0;
  }

  .admin-main {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    padding: 18px 14px 28px;
  }

  .admin-product-row,
  .admin-category-row,
  .admin-news-row,
  .admin-order-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .admin-product-row {
    grid-template-columns: 34px 72px minmax(0, 1fr);
  }

  .admin-category-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .admin-product-row img {
    width: 72px;
    height: 72px;
  }

  .admin-news-row {
    grid-template-columns: 1fr;
  }

  .admin-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .admin-head-actions,
  .modal-actions {
    justify-content: stretch;
  }

  .admin-head-actions > .btn,
  .modal-actions > .btn,
  .modal-actions > .form-input {
    flex: 1 1 160px;
  }

  .manual-order-line {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .manual-order-line .qty,
  .manual-order-line .btn {
    grid-column: 1 / -1;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .event-row b {
    white-space: normal;
  }

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

  .launch-item .btn {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .admin-row-actions > .btn,
  .admin-row-actions > select {
    flex: 1 1 150px;
  }
}

@media (max-width: 560px) {
  .top-strip__track {
    min-height: auto;
    padding: 8px 14px;
    white-space: normal;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
  }

  .site-header__inner {
    gap: 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .brand__text span {
    max-width: 176px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }

  .brand__text small {
    display: none;
  }

  .site-header__actions {
    justify-content: flex-end;
  }

  .cart-button {
    min-width: 116px;
    padding-inline: 12px;
  }

  .search input {
    height: 46px;
    font-size: 15px;
  }

  .hero__inner {
    padding: 34px 0 18px;
    gap: 16px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1;
  }

  .hero p {
    margin-top: 12px;
    font-size: 16px;
  }

  .hero__actions {
    margin-top: 18px;
  }

  .hero-panel > div {
    padding: 12px;
  }

  .hero-panel {
    display: none;
  }

  .hero__actions,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .category-cards,
  .grid,
  .news-grid,
  .info-band__grid,
  .content-grid,
  .content-grid--two,
	  .diagnostic-grid,
	  .launch-list,
	  .stat-grid,
	  .admin-form-grid,
	  .order-detail-grid {
	    grid-template-columns: 1fr;
	  }

	  .launch-item b,
	  .launch-item small {
	    white-space: normal;
	  }

  .category-card {
    min-height: 136px;
  }

  .catalog-preview,
  .catalog,
  .product-section,
  .news,
  .contacts {
    padding-top: 34px;
  }

  .quick-nav {
    padding-bottom: 8px;
  }

  .quick-nav a {
    padding: 7px 11px;
    font-size: 12px;
  }

  .grid {
    gap: 10px;
  }

  .grid .product-card {
    display: grid;
    grid-template-columns: minmax(118px, 36vw) minmax(0, 1fr);
    min-height: 164px;
  }

  .grid .product-card__image {
    height: 100%;
    min-height: 164px;
    aspect-ratio: auto;
  }

  .product-card__image {
    aspect-ratio: 1 / .72;
  }

  .grid .product-card__image {
    aspect-ratio: auto;
  }

  .product-card__body {
    padding: 12px;
    gap: 8px;
  }

  .grid .product-card__body {
    align-content: start;
  }

  .product-card__title {
    font-size: 17px;
    line-height: 1.1;
  }

  .product-card p {
    min-height: auto;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .price {
    font-size: 20px;
  }

  .grid .product-card .badge,
  .grid .product-card .discount {
    max-width: calc(100% - 16px);
    padding: 4px 7px;
    font-size: 11px;
  }

  .grid .price-row {
    display: grid;
    gap: 3px;
    align-items: start;
  }

  .grid .unit {
    font-size: 12px;
  }

  .horizontal-products .product-card,
  .product-card.is-compact {
    display: flex;
    min-height: auto;
  }

  .horizontal-products .product-card__image,
  .product-card.is-compact .product-card__image {
    min-height: auto;
    aspect-ratio: 1 / .72;
  }

  .admin-field-wide {
    grid-column: auto;
  }

  .admin-modal__card {
    width: 100vw;
    padding: 22px 14px 18px;
  }

  .admin-modal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding-right: 58px;
    margin-bottom: 14px;
  }

  .admin-modal-head h2 {
    font-size: 32px;
  }

  .admin-modal-head > b {
    justify-self: start;
    font-size: 22px;
  }

  .admin-order-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .admin-order-id {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .order-detail-grid > div,
  .admin-note,
  .order-item-line {
    padding: 11px;
  }

  .cart__head,
  .cart__foot {
    padding: 14px;
  }

  .cart__foot {
    position: sticky;
    bottom: 0;
  }

  .quick-view__card {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .quick-view__card img {
    min-height: 260px;
    max-height: 42dvh;
  }

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

  .cart-item img {
    width: 56px;
    height: 56px;
  }

  .qty {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .qty button {
    width: 44px;
    height: 40px;
  }

  .footer__inner {
    display: grid;
    gap: 8px;
    justify-content: start;
    padding: 14px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
