:root {
  /* Light Theme (Default) */
  --bg-page: #f7f6f2;
  --bg-surface: #ffffff;
  --bg-surface-translucent: rgba(255, 255, 255, 0.88);
  --bg-card: #ffffff;
  --bg-subtle: #f0eee8;
  --bg-chip: #edeae2;
  --bg-chip-active: #173822;

  --text-main: #141f17;
  --text-secondary: #58655a;
  --text-muted: #849387;
  --text-inverse: #ffffff;

  --border-light: rgba(20, 31, 23, 0.08);
  --border-focus: rgba(23, 56, 34, 0.35);

  --brand-green: #1a4d2e;
  --brand-green-hover: #133b23;
  --brand-green-light: #e7f0e8;
  --accent-orange: #e86328;
  --accent-lime: #72b028;
  --accent-gold: #c99326;

  --shadow-sm: 0 2px 8px rgba(16, 28, 19, 0.04);
  --shadow-md: 0 8px 24px rgba(16, 28, 19, 0.08);
  --shadow-float: 0 16px 40px rgba(16, 28, 19, 0.14);

  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-page: #0b110d;
  --bg-surface: #131c15;
  --bg-surface-translucent: rgba(19, 28, 21, 0.88);
  --bg-card: #162219;
  --bg-subtle: #1c2b20;
  --bg-chip: #1c2b20;
  --bg-chip-active: #82d44b;

  --text-main: #f0f5f1;
  --text-secondary: #9cb1a1;
  --text-muted: #627566;
  --text-inverse: #0b110d;

  --border-light: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(130, 212, 75, 0.4);

  --brand-green: #216a3c;
  --brand-green-hover: #29824a;
  --brand-green-light: #162e1e;
  --accent-orange: #f0743b;
  --accent-lime: #82d44b;
  --accent-gold: #e5aa36;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-float: 0 16px 40px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.45;
  letter-spacing: -0.01em;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Base App Viewport (Mobile-first container) */
.app-viewport {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-page);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.08);
  padding-bottom: 120px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--bg-surface-translucent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-green), #2d824d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  box-shadow: 0 4px 12px rgba(26, 77, 46, 0.25);
}

.brand-info h1 {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.geo-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 550;
}

.geo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(114, 176, 40, 0.2);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

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

/* =========================================
   WELCOME HERO CARD (Первый экран)
   ========================================= */
.welcome-hero-card {
  margin: 14px 16px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-green-light);
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

[data-theme="dark"] .welcome-pill {
  background: rgba(138, 214, 70, 0.15);
  color: #8ad646;
}

.welcome-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.welcome-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.welcome-title span {
  color: var(--brand-green);
}

[data-theme="dark"] .welcome-title span {
  color: #8ad646;
}

.welcome-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.welcome-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border-light);
}

.welcome-hero-visual {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #e8efe9, #f4f6f3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

[data-theme="dark"] .welcome-hero-visual {
  background: linear-gradient(135deg, #16241b, #111a14);
}

.welcome-fruit-img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.welcome-float-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .welcome-float-tag {
  background: rgba(20, 31, 23, 0.92);
  color: #fff;
}

.tag-icon {
  font-size: 16px;
}

/* Mode Banner: Open vs Closed */
.order-window-banner {
  margin: 14px 16px 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-smooth);
}

.order-window-banner.is-open {
  background: linear-gradient(135deg, #173f25 0%, #102d1a 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(23, 63, 37, 0.28);
}

.order-window-banner.is-closed {
  background: linear-gradient(135deg, #262420 0%, #1a1816 100%);
  color: #f7f6f2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.banner-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.is-open .banner-status-tag {
  background: rgba(138, 214, 70, 0.2);
  color: #8ad646;
  border: 1px solid rgba(138, 214, 70, 0.4);
}

.is-closed .banner-status-tag {
  background: rgba(232, 99, 40, 0.2);
  color: #fca074;
  border: 1px solid rgba(232, 99, 40, 0.4);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseAnim 1.6s infinite ease-in-out;
}

@keyframes pulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.banner-title {
  font-size: 17.5px;
  font-weight: 750;
  line-height: 1.25;
}

.banner-subtitle {
  font-size: 12.5px;
  opacity: 0.85;
  line-height: 1.35;
}

/* Countdown Widget */
.countdown-grid {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.countdown-box {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.countdown-num {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown-lbl {
  font-size: 9px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.countdown-sep {
  font-size: 16px;
  font-weight: 800;
  opacity: 0.6;
}

/* Closed state VIP channels CTA */
.closed-cta-channels {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

.vip-channel-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.vip-channel-btn:active {
  transform: scale(0.97);
}

.vip-channel-btn.btn-tg {
  background: #2aabee;
  color: #ffffff;
}

.vip-channel-btn.btn-max {
  background: #222e26;
  color: #8ad646;
  border: 1px solid rgba(138, 214, 70, 0.4);
}

/* Search and Categories */
.app-search-wrap {
  padding: 14px 16px 6px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 0 16px 0 42px;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.12);
}

.search-icon {
  position: absolute;
  left: 15px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.categories-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.category-chip {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-chip);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-chip:active {
  transform: scale(0.95);
}

.category-chip.active {
  background: var(--brand-green);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 77, 46, 0.25);
}

[data-theme="dark"] .category-chip.active {
  background: #82d44b;
  color: #0c140e;
  box-shadow: 0 4px 14px rgba(130, 212, 75, 0.3);
}

/* Products Section */
.catalog-section {
  padding: 4px 16px 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 17px;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-badge {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}

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

.card-img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-subtle);
  position: relative;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(16, 28, 19, 0.78);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

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

.product-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.product-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2px;
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.product-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Card CTA & Counters */
.card-cta-row {
  margin-top: 4px;
}

.add-btn {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--brand-green);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.add-btn:active {
  transform: scale(0.95);
  background: var(--brand-green-hover);
}

[data-theme="dark"] .add-btn {
  background: #82d44b;
  color: #0c140e;
}

.counter-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  height: 38px;
  padding: 0 4px;
  border: 1px solid var(--border-light);
}

.counter-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  border: none;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

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

.counter-val {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text-main);
  min-width: 28px;
  text-align: center;
}

/* Floating Bottom Bar (Cart) */
.bottom-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 12px 16px;
  max-width: 500px;
  margin: 0 auto;
  pointer-events: none;
}

.cart-bar-inner {
  pointer-events: auto;
  background: #153b23;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 36px rgba(16, 40, 24, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(120%);
  opacity: 0;
  transition: all var(--transition-smooth);
}

.bottom-cart-bar.is-visible .cart-bar-inner {
  transform: translateY(0);
  opacity: 1;
}

[data-theme="dark"] .cart-bar-inner {
  background: #1a2a1f;
  border-color: rgba(138, 214, 70, 0.3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
}

.cart-bar-info {
  display: flex;
  flex-direction: column;
}

.cart-bar-count {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 600;
}

.cart-bar-sum {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-bar-btn {
  background: #82d44b;
  color: #0b150e;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 750;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform var(--transition-fast);
}

.cart-bar-btn:active {
  transform: scale(0.95);
}

/* Drawer / Sheet (Cart & Checkout) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-surface);
  border-radius: 28px 28px 0 0;
  z-index: 100;
  padding: 20px 20px 34px;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-light);
  transform: translateY(105%);
  transition: transform var(--transition-smooth);
  max-height: 88vh;
  overflow-y: auto;
}

.drawer-backdrop.is-open .drawer-panel {
  transform: translateY(0);
}

.drawer-pill-handle {
  width: 44px;
  height: 5px;
  background: var(--border-light);
  border-radius: 99px;
  margin: 0 auto 16px;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.drawer-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.drawer-close {
  background: var(--bg-subtle);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Cart Items in Drawer */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.cart-item-img {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 13.5px;
  font-weight: 700;
}

.cart-item-unit-price {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item-sum {
  font-size: 14.5px;
  font-weight: 800;
}

/* Checkout Form */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

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

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input, .form-select {
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-main);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.12);
}

.btn-submit-order {
  margin-top: 8px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--brand-green);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.btn-submit-order:active {
  transform: scale(0.97);
}

[data-theme="dark"] .btn-submit-order {
  background: #82d44b;
  color: #0b150e;
}

/* Order Success State */
.order-success-box {
  text-align: center;
  padding: 24px 10px;
}

.success-check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-green-light);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

[data-theme="dark"] .success-check-icon {
  background: rgba(130, 212, 75, 0.15);
  color: #82d44b;
}

/* =========================================
   REVIEWS FROM TELEGRAM
   ========================================= */
.reviews-section {
  padding: 24px 16px;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tg-chat-link {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--brand-green);
  text-decoration: none;
}

[data-theme="dark"] .tg-chat-link {
  color: #8ad646;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.tg-review-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition-fast);
}

.tg-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.tg-user-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tg-user-name {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-main);
}

.tg-user-geo {
  font-size: 10.5px;
  color: var(--text-muted);
}

.tg-badge {
  font-size: 10px;
  font-weight: 750;
  background: rgba(42, 171, 238, 0.12);
  color: #229ed9;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.tg-message-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid #229ed9;
}

.tg-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tg-stars {
  color: #f5a623;
  letter-spacing: 2px;
  font-size: 12px;
}

.tg-time {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* =========================================
   MOBILE BOTTOM COMMUNITY BAR (TG & MAX)
   ========================================= */
.mobile-community-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.comm-btn {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 750;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.comm-btn:active {
  transform: scale(0.97);
}

.comm-tg {
  background: #229ed9;
  color: #ffffff;
}

.comm-max {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

[data-theme="dark"] .comm-max {
  background: #17261b;
  color: #8ad646;
  border-color: rgba(138, 214, 70, 0.3);
}

.comm-icon {
  width: 20px;
  height: 20px;
}

.max-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #8ad646;
  color: #0b150e;
  font-weight: 900;
  font-size: 11px;
}

/* =========================================
   DESKTOP STORY SECTION
   ========================================= */
.desktop-story-section {
  display: none;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.story-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.story-card h3 {
  font-size: 16px;
  font-weight: 750;
  margin-bottom: 6px;
  color: var(--text-main);
}

.story-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =========================================
   ADMIN PANEL MODAL
   ========================================= */
.admin-modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.admin-modal-wrap.is-open {
  opacity: 1;
  pointer-events: auto;
}

.admin-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-float);
  max-height: 90vh;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab-btn.active {
  background: var(--brand-green);
  color: #fff;
  border-color: var(--brand-green);
}

[data-theme="dark"] .admin-tab-btn.active {
  background: #82d44b;
  color: #0b150e;
  border-color: #82d44b;
}

.admin-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 34px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: var(--brand-green);
}

[data-theme="dark"] input:checked + .slider-round {
  background-color: #82d44b;
}

input:checked + .slider-round:before {
  transform: translateX(22px);
}

.ai-pill-action {
  background: linear-gradient(135deg, #7928ca, #ff0080);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 10px;
}

.orders-table th, .orders-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.orders-table th {
  color: var(--text-muted);
  font-weight: 700;
}

/* ==========================================================================
   DESKTOP MEDIA QUERIES (Полноценная раскладка для ПК >= 992px)
   ========================================================================== */
@media (min-width: 992px) {
  body {
    background-color: var(--bg-page);
    padding: 0;
  }

  .app-viewport {
    max-width: 1240px;
    margin: 0 auto;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-height: 100vh;
    padding: 0 32px 80px;
  }

  .app-header {
    border-radius: var(--radius-md);
    margin: 20px 0 28px;
    padding: 16px 28px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
  }

  .brand-avatar {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .brand-info h1 {
    font-size: 19px;
  }

  .geo-tag {
    font-size: 13.5px;
  }

  /* Welcome Hero PC */
  .welcome-hero-card {
    margin: 0 0 32px;
    padding: 38px 46px;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    gap: 40px;
  }

  .welcome-title {
    font-size: 40px;
    line-height: 1.15;
  }

  .welcome-text {
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
  }

  .welcome-stats-row {
    padding: 18px 28px;
    margin-top: 18px;
    max-width: 540px;
  }

  .stat-num {
    font-size: 24px;
  }

  .stat-label {
    font-size: 12px;
  }

  .welcome-fruit-img {
    max-height: 350px;
  }

  /* Order Banner PC */
  .order-window-banner {
    margin: 0 0 32px;
    padding: 28px 40px;
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 24px;
  }

  .banner-top {
    grid-column: 1 / -1;
  }

  .banner-title {
    font-size: 26px;
  }

  .banner-subtitle {
    font-size: 15px;
  }

  .countdown-grid {
    justify-content: flex-end;
  }

  .countdown-box {
    min-width: 68px;
    padding: 10px 14px;
  }

  .countdown-num {
    font-size: 26px;
  }

  .countdown-lbl {
    font-size: 11px;
  }

  .countdown-sep {
    font-size: 22px;
  }

  .closed-cta-channels {
    grid-column: 2;
    justify-content: flex-end;
  }

  /* Search & Category Chips PC */
  .app-search-wrap {
    padding: 0 0 16px;
  }

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

  .categories-scroller {
    padding: 0 0 24px;
    gap: 12px;
  }

  .category-chip {
    padding: 10px 22px;
    font-size: 14px;
  }

  /* Catalog Grid PC (4 columns) */
  .catalog-section {
    padding: 0;
  }

  .section-head {
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 24px;
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .card-body {
    padding: 16px;
  }

  .product-title {
    font-size: 16px;
  }

  .product-desc {
    font-size: 12.5px;
    -webkit-line-clamp: 3;
  }

  .product-price {
    font-size: 18px;
  }

  .add-btn {
    height: 42px;
    font-size: 14px;
  }

  /* Reviews PC (3 columns) */
  .reviews-section {
    padding: 50px 0 30px;
  }

  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  /* Desktop Story Section (visible on PC) */
  .desktop-story-section {
    display: grid;
  }

  /* Floating elements on PC */
  .mobile-community-bar {
    display: none;
  }

  .bottom-cart-bar {
    max-width: 580px;
    bottom: 24px;
  }

  .drawer-panel {
    max-width: 580px;
  }
}
