/* ===== HALVA SHOP — Premium Redesign ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Nunito:wght@700;800;900&display=swap');

/*
  TELEGRAM DARK MODE FIX:
  Telegram WebApp накладывает тёмную тему через CSS-переменные --tg-theme-*
  и через prefers-color-scheme. Блокируем это принудительно.
*/
:root {
  color-scheme: light only;
  --bg: #FCEDF5;
  --surface: #ffffff;
  --surface2: #fdf0f8;
  --border: #f5d4e8;

  --text: #3a1a2e;
  --text-sec: #7a4a6a;
  --hint: #c090b0;

  --accent: #e8649a;
  --accent-dark: #c44b80;
  --accent-light: #ff8ab8;
  --accent-soft: #fde8f3;
  --accent-text: #ffffff;

  --success-bg: #e8f8ef;
  --success: #16803c;
  --warning-bg: #fff8e1;
  --warning: #b45309;
  --danger-bg: #fef2f2;
  --danger: #dc2626;

  --shadow-xs: 0 1px 4px rgba(90, 30, 70, 0.06);
  --shadow-sm: 0 2px 12px rgba(90, 30, 70, 0.08);
  --shadow-md: 0 8px 28px rgba(90, 30, 70, 0.12);
  --shadow-lg: 0 20px 60px rgba(90, 30, 70, 0.18);

  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 10px;
  --r-xs: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Force light colors — override Telegram dark theme injection */
html {
  background: #FCEDF5 !important;
  color: #3a1a2e !important;
  color-scheme: light only !important;
  forced-color-adjust: none;
  -webkit-forced-color-adjust: none;
}

html,
body {
  background: var(--bg) !important;
  min-height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text) !important;
  background: var(--bg) !important;
  padding-bottom: 120px;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

h1 {
  font-family: 'Nunito';
}

h2,
h3 {
  font-family: 'Nunito', 'Inter', sans-serif;
}

/* ===== HERO ===== */
.hero {
  /* Rose-pink gradient — Telegram dark mode override */
  background-color: #e8649a !important;
  background: -webkit-linear-gradient(315deg, #c44b80 0%, #e8649a 45%, #FFC8DC 100%) !important;
  background: linear-gradient(135deg, #FFC8DC 0%, #e8649a 55%, #c44b80 100%) !important;
  color: #ffffff !important;
  padding: 28px 20px 36px;
  border-radius: 0 0 32px 32px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(232, 100, 154, 0.40);
  position: relative;
  overflow: hidden;
  /* Telegram иногда накладывает filter — сбрасываем */
  filter: none !important;
  -webkit-filter: none !important;
}

.hero * {
  color: #ffffff !important;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-logo {
  width: 180px;
  height: 108px;
  margin: 0 auto 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Белый логотип на розовом фоне */
  filter: brightness(0) invert(1);
}

.hero h1 {
  font-family: 'Nunito';
  font-size: 22px;
  height: 24px;
  font-weight: 900;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  letter-spacing: -0.3px;
  vertical-align: middle;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-tagline {
  font-size: 12px;
  height: 18px;
  margin: 0;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  font-weight: 500;
  font-family: Nunito;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  vertical-align: top;
}

/* ===== VIEWS ===== */
.view {
  padding: 16px 0 8px;
  animation: fadeIn 0.2s ease;
}

.view.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading,
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--hint);
  padding: 48px 16px;
  font-size: 14px;
  font-weight: 500;
}

/* ===== CATEGORIES ===== */
.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.categories.hidden {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-sec);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-xs);
}

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

.category-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(232, 117, 44, 0.35);
}

/* ===== CATALOG ===== */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}

.product-card {
  background: #ffffff !important;
  border: 1.5px solid #f0dfc8;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(58, 36, 21, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-xs);
}

.product-card img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  background: #fff0e2;
  display: block;
}

.product-card .img-placeholder,
.product-emoji {
  width: 100%;
  height: 128px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 52px;
  background: #fff0e2;
  background: -webkit-linear-gradient(315deg, #fff0e2, #ffe8cc);
  background: linear-gradient(135deg, #fff0e2, #ffe8cc);
}

.product-card .info {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card .name {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.35;
  color: #3a1a2e !important;
}

.product-card .desc {
  font-size: 11.5px;
  color: #c090b0 !important;
  flex: 1;
  line-height: 1.4;
}

.product-card .price {
  font-weight: 800;
  font-size: 16px;
  color: #c44b80 !important;
  font-family: 'Nunito', 'Inter', sans-serif;
}

/* ===== STOCK BADGES ===== */
.stock-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}

.stock-badge.stock-ok {
  background: var(--success-bg);
  color: var(--success);
}

.stock-badge.stock-low {
  background: var(--warning-bg);
  color: var(--warning);
}

.stock-badge.stock-out {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ===== QTY CONTROLS ===== */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface2);
  border-radius: var(--r-sm);
  padding: 4px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  border: none;
  background: var(--surface);
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

.qty-btn:active {
  transform: scale(0.9);
  background: var(--accent-soft);
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-row span {
  font-weight: 800;
  font-size: 14px;
}

.add-btn {
  width: 100%;
  border: none;
  background-color: #e8649a !important;
  background: -webkit-linear-gradient(315deg, #c44b80, #ff8ab8) !important;
  background: linear-gradient(135deg, #ff8ab8, #e8649a) !important;
  color: #ffffff !important;
  border-radius: 13px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(232, 100, 154, 0.35);
}

.add-btn:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.add-btn:disabled {
  background: #f5d4e8 !important;
  color: #c090b0 !important;
  box-shadow: none;
  cursor: not-allowed;
}

/* ===== CART ===== */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  gap: 12px;
}

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

.cart-item .price {
  font-size: 12px;
  color: var(--hint);
  margin-top: 2px;
}

/* ===== CHECKOUT ===== */
.checkout-block {
  padding: 0 16px 16px;
}

.checkout-block.hidden {
  display: none;
}

.checkout-block.hidden {
  display: none;
}

.checkout-discounts {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.bonus-balance-row {
  font-size: 14px;
  color: var(--text-sec);
  margin-bottom: 10px;
}

.bonus-balance-row strong {
  color: var(--accent-dark);
}

.bonus-spend-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sec);
  margin-bottom: 8px;
}

.bonus-spend-row input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 15px;
}

.cart-promo-applied {
  font-size: 13px;
  color: var(--accent-dark);
  margin: 0;
}

.cart-subtotal-line {
  font-size: 14px;
  color: var(--text-sec);
  text-decoration: line-through;
  font-weight: 500;
}

.cart-total {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 18px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-total::before {
  content: '🛒';
  font-size: 20px;
}

.delivery-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  background: var(--surface2);
  border-radius: var(--r-lg);
  padding: 5px;
}

.toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-sec);
  border-radius: var(--r-md);
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.toggle-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 117, 44, 0.3);
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--hint);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.address-picker {
  margin-bottom: 10px;
}

.address-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  min-height: 48px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.address-picker-trigger:active,
.address-picker-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 117, 44, 0.12);
}

.address-picker-trigger.is-placeholder .address-picker-value {
  color: var(--hint);
}

.address-picker-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-picker-chevron {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b09880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 8px;
}

.address-picker-card {
  max-height: 72vh;
  display: flex;
  flex-direction: column;
}

.address-picker-card h2 {
  margin-bottom: 14px;
}

.address-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.address-picker-empty {
  color: var(--hint);
  font-size: 14px;
  text-align: center;
  padding: 18px 8px;
}

.address-picker-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.address-picker-item:active {
  transform: scale(0.99);
}

.address-picker-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(232, 100, 154, 0.15);
}

.address-picker-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.address-picker-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-picker-item-text {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-sec);
  word-break: break-word;
}

.address-picker-radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}

.address-picker-item.selected .address-picker-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.address-picker-item.selected .address-picker-radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

.address-picker-close {
  margin-top: auto;
}

.new-address-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.new-address-form.hidden {
  display: none;
}

.new-address-form input,
.modal-card input,
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.new-address-form input:focus,
.modal-card input:focus,
.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 117, 44, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--hint);
  font-weight: 400;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: none;
  display: inline-block;
}

.link-btn:active {
  opacity: 0.7;
}

.btn-secondary {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:active {
  background: var(--surface2);
}

.btn-geo {
  border: 1.5px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, opacity 0.15s;
}

.btn-geo:active {
  background: #ffe3c4;
}

.btn-geo:disabled {
  opacity: 0.6;
  cursor: default;
}

#delivery-address-block.hidden,
#pickup-info-block.hidden {
  display: none;
}

.pickup-info {
  background: linear-gradient(135deg, #fff8f0, var(--accent-soft));
  border: 1.5px solid #f5d8b8;
  border-radius: var(--r-lg);
  padding: 16px;
  font-size: 13.5px;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text);
}

.pickup-info p {
  margin: 0;
}

.submit-btn {
  border: none;
  background-color: #e8649a !important;
  background: -webkit-linear-gradient(315deg, #c44b80, #ff8ab8) !important;
  background: linear-gradient(135deg, #ff8ab8, #c44b80) !important;
  color: #ffffff !important;
  border-radius: 18px;
  padding: 17px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
  width: 100%;
  box-shadow: 0 6px 24px rgba(232, 100, 154, 0.45);
  transition: opacity 0.15s, transform 0.12s;
  letter-spacing: 0.2px;
}

.submit-btn:active {
  opacity: 0.88;
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ===== ORDERS ===== */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
}

.order-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.2s ease;
}

.order-card .order-top {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}

.order-card .order-top span:last-child {
  color: var(--accent-dark);
}

.order-card .order-items {
  font-size: 12.5px;
  color: var(--hint);
  margin-bottom: 4px;
  font-weight: 500;
  line-height: 1.4;
}

.order-card .order-items a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.order-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-status.status-new {
  background: var(--warning-bg);
  color: var(--warning);
}

.order-status.status-done {
  background: var(--success-bg);
  color: var(--success);
}

.order-status.status-cancelled {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ===== SETTINGS ===== */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  margin: 0 16px 16px;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 16px;
  color: var(--text);
}

.profile-view {
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.profile-view .profile-name {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.profile-view .profile-phone {
  color: var(--hint);
  font-weight: 500;
  font-size: 14px;
}

.settings-addresses {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.address-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
  gap: 10px;
  transition: background 0.15s;
}

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

.address-item .address-title {
  font-weight: 700;
  color: var(--text);
}

.address-item .address-text {
  color: var(--hint);
  font-size: 12px;
  margin-top: 1px;
  line-height: 1.35;
  word-break: break-word;
}

.address-item button {
  border: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--r-xs);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.address-item button:active {
  background: #fecaca;
}

.badge-default {
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  background-color: #e8649a !important;
  background: linear-gradient(90deg, rgba(232, 100, 154, 1) 20%, rgba(249, 134, 176, 1) 50%, rgba(196, 75, 128, 1) 80%) !important;
  border-radius: 28px;
  box-shadow: 0 8px 28px rgba(232, 100, 154, 0.45);
  border: none;
  z-index: 40;
  padding: 0 4px;
  height: 64px;
  overflow: visible;
}

.nav-btn {
  flex: 1;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  height: 64px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0;
  /* Подписи скрыты */
  border-radius: 20px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-btn.active {
  color: #ffffff;
}

.nav-btn.active .nav-icon-wrap {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
}

.nav-icon-wrap {
  width: 44px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: background 0.2s ease;
}

/* Иконки белые в SVG — фильтры не нужны, только прозрачность */
.nav-svg {
  width: 26px;
  height: 26px;
  display: block;
  opacity: 0.6;
  filter: none;
  transition: opacity 0.2s ease;
}

.nav-btn.active .nav-svg {
  opacity: 1;
  filter: none;
}

.nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== FAB — центральная кнопка корзины ===== */
.nav-fab {
  flex: 1.1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  height: 64px;
  font-size: 0;
}

.nav-fab-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  /* Светлый кружок на розовом фоне */
  background: linear-gradient(135deg, #ffffff 0%, #ffe4f0 50%, #ffb3d1 100%);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4), 0 6px 20px rgba(180, 60, 110, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translate(-50%, -60%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: fabPulse 2.8s ease-in-out infinite;
}

.nav-fab:active .nav-fab-circle {
  transform: translate(-50%, -60%) scale(0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 3px 10px rgba(180, 60, 110, 0.3);
  animation: none;
}

.nav-svg-fab {
  width: 28px;
  height: 28px;
  /* Корзинка на светлом кружке — делаем розовой */
  filter: invert(1) sepia(1) hue-rotate(280deg) saturate(3) brightness(0.55);
  color: var(--accent-text);
  overflow: visible;
}

@keyframes fabPulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.40), 0 6px 20px rgba(180, 60, 110, 0.45);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18), 0 8px 26px rgba(180, 60, 110, 0.55);
  }
}

.nav-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

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

/* ===== LANG TOGGLE ===== */
.lang-toggle {
  display: flex;
  gap: 8px;
  background: var(--surface2);
  border-radius: var(--r-lg);
  padding: 5px;
}

.lang-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-sec);
  border-radius: var(--r-md);
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232, 100, 154, 0.3);
}

/* ===== CONTACTS ===== */
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.15s;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row:active {
  opacity: 0.7;
}

.contact-icon {
  font-size: 22px;
  width: 36px;
  text-align: center;
}

/* ===== BONUS SECTION ===== */
.bonus-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.bonus-icon-badge {
  font-size: 28px;
  width: 52px;
  height: 52px;
  background: var(--accent-soft);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bonus-desc {
  font-size: 12.5px;
  color: var(--hint);
  margin: 2px 0 0;
  font-weight: 500;
}

.giveaways-hint {
  font-size: 12px;
  color: var(--hint);
  margin: 0 0 10px;
  font-weight: 500;
}

/* Реферальная ссылка */
.ref-link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.ref-link-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-sec);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-copy {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-copy:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.ref-stats {
  display: flex;
  gap: 12px;
}

.ref-stat-item {
  flex: 1;
  background: var(--accent-soft);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: center;
}

.ref-stat-num {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: var(--accent-dark);
  font-family: 'Nunito', sans-serif;
}

.ref-stat-label {
  font-size: 10px;
  color: var(--hint);
  font-weight: 600;
  margin-top: 4px;
  display: block;
  line-height: 1.25;
}

.ref-stats-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.45;
  text-align: center;
}

.ref-stats-hint.hidden {
  display: none;
}

/* Промокод */
.promo-row {
  display: flex;
  gap: 10px;
}

.promo-input {
  flex: 1;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: border-color 0.15s;
}

.promo-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 100, 154, 0.12);
}

.btn-promo {
  border: none;
  background: linear-gradient(135deg, #ff8ab8, #e8649a);
  color: #fff;
  border-radius: var(--r-md);
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(232, 100, 154, 0.3);
  transition: opacity 0.15s, transform 0.1s;
}

.btn-promo:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.promo-result {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--r-sm);
}

.promo-result.success {
  background: var(--success-bg);
  color: var(--success);
}

.promo-result.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.promo-result.hidden {
  display: none;
}

/* Розыгрыши */
.giveaways-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
  overflow: hidden;
}

.giveaway-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface2);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  overflow: hidden;
}

.giveaway-card.has-image {
  flex-direction: column;
  gap: 0;
  padding: 0;
  align-items: stretch;
}

.giveaway-media {
  width: 100%;
  max-height: 132px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.giveaway-image {
  display: block;
  width: 100%;
  height: 132px;
  max-width: 100%;
  max-height: 132px;
  object-fit: cover;
  object-position: center;
}

.giveaway-card.has-image .giveaway-body {
  padding: 12px 14px 14px;
}

.giveaway-body {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.giveaway-description {
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.4;
  margin: 4px 0 6px;
}

.giveaway-winner-line {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-top: 4px;
}

.giveaway-emoji {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
}

.giveaway-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
}

.giveaway-date {
  font-size: 11.5px;
  color: var(--hint);
  font-weight: 500;
}

.giveaway-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.giveaway-meta {
  font-size: 11px;
  color: var(--hint);
  margin-top: 2px;
}

.btn-giveaway-join {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== REGISTRATION MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(30, 15, 5, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: modalIn 0.25s ease;
}

.modal.hidden {
  display: none;
}

@keyframes modalIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  background: var(--surface);
  color: var(--text);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 36px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.modal-card h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}

.modal-hint {
  font-size: 13.5px;
  color: var(--text-sec);
  margin: 0 0 6px;
  line-height: 1.5;
  font-weight: 400;
}

.reg-phone-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.reg-phone-row input {
  flex: 1;
}

.reg-phone-row .btn-secondary {
  background: var(--surface2);
  border-color: var(--border);
  font-size: 12.5px;
}

.modal-card .link-btn {
  text-align: center;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 60;
  max-width: 88%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  animation: toastIn 0.2s ease;
}

.toast.hidden {
  display: none;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ===== SECTION HEADERS ===== */
.section-title {
  font-size: 18px;
  font-weight: 900;
  padding: 0 16px;
  margin-bottom: 12px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}

/* ===== SETTINGS ADD ADDRESS BUTTON ===== */
#settings-save-address-btn {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, #ff8ab8, #e8649a);
  color: white;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(232, 100, 154, 0.35);
}

#settings-save-address-btn:active {
  transform: scale(0.98);
  opacity: 0.88;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  color: var(--hint);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 48px;
  opacity: 0.6;
}

/* ===== PRODUCT EMOJI ICONS ===== */
.product-emoji {
  width: 100%;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #fff8f0 0%, #ffe8cc 100%);
}