:root {
  --accent: #4caf3d;
  --accent-dark: #3a8a2f;
  --navy: #0f3d22;
  --navy-dark: #0a2c18;
  --logo-light: #7ed957;
  --dark: #1a1a1a;
  --gray: #6b6b6b;
  --border: #e5e5e5;
  --bg-soft: #f7f7f5;
  --bg-tint: #e3f4da;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--dark);
  background: #fff;
  padding-bottom: 64px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { margin: 0 0 12px; color: var(--navy); }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-block { width: 100%; }

/* App header */
.app-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.app-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 8px;
  padding: 0 16px;
}
.logo { font-weight: 800; font-size: 18px; color: var(--navy); }
.logo-img { height: 56px; width: auto; display: block; flex: none; }
.cart-btn {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-btn:hover { background: var(--navy-dark); }
.cart-count {
  background: var(--accent);
  border-radius: 50%;
  padding: 1px 7px;
  font-size: 12px;
}

/* Banner carousel */
.banner-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.banner-carousel::-webkit-scrollbar { display: none; }
.banner {
  flex: 0 0 82%;
  max-width: 320px;
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  min-height: 84px;
  background: var(--bg-soft);
}
.banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Search */
.search-wrap { padding: 4px 16px 12px; position: relative; }
.search-box {
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 16px;
}
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
}
.search-categories {
  display: none;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  margin-top: 6px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  z-index: 15;
}
.search-categories.open { display: flex; }
.search-categories .search-cat-chip {
  width: 100%;
  text-align: left;
  white-space: normal;
  border: none;
  border-radius: 8px;
  background: none;
  padding: 12px 10px;
  font-size: 14px;
  color: var(--dark);
}
.search-categories .search-cat-chip:hover,
.search-categories .search-cat-chip:active { background: var(--bg-tint); }
.search-categories .search-cat-chip + .search-cat-chip { border-top: 1px solid var(--border); }

/* Perks row */
.perks-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.perks-row::-webkit-scrollbar { display: none; }
.perk {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tint);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 99px;
  white-space: nowrap;
}
.perk-icon { display: flex; color: var(--accent); flex: none; }

.section-title-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 10px; }
.section-title-row h2 { margin: 0; font-size: 18px; }

/* Category tile grid */
.category-grid-section { padding: 4px 0 16px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 16px;
}
@media (min-width: 480px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 720px) {
  .category-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1000px) {
  .category-grid { grid-template-columns: repeat(8, 1fr); }
}
.category-tile {
  background: var(--bg-tint);
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.category-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.category-tile-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4%;
}
.category-tile-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.category-tile-icon-fallback { display: none; font-size: 34px; align-items: center; justify-content: center; }
.category-tile-name { font-size: 13px; color: var(--navy); line-height: 1.25; font-weight: 600; }
.category-tile-more {
  background: var(--navy);
  color: #fff;
  justify-content: center;
}
.category-tile-more .category-tile-image { background: rgba(255,255,255,0.12); color: #fff; }
.category-tile-more .category-tile-name { color: #fff; }

/* Deals ("Лучшая выгода") horizontal strip on home */
.deals-section { padding-bottom: 8px; }
.deals-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 8px;
  -webkit-overflow-scrolling: touch;
}
.deals-scroll::-webkit-scrollbar { display: none; }
.deals-scroll .product-card { flex: 0 0 44%; max-width: 200px; }
@media (min-width: 480px) { .deals-scroll .product-card { flex-basis: 30%; } }
@media (min-width: 720px) { .deals-scroll .product-card { flex-basis: 20%; } }

/* Category sections (in-page catalog) */
.category-section { padding: 20px 16px; scroll-margin-top: 60px; }
.category-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.category-section-header .category-tile-icon { font-size: 22px; }
.category-section-header h2 { margin: 0; font-size: 19px; }
.category-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--navy);
  cursor: pointer;
}
.category-back-btn:hover { border-color: var(--accent); color: var(--accent); }
#catalogSections.single-view .category-section { padding-top: 12px; }
#catalogSections.single-view .category-section-header {
  position: sticky;
  top: var(--header-h, 57px);
  z-index: 15;
  background: #fff;
  margin: 0 -16px 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.subcat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
/* Плашки подкатегорий внутри категории: несколько строк, как в приложениях доставки; не липнут к экрану */
#catalogSections.single-view .subcat-chips {
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 4px 0;
}
#catalogSections.single-view .subcat-chips .category-tab {
  flex: none;
  background: var(--bg-soft);
  border-color: transparent;
  padding: 9px 16px;
  font-size: 14px;
}
#catalogSections.single-view .subcat-chips .category-tab:hover { border-color: var(--accent); }
#catalogSections.single-view .subcat-chips .subcat-more { background: #fff; border-color: var(--border); border-style: solid; }
.subcat-chips .category-tab[hidden], .subcat-chips[hidden] { display: none; }
.subcat-more { border-style: dashed; color: var(--gray); }
.subcat-block { margin-bottom: 26px; scroll-margin-top: calc(var(--header-h, 57px) + 54px); }
.subcat-block-title { font-size: 16px; margin: 0 0 12px; color: var(--navy); }

/* How it works */
.how { padding: 60px 0; }
.how h2 { text-align: center; margin-bottom: 36px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; padding: 20px; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-weight: 700;
}
.step p { color: var(--gray); font-size: 14px; }

/* Catalog */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 480px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 720px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
@media (min-width: 1000px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
}
.product-card {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.product-card:hover {
  border-color: #ddd;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e02424;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.out-of-stock-card { opacity: 0.6; }
.out-of-stock-card .product-image img { filter: grayscale(0.6); }
.out-of-stock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(30,30,30,0.75);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}
.add-btn-disabled { background: var(--border) !important; color: var(--gray) !important; cursor: not-allowed; }
.out-of-stock-badge-inline {
  display: inline-block;
  background: rgba(30,30,30,0.08);
  color: var(--dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
}
.fav-btn.active { color: #e02424; }

.category-empty-state {
  text-align: center;
  color: var(--gray);
  padding: 50px 20px;
  font-size: 14px;
}

.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gray);
  padding: 40px 0;
  font-size: 14px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.category-tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}
.category-tab:hover { border-color: var(--accent); }
.category-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.product-card h4 { margin: 0 0 4px; font-size: 15px; }
.product-unit { color: var(--gray); font-size: 12px; margin-bottom: 8px; }
.product-prices { margin-bottom: 12px; }
.retail-price { color: var(--gray); text-decoration: line-through; font-size: 13px; margin-right: 8px; }
.wholesale-price { color: var(--accent); font-weight: 700; font-size: 18px; }
.add-btn {
  margin-top: auto;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.add-btn:hover { background: var(--accent); }
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  background: var(--navy);
  border-radius: 8px;
  padding: 6px 10px;
}
.qty-row button {
  background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; width: 24px;
}
.qty-row span { color: #fff; font-weight: 600; }

/* Subscription */
.subscription { padding: 70px 0; }
.subscription h2 { text-align: center; margin-bottom: 36px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 8px 24px rgba(255,106,0,0.15); }
.plan .price { font-size: 28px; font-weight: 800; margin: 8px 0; color: var(--accent); }
.plan p { color: var(--gray); font-size: 13px; margin-bottom: 16px; }

/* Footer */
.site-footer {
  padding: 24px 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  background: var(--navy);
}

/* Модалки: подложка */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 30;
}
.modal-overlay.open { display: block; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray); }

/* Страница корзины */
#cartPage { padding-bottom: 96px; }
.cart-delivery {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 16px 0; padding: 12px 14px;
  background: #eafaf0; color: #1a7a3c; border-radius: 12px;
  font-size: 14px; font-weight: 600;
}
.cart-delivery svg { flex: none; }
.cart-delivery-when { flex: 1; min-width: 0; }
.cart-delivery-price { white-space: nowrap; font-weight: 700; }
.cart-items { max-height: 46vh; overflow-y: auto; padding: 4px 16px; margin: 12px 16px 0; border: 1px solid var(--border); border-radius: 12px; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-image { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; line-height: 1.3; }
.cart-item-qty { color: var(--gray); font-size: 12px; margin-top: 2px; }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-item-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.cart-qty { margin: 0; width: 98px; padding: 4px 6px; }
.cart-item-remove { background: none; border: none; color: var(--gray); cursor: pointer; font-size: 20px; padding: 4px; align-self: flex-start; }
.cart-note { background: #fff7e6; border: 1px solid #f3d9a4; color: #8a5a00; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin: 8px 0; line-height: 1.4; }
.cart-empty { color: var(--gray); text-align: center; padding: 40px 0; font-size: 14px; }
.cart-summary { margin: 14px 16px 0; padding: 14px; background: var(--bg-soft); border-radius: 12px; }
.access-note { font-size: 13px; margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; }
.access-note.ok { color: #1a7a3c; background: #eafaf0; }
.access-note.locked { color: #b34700; background: #fff2e5; }
.access-note:empty { display: none; }
.cart-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.cart-line.total { font-weight: 700; font-size: 16px; margin: 10px 0 16px; }
.cart-fee-hint { margin: 2px 0 0; font-size: 12px; color: var(--gray); }
.cart-recs { margin-top: 22px; }
.cart-recs h3 { font-size: 17px; margin: 0 16px 12px; }
.cart-recs .product-grid { padding: 0 16px; }
.cart-paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 26;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0));
  background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.cart-paybar[hidden] { display: none; }
.cart-pay-btn { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; }
.cart-pay-btn:disabled { opacity: 0.5; }
body.on-cart .bottom-nav { display: none; }

/* Modals */
.modal-overlay { z-index: 50; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 420px;
  max-width: 90vw;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.modal input {
  width: 100%; padding: 10px; margin-top: 4px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 16px;
}
.pay-methods { margin-bottom: 16px; }
.pay-methods-label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.pay-option { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dark); margin-bottom: 8px; }
.pay-option input { width: auto; margin: 0; }
.checkout-summary { background: var(--bg-soft); border-radius: 8px; padding: 12px; margin-bottom: 16px; font-size: 14px; }
.fine-print { color: var(--gray); font-size: 12px; text-align: center; margin-top: 10px; }
.checkout-error { white-space: pre-line; background: #fdecea; color: #b3261e; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; line-height: 1.45; }
.upsell { background: var(--bg-soft); border-radius: 8px; padding: 16px; margin-top: 16px; text-align: center; }
.upsell p { margin-bottom: 12px; font-size: 14px; }

/* Product detail modal */
.product-card { cursor: pointer; }
.product-modal { width: 480px; text-align: left; }
.product-modal-image {
  width: 100%; aspect-ratio: 1 / 1;
  background: #fff; border-radius: 8px; overflow: hidden; margin-bottom: 16px;
}
.product-modal-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-modal h3 { font-size: 18px; margin-bottom: 4px; }
.product-modal .product-unit { color: var(--gray); font-size: 13px; margin-bottom: 10px; }
.product-modal-prices { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.product-modal-prices .wholesale-price { font-size: 20px; font-weight: 700; }
.savings-badge {
  display: inline-block;
  background: #eafaf0; color: #1a7a3c; font-size: 15px; padding: 6px 12px;
  border-radius: 8px; font-weight: 700; margin-bottom: 8px;
}
.product-composition { background: var(--bg-soft); border-radius: 8px; padding: 12px; margin: 14px 0; font-size: 13px; line-height: 1.5; color: var(--dark); }
.product-composition h4 { font-size: 12px; margin-bottom: 6px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.03em; }
.product-modal .add-btn.btn-block { width: 100%; margin-top: 6px; }
.product-modal .qty-row { justify-content: center; margin-top: 6px; }

/* Bottom nav (app-style) */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--navy);
  border-top: 1px solid var(--navy-dark);
  z-index: 25;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
}
.bottom-nav-icon { font-size: 19px; }
.bottom-nav-item.active { color: #fff; }

/* Центральная кнопка корзины — приподнята и выделена */
.bottom-nav-cart { position: relative; color: rgba(255,255,255,0.85); }
.bottom-nav-cart-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-top: -22px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25), 0 0 0 4px var(--navy);
  position: relative;
}
.bottom-nav-cart .cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}
.bottom-nav-cart.active .bottom-nav-cart-circle { background: var(--accent-dark); }

/* Страницы "Все категории" / "Профиль" */
.subpage-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}
.subpage-header h2 { margin: 0; font-size: 19px; }
#categoriesPage, #profilePage { padding-bottom: 24px; }
#categoriesPage .category-grid { padding: 16px; }

.profile-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.profile-card { background: var(--bg-soft); border-radius: 14px; padding: 18px; }
.profile-card h3 { font-size: 15px; margin-bottom: 12px; }
.profile-card label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.profile-card input {
  width: 100%; padding: 10px; margin-top: 4px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 16px;
}
.profile-hint { font-size: 12.5px; color: var(--gray); margin: -4px 0 12px; }
.profile-order {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.profile-order-top { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 4px; }
.profile-order-items { color: var(--gray); font-size: 12.5px; }
.profile-empty { color: var(--gray); font-size: 13px; }

@media (max-width: 640px) {
  .nav { display: none; }
  .steps, .plans { grid-template-columns: 1fr; }
}

/* Переключатель языка (RU / UZ) */
.header-right { display: flex; flex-direction: row !important; flex-wrap: nowrap; align-items: center; gap: 8px; flex: none; }
.header-right > * { flex: none; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch button { background: transparent; color: var(--navy); border: 0; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; letter-spacing: 0.3px; }
.lang-switch button.active { background: var(--navy); color: #fff; }
body.on-cart .search-wrap { display: none; }

/* Плавный возврат назад (свайп вправо / кнопка) */
.view-leave { transition: transform .17s ease-in, opacity .17s ease-in; transform: translateX(36%); opacity: 0; }
.view-enter { animation: viewEnter .24s ease-out; }
@keyframes viewEnter { from { transform: translateX(-22px); opacity: 0; } to { transform: none; opacity: 1; } }

#toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 10px); background: rgba(15,61,34,.94); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
