:root {
  --beige: #d9c8ad;
  --beige-light: #f5eee2;
  --beige-deep: #a88f6b;
  --black: #201915;
  --muted: #75675c;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(32, 25, 21, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--beige-light);
  color: var(--black);
  font-family: "Georgia", "Times New Roman", serif;
}

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

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

.hero {
  min-height: 680px;
  padding: 28px clamp(18px, 4vw, 64px) 56px;
  background:
    linear-gradient(90deg, rgba(245, 238, 226, 0.98) 0%, rgba(245, 238, 226, 0.86) 48%, rgba(245, 238, 226, 0.18) 100%),
    url("/static/img/adam-banner.png") center / cover;
}

.topbar,
.admin-header,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
}

.brand-mark {
  display: block;
  overflow: hidden;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(32, 25, 21, 0.58);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 24px rgba(32, 25, 21, 0.12);
}

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

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 15px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 720px);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding-top: 72px;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--beige-deep);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 500;
  line-height: 0.95;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
}

.hero-copy p:not(.eyebrow),
.section-heading p,
.admin-toolbar p {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--black);
  border-radius: 999px;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(32, 25, 21, 0.16);
}

.button-dark {
  background: var(--black);
  color: var(--white);
}

.button-light {
  background: var(--white);
  color: var(--black);
}

.button-ghost {
  background: var(--white);
  color: var(--black);
  border: 1px solid rgba(32, 25, 21, 0.22);
  box-shadow: 0 2px 10px rgba(32, 25, 21, 0.06);
}

.button-ghost:hover {
  background: var(--beige-light);
}

.button-sm {
  min-height: 42px;
  padding: 10px 18px;
  font-size: 14px;
}

main {
  padding: 72px clamp(18px, 4vw, 64px);
  overflow-x: clip;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.menu-column {
  display: grid;
  gap: 18px;
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
}

.menu-controls {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid rgba(32, 25, 21, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 40px rgba(32, 25, 21, 0.08);
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.menu-controls .menu-reset-btn {
  flex: 0 0 auto;
  align-self: center;
}

.search-field,
.filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--black);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.search-field {
  flex: 0 0 auto;
}

.filter-block {
  flex: 1 1 auto;
  min-width: 0;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.category-filters-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(32, 25, 21, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-sizing: border-box;
}

.category-filters-shell::before,
.category-filters-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}

.category-filters-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), transparent);
}

.category-filters-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.98), transparent);
}

.search-field input {
  width: 100%;
  max-width: min(340px, 100%);
  border: 1px solid rgba(32, 25, 21, 0.16);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  padding: 13px 16px;
  outline: none;
  box-sizing: border-box;
}

.category-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 18px;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-size: 100% 100%;
}

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

.filter-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(32, 25, 21, 0.16);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  padding: 10px 16px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  scroll-snap-align: start;
  box-shadow: 0 2px 6px rgba(32, 25, 21, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.filter-chip:active {
  transform: scale(0.98);
}

.filter-chip.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 22px;
  min-width: 0;
}

/* Главная: сначала столбец на телефоне, затем 2 и 4 колонки на больших экранах */
.home-featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-width: 0;
  width: 100%;
}

@media (min-width: 640px) {
  .home-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .home-featured-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }
}

.home-featured-grid .product-card {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 639px) {
  .home-featured-grid .product-content h3 {
    font-size: 1.15rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .home-featured-grid .product-content p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
  }

  .home-featured-head h2 {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.2;
  }
}

.product-card,
.cart-panel,
.order-card,
.admin-toolbar {
  border: 1px solid rgba(32, 25, 21, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 40px rgba(32, 25, 21, 0.08);
}

.product-card {
  overflow: hidden;
  min-width: 0;
}

.product-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--beige);
}

.product-content {
  padding: 20px;
}

.product-meta,
.cart-total,
.order-meta,
.order-line,
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-category,
.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--beige-light);
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.product-content h3 {
  margin: 14px 0 8px;
  font-size: 24px;
}

.product-content p,
.cart-empty,
.form-message,
.order-card,
.cart-item {
  color: var(--muted);
  font-family: Arial, sans-serif;
  line-height: 1.55;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.price {
  color: var(--black);
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.cart-panel {
  grid-column: 2;
  position: sticky;
  top: 18px;
  padding: 22px;
  width: 100%;
  max-width: 400px;
  justify-self: end;
  box-sizing: border-box;
}

.cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(32, 25, 21, 0.18);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(32, 25, 21, 0.1);
}

.cart-list {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.cart-item {
  padding: 12px;
  border-radius: 18px;
  background: var(--beige-light);
}

.quantity-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quantity-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(32, 25, 21, 0.2);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}

.cart-total {
  padding: 18px 0;
  border-top: 1px solid rgba(32, 25, 21, 0.12);
  color: var(--black);
  font-family: Arial, sans-serif;
  font-size: 20px;
}

.order-form {
  display: grid;
  gap: 12px;
}

.order-form label {
  display: grid;
  gap: 6px;
  color: var(--black);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.order-form input,
.order-form textarea,
.status-select {
  width: 100%;
  border: 1px solid rgba(32, 25, 21, 0.16);
  border-radius: 16px;
  background: var(--white);
  color: var(--black);
  padding: 12px 14px;
  outline: none;
}

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

.form-message.success {
  color: #287348;
}

.form-message.error {
  color: #9d2c2c;
}

.footer {
  padding: 26px clamp(18px, 4vw, 64px);
  background: var(--black);
  color: var(--beige-light);
  font-family: Arial, sans-serif;
}

.admin-body {
  background:
    radial-gradient(circle at top left, rgba(217, 200, 173, 0.88), transparent 34rem),
    var(--beige-light);
}

.admin-header {
  padding: 28px clamp(18px, 4vw, 64px);
  background: var(--black);
  color: var(--white);
}

.admin-header .brand-mark {
  border-color: var(--beige);
  background: transparent;
  color: var(--beige);
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
}

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

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

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.order-card {
  padding: 20px;
}

.order-card h3 {
  color: var(--black);
  font-size: 25px;
}

.order-lines {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 14px;
  border-radius: 18px;
  background: var(--beige-light);
}

.order-line {
  color: var(--black);
}

.order-address {
  margin: 12px 0;
}

.status-select {
  margin-top: 12px;
}

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

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

  .menu-column {
    grid-column: auto;
    max-width: none;
  }

  .cart-panel {
    grid-column: auto;
    position: static;
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .menu-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-controls .menu-reset-btn {
    width: 100%;
    max-width: none;
    align-self: stretch;
  }

  .search-field input {
    width: 100%;
    max-width: none;
  }

  .search-field,
  .filter-block {
    width: 100%;
    max-width: 100%;
  }

}

@media (max-width: 620px) {
  .admin-header,
  .admin-toolbar,
  .footer:not(.site-footer) {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 46px;
  }

  .home-main {
    padding-top: 22px;
  }

  .home-featured {
    padding: 16px;
    border-radius: 26px;
  }
}

/* --- Multi-page layout, mobile nav, toast, checkout --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 238, 226, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(32, 25, 21, 0.08);
}

.site-header .topbar-condensed {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  position: relative;
  padding: 12px clamp(14px, 4vw, 56px);
  max-width: 1200px;
  margin: 0 auto;
}

.topbar-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.nav-menu-toggle {
  display: inline-flex;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(32, 25, 21, 0.22);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(32, 25, 21, 0.06);
}

.nav-menu-toggle span {
  display: block;
  height: 2px;
  margin: 0 12px;
  background: var(--black);
  border-radius: 2px;
}

.topbar-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  will-change: max-height, opacity;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(32, 25, 21, 0.16);
  background: var(--white);
  color: var(--black);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(32, 25, 21, 0.07);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(32, 25, 21, 0.12);
}

.nav-btn-accent {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.nav-btn-outline {
  background: transparent;
  border: 1px dashed rgba(32, 25, 21, 0.35);
}

.nav-btn-cart .cart-badge {
  margin-left: 4px;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.cart-badge.hidden {
  display: none;
}

.auth-nav-slot {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-compact {
  min-height: 420px;
  padding-top: 48px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.home-main {
  padding-top: 36px;
}

.home-featured {
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid rgba(32, 25, 21, 0.1);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(217, 200, 173, 0.22)),
    rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 48px rgba(32, 25, 21, 0.08);
}

.home-featured-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.home-featured-head h2 {
  margin: 0;
}

.home-menu-btn {
  flex: 0 0 auto;
}

/* После базового .home-featured-head: на телефоне колонка и текст влево (базовый align-items: flex-end иначе прижимает блоки вправо) */
@media (max-width: 620px) {
  .home-featured-head {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
  }

  .home-featured-head > div:first-child {
    width: 100%;
    text-align: left;
  }

  .home-featured-head .eyebrow {
    text-align: left;
  }

  .home-featured-head h2 {
    text-align: left;
  }

  .home-menu-btn {
    width: 100%;
    align-self: stretch;
  }
}

.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px clamp(14px, 4vw, 40px) 56px;
}

.page-main.narrow-top {
  padding-top: 28px;
}

.section-lead {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 8px;
}

.section-heading-tight {
  margin-bottom: 22px;
}

.auth-sub {
  margin: 0;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

.auth-actions-row,
.page-actions,
.checkout-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.checkout-edit-row {
  margin-top: 16px;
}

.footer-actions {
  margin: 12px 0 0;
}

.footer-route-btn {
  text-decoration: none;
}

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

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
}

.checkout-summary {
  position: sticky;
  top: 88px;
  padding: 20px;
}

.checkout-edit {
  margin-top: 12px;
}

.checkout-form-wrap {
  min-width: 0;
}

.cart-page-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid rgba(32, 25, 21, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 40px rgba(32, 25, 21, 0.08);
}

.cart-actions {
  margin-top: 18px;
}

.button.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.product-footer-split {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.product-inline-cart {
  display: flex;
  justify-content: flex-end;
}

.quantity-controls-card button {
  width: 34px;
  height: 34px;
}

.account-banner {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--beige-light);
  border: 1px solid rgba(32, 25, 21, 0.1);
  font-family: Arial, sans-serif;
  margin-bottom: 16px;
}

.account-banner a {
  color: var(--text, #201915);
  font-weight: 600;
  text-underline-offset: 3px;
}

.account-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(32, 25, 21, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.account-balance {
  font-size: 20px;
  margin: 0 0 12px;
}

.auth-page .section-heading h1 {
  margin-bottom: 8px;
}

.auth-form {
  max-width: 480px;
}

.field-hint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
}

.bonus-preview {
  margin: 10px 0 0;
  color: var(--beige-deep);
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  padding: 32px clamp(14px, 4vw, 56px) 14px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.site-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-top: 24px;
}

.footer-col .footer-heading {
  margin: 0 0 10px;
  font-size: 20px;
  font-family: Arial, sans-serif;
}

.footer-text {
  margin: 0 0 8px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--beige-light);
}

.footer-text a {
  text-decoration: underline;
}

.footer-muted {
  opacity: 0.92;
  font-size: 13px;
}

.footer-map-wrap .map-embed {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(217, 200, 173, 0.35);
  min-height: 220px;
  background: rgba(0, 0, 0, 0.18);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  padding: 16px clamp(14px, 4vw, 56px) 22px;
  border-top: 1px solid rgba(217, 200, 173, 0.25);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: var(--beige-light);
  opacity: 0.9;
}

.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  max-width: min(420px, 100%);
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--black);
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button-outline {
  border: 1px solid var(--beige);
  background: transparent;
  color: var(--white);
}

.admin-login-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(217, 200, 173, 0.55), transparent 40%),
    var(--beige-light);
}

.admin-login-card {
  width: min(440px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid rgba(32, 25, 21, 0.12);
  box-shadow: var(--shadow);
}

.brand-admin-login {
  margin-bottom: 16px;
}

.admin-login-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 5vw, 34px);
}

.admin-login-footer {
  margin: 12px 0 0;
  font-family: Arial, sans-serif;
}

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

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

  .checkout-summary {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  h1,
  .page-main .section-heading h1 {
    font-size: clamp(32px, 7vw, 44px);
  }
}

@media (max-width: 900px) {
  .site-header .topbar-condensed {
    flex-direction: column;
    align-items: stretch;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .topbar-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 10px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    border-top: 1px solid transparent;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
      max-height 0.45s cubic-bezier(0.33, 1, 0.68, 1),
      opacity 0.35s ease,
      transform 0.35s ease,
      padding 0.35s ease,
      margin 0.35s ease,
      border-color 0.25s ease;
  }

  .topbar-links.is-open {
    max-height: 560px;
    opacity: 1;
    overflow: visible;
    padding-top: 14px;
    padding-bottom: 8px;
    margin-top: 12px;
    border-top-color: rgba(32, 25, 21, 0.12);
    transform: translateY(0);
    pointer-events: auto;
  }

  .topbar-links .nav-btn,
  .auth-nav-slot .nav-btn,
  .auth-nav-slot .nav-btn-outline {
    width: 100%;
    justify-content: center;
  }

  .auth-nav-slot {
    flex-direction: column;
    width: 100%;
  }

  .hero-compact {
    min-height: 360px;
    padding-top: 32px;
  }

  .page-main,
  .page-main.narrow-top {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .menu-controls {
    padding: 16px 16px;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .menu-column {
    width: 100%;
  }

  .category-filters {
    padding-left: 14px;
    padding-right: 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
  }
}

@media (min-width: 901px) {
  .site-header .topbar-condensed {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
  }

  .topbar-primary {
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-start;
    gap: 16px;
  }

  .nav-menu-toggle {
    display: none;
  }

  .topbar-links {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
    width: auto;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    padding: 0 !important;
    margin-top: 0 !important;
    border-top-color: transparent !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .topbar-links {
    transition: none;
  }

  .topbar-links.is-open {
    transform: none;
  }
}

/* Минимальный заказ, бонусы, оформление */
.min-order-hint {
  margin: 8px 0 0;
  font-family: var(--font-sans, Arial, sans-serif);
  font-size: 0.95rem;
  color: var(--muted, #75675c);
}

.min-order-hint-warn {
  color: #9a3b2e;
}

.checkout-totals {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.checkout-line {
  font-size: 0.95rem;
}

.checkout-discount-line strong {
  color: #2d6a3e;
}

.loyalty-spend-panel {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(245, 238, 226, 0.7);
  border: 1px solid rgba(32, 25, 21, 0.08);
}

.loyalty-spend-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans, Arial, sans-serif);
  font-weight: 600;
  cursor: pointer;
}

.loyalty-spend-amount-label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-sans, Arial, sans-serif);
  font-size: 0.95rem;
}

.loyalty-spend-amount-label input {
  max-width: 140px;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--muted, #75675c);
}

/* Страница «О кафе» */
.about-page {
  max-width: 820px;
}

.about-hero-card {
  margin: 24px 0 32px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(32, 25, 21, 0.12);
}

.about-hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

.about-story {
  margin-bottom: 40px;
}

.about-story h2,
.about-gallery h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.about-story p {
  margin: 0 0 16px;
  line-height: 1.7;
  color: var(--text, #201915);
}

.about-gallery-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.about-photo {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(32, 25, 21, 0.08);
}

.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-photo figcaption {
  padding: 12px 16px 16px;
  font-family: var(--font-sans, Arial, sans-serif);
  font-size: 0.9rem;
  color: var(--muted, #75675c);
}

.about-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-bottom: 24px;
}

/* Админ: настройки */
.admin-settings-panel {
  margin-bottom: 28px;
  padding: 20px 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(32, 25, 21, 0.1);
}

.admin-settings-panel h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.admin-settings-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.admin-settings-form label {
  display: grid;
  gap: 6px;
  font-family: var(--font-sans, Arial, sans-serif);
  font-size: 0.95rem;
}

.admin-settings-form input {
  width: 160px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(32, 25, 21, 0.18);
  background: #fff;
  font-family: var(--font-sans, Arial, sans-serif);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.admin-tab:hover {
  border-color: var(--black, #201915);
}

.admin-tab.is-active {
  background: var(--black, #201915);
  color: var(--white, #fff);
  border-color: var(--black, #201915);
}

.admin-orders-section[hidden] {
  display: none !important;
}

.order-date {
  margin: 0 0 8px;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* --- SBP / Elplat payment page --- */
.pay-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--beige, #f5efe6);
}

.pay-card {
  width: min(480px, 100%);
  padding: 28px 24px 32px;
  border-radius: 28px;
  background: var(--white, #fff);
  border: 1px solid rgba(32, 25, 21, 0.1);
  box-shadow: var(--shadow, 0 12px 40px rgba(32, 25, 21, 0.08));
  text-align: center;
}

.pay-title {
  margin: 12px 0 4px;
  font-size: 1.5rem;
}

.pay-order-id {
  margin: 0 0 8px;
  opacity: 0.75;
}

.pay-amount {
  margin: 0 0 20px;
  font-size: 1.35rem;
  font-weight: 700;
}

.pay-loading {
  padding: 24px;
  opacity: 0.7;
}

.pay-qr-block {
  display: grid;
  gap: 16px;
}

.pay-qr-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(32, 25, 21, 0.08);
}

.pay-qr-canvas {
  min-width: 300px;
  min-height: 300px;
}

.pay-sbp-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  pointer-events: none;
}

.pay-hint,
.pay-legal {
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: left;
}

.pay-sbp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background-color: #1d1346 !important;
  color: #d0cfd8 !important;
  border: none;
}

.checkout-payment-hint {
  margin: 12px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(32, 25, 21, 0.72);
}

.pay-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 2.5rem;
  line-height: 72px;
}
