@font-face {
  font-family: 'NunitoCustom';
  src: url('../images/nunito-cyrillic-wght-normal-CY6AOgYE.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NunitoCustom';
  src: url('../images/nunito-latin-wght-normal-BzFMHfZw.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-main: 'NunitoCustom', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Luxury Pearl White Theme Palette (Default) */
  --bg-page: #EEF1F6;
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: rgba(255, 255, 255, 0.92);
  --bg-card-stage: linear-gradient(145deg, #F8FAFC 0%, #F1F5F9 52%, #FFF1F2 100%);
  --bg-card-stage-hover: linear-gradient(145deg, #FFF1F2 0%, #FFE4E6 55%, #FEF3C7 100%);
  --bg-special-box: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 52%, #FFFBEB 100%);
  --bg-input: #FFFFFF;
  --bg-chip: #FFFFFF;
  --bg-nav-dock: rgba(255, 255, 255, 0.88);
  --bg-nav-active: linear-gradient(135deg, rgba(229, 37, 42, 0.13) 0%, rgba(255, 90, 95, 0.06) 100%);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-on-brand: #FFFFFF;
  
  --brand-red: #E5252A;
  --brand-red-light: #FF4B4F;
  --brand-red-soft: rgba(229, 37, 42, 0.10);
  --brand-gradient: linear-gradient(135deg, #FF3B30 0%, #D91B22 100%);
  --brand-glow: 0 10px 24px -4px rgba(229, 37, 42, 0.38);
  --gold-accent: #F59E0B;
  --green-accent: #22C55E;
  
  --border-subtle: rgba(226, 232, 240, 0.9);
  --border-card: rgba(226, 232, 240, 0.85);
  --border-special: rgba(229, 37, 42, 0.18);
  
  --shadow-xs: 0 2px 6px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 6px 18px -4px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 14px 32px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 22px 48px -12px rgba(15, 23, 42, 0.14), 0 6px 18px -4px rgba(15, 23, 42, 0.06);
  --shadow-dock: 0 18px 42px -6px rgba(15, 23, 42, 0.14), 0 4px 14px rgba(15, 23, 42, 0.06);
  
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --radius-xl: 32px;
  --radius-pill: 9999px;
  
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Optional Dark Mode when user switches Тема -> Тёмная in Profile */
[data-theme="dark"] {
  --bg-page: #07080A;
  --bg-app: #0E1014;
  --bg-surface: #17191F;
  --bg-surface-elevated: rgba(24, 27, 34, 0.92);
  --bg-card-stage: linear-gradient(145deg, #22252D 0%, #1B1E25 60%, #2B191C 100%);
  --bg-card-stage-hover: linear-gradient(145deg, #2D1C20 0%, #232730 60%, #381B1E 100%);
  --bg-special-box: linear-gradient(135deg, #261214 0%, #17191F 60%, #211618 100%);
  --bg-input: #1A1D24;
  --bg-chip: #1A1D24;
  --bg-nav-dock: rgba(26, 28, 35, 0.88);
  --bg-nav-active: linear-gradient(135deg, rgba(229, 37, 42, 0.28) 0%, rgba(255, 90, 95, 0.10) 100%);
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.07);
  --border-special: rgba(229, 37, 42, 0.28);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.45);
  --shadow-dock: 0 20px 44px rgba(0, 0, 0, 0.65);
}

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

html, body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s var(--ease-spring), color 0.35s var(--ease-spring);
}

button, input, select, textarea {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

button {
  cursor: pointer;
  user-select: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 99px;
}

/* ==========================================================================
   DESKTOP / TABLET PREVIEW BAR & MINI APP SHELL
   ========================================================================== */
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-secondary);
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s var(--ease-spring);
}

.toolbar-btn:hover {
  color: var(--text-primary);
  border-color: var(--brand-red-light);
}

.toolbar-btn.active {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: var(--brand-glow);
}

/* Main App Container */
.tma-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg-app);
  background-image:
    radial-gradient(circle at 95% 4%, rgba(229, 37, 42, 0.06) 0%, transparent 42%),
    radial-gradient(circle at 5% 28%, rgba(245, 158, 11, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(229, 37, 42, 0.04) 0%, transparent 50%);
  padding-bottom: 118px;
  overflow-x: hidden;
  transition: max-width 0.4s var(--ease-spring), border-radius 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring);
}

/* The app opens directly as a Mini App; no desktop preview controls or mock
   Telegram chrome are rendered above it. */

@media (min-width: 768px) {
  body {
    padding: 0;
  }

  .tma-shell {
    width: calc(100% - 48px);
    max-width: 1320px;
    min-height: 100vh;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .special-offers-box {
    margin: 8px 24px 22px;
    padding: 20px;
  }

  .profile-container {
    max-width: 760px;
    margin: 0 auto;
    padding-top: 24px;
  }

  .favorites-view {
    max-width: 1080px;
    margin: 0 auto;
    padding: 30px 28px 42px;
  }

  .favorites-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }

  .favorite-product-stage {
    height: 190px;
  }

  .bottom-dock-wrap {
    width: min(560px, calc(100% - 48px));
    max-width: none;
  }

  .hero-carousel-section {
    max-width: 980px;
    margin: 0 auto;
  }

  .hero-carousel-track {
    gap: 0;
  }

  .hero-slide {
    min-width: 100%;
  }
}

/* ==========================================================================
   HEADER (AVATAR + GREETING + LOCATION + LANG + NOTIFICATION BELL)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 12px;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: all 0.25s var(--ease-spring);
}

.app-header.scrolled {
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.header-user-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.avatar-ring-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #FF3B30, #F59E0B);
  box-shadow: 0 6px 16px rgba(229, 37, 42, 0.22);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-bounce);
}

.avatar-ring-btn:active, .avatar-ring-btn:hover {
  transform: scale(1.06);
}

.avatar-ring-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-surface);
}

.avatar-online-badge {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-accent);
  border: 2px solid var(--bg-surface);
}

.header-info {
  min-width: 0;
  flex: 1;
}

.greeting-line {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.greeting-line strong {
  font-weight: 800;
  color: var(--text-primary);
}

.location-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  text-align: left;
  padding: 2px 6px 2px 0;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.location-selector-btn:hover {
  opacity: 0.85;
}

.loc-pin-3d {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(229, 37, 42, 0.25));
  animation: pinBounce 3s ease-in-out infinite;
}

@keyframes pinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.loc-address-text {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.loc-chevron {
  width: 15px;
  height: 15px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform 0.25s;
}

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

.lang-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  transition: all 0.25s var(--ease-spring);
}

.lang-pill-btn:hover {
  border-color: var(--brand-red);
  transform: translateY(-1px);
}

.notif-bell-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease-bounce);
}

.notif-bell-btn:hover, .notif-bell-btn:active {
  transform: scale(1.07);
  border-color: rgba(229, 37, 42, 0.3);
  box-shadow: var(--shadow-md);
}

.notif-bell-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  animation: bellSwing 4s ease-in-out infinite;
}

@keyframes bellSwing {
  0%, 85%, 100% { transform: rotate(0deg); }
  90% { transform: rotate(10deg); }
  95% { transform: rotate(-10deg); }
}

.notif-dot-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-red);
  border: 2px solid var(--bg-surface);
}

/* ==========================================================================
   SEARCH BAR
   ========================================================================== */
.search-section {
  padding: 6px 16px 14px;
}

.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 50px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease-spring);
}

.search-box-wrap:focus-within {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px var(--brand-red-soft), var(--shadow-md);
  transform: translateY(-1px);
}

.search-icon-svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 10px;
}

.search-input {
  width: 100%;
  height: 100%;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.search-clear-btn {
  display: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-app);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.search-clear-btn.visible {
  display: inline-flex;
}

.search-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--brand-red-soft);
  color: var(--brand-red);
  margin-left: 6px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.search-filter-btn:hover {
  background: var(--brand-red);
  color: #FFFFFF;
}

/* ==========================================================================
   HERO PROMO CAROUSEL (5 SLIDES WITH 3D BIR TA'M ASSETS)
   ========================================================================== */
.hero-carousel-section {
  padding: 0 16px 14px;
}

.hero-carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-carousel-track {
  display: flex;
  transition: transform 0.55s var(--ease-spring);
  will-change: transform;
}

.hero-slide {
  min-width: 100%;
  position: relative;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  min-height: 188px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

/* Slide 1: Signature Bir Ta'm Luxury White-Crimson Card */
.hero-slide-1 {
  background:
    radial-gradient(circle at 82% 50%, rgba(229, 37, 42, 0.16) 0%, rgba(229, 37, 42, 0.03) 55%, transparent 75%),
    linear-gradient(135deg, #FFFFFF 0%, #FFF5F5 58%, #FFE4E6 100%);
  border-color: rgba(229, 37, 42, 0.18);
}
[data-theme="dark"] .hero-slide-1 {
  background: radial-gradient(circle at 80% 50%, rgba(229, 37, 42, 0.35) 0%, #241114 60%, #16181E 100%);
}

/* Slide 2: Studio Burger Combo Card */
.hero-slide-2 {
  background:
    radial-gradient(circle at 85% 45%, rgba(245, 158, 11, 0.18) 0%, transparent 60%),
    linear-gradient(135deg, #FFFFFF 0%, #FFFBEB 55%, #FEF3C7 100%);
  border-color: rgba(245, 158, 11, 0.25);
}
[data-theme="dark"] .hero-slide-2 {
  background: linear-gradient(135deg, #1E1912 0%, #2B1F14 100%);
}

/* Slide 3: Gift Bonus Card */
.hero-slide-3 {
  background:
    radial-gradient(circle at 80% 50%, rgba(229, 37, 42, 0.14) 0%, transparent 60%),
    linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 50%, #FCE7F3 100%);
  border-color: rgba(236, 72, 153, 0.2);
}
[data-theme="dark"] .hero-slide-3 {
  background: linear-gradient(135deg, #1B1520 0%, #291522 100%);
}

/* Slide 4: Express Delivery 25 Min Card */
.hero-slide-4 {
  background:
    radial-gradient(circle at 82% 50%, rgba(34, 197, 94, 0.14) 0%, transparent 60%),
    linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 58%, #DCFCE7 100%);
  border-color: rgba(34, 197, 94, 0.22);
}
[data-theme="dark"] .hero-slide-4 {
  background: linear-gradient(135deg, #122019 0%, #162920 100%);
}

/* Slide 5: VIP Cashback & Promo Card */
.hero-slide-5 {
  background:
    radial-gradient(circle at 82% 50%, rgba(59, 130, 246, 0.14) 0%, transparent 60%),
    linear-gradient(135deg, #FFFFFF 0%, #EFF6FF 58%, #DBEAFE 100%);
  border-color: rgba(59, 130, 246, 0.22);
}
[data-theme="dark"] .hero-slide-5 {
  background: linear-gradient(135deg, #131B29 0%, #172336 100%);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 58%;
}

.hero-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(229, 37, 42, 0.10);
  color: var(--brand-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-brand-heading {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.hero-brand-heading .red-accent {
  color: var(--brand-red);
}

.hero-subtext {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.38;
  margin-bottom: 14px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--brand-glow);
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}

.hero-cta-btn:hover, .hero-cta-btn:active {
  transform: translateY(-2px) scale(1.03);
}

.hero-slide-visual {
  position: relative;
  z-index: 2;
  width: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide-visual img {
  max-height: 142px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.16));
  animation: float3D 4.2s ease-in-out infinite;
}

@keyframes float3D {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

/* Carousel Dots */
.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.45);
  transition: all 0.35s var(--ease-spring);
}

.hero-dot.active {
  width: 24px;
  background: var(--brand-red);
  box-shadow: 0 2px 8px rgba(229, 37, 42, 0.35);
}

/* ==========================================================================
   CATEGORIES HORIZONTAL SCROLLER
   ========================================================================== */
.section-block {
  padding: 8px 16px 14px;
}

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

.section-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-3d-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.12));
}

.section-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-see-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand-red);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  transition: background 0.2s, transform 0.2s;
}

.section-see-all:hover {
  background: var(--brand-red-soft);
  transform: translateX(2px);
}

.categories-strip {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.categories-strip::-webkit-scrollbar {
  display: none;
}

.category-card-item {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 78px;
  flex-shrink: 0;
  background: transparent;
  transition: transform 0.25s var(--ease-bounce);
}

.category-card-item:hover, .category-card-item:active {
  transform: translateY(-3px);
}

.category-squircle {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  position: relative;
  overflow: hidden;
  transition: all 0.28s var(--ease-spring);
}

.category-squircle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(229, 37, 42, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.28s;
}

.category-card-item.active .category-squircle {
  border-color: var(--brand-red);
  background: linear-gradient(145deg, #FFFFFF 0%, #FFF1F2 100%);
  box-shadow: 0 10px 22px -6px rgba(229, 37, 42, 0.25);
}
[data-theme="dark"] .category-card-item.active .category-squircle {
  background: linear-gradient(145deg, #271619 0%, #1B1D24 100%);
}

.category-card-item.active .category-squircle::before {
  opacity: 1;
}

.category-squircle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 5px 10px rgba(15, 23, 42, 0.12));
  transition: transform 0.3s var(--ease-bounce);
}

.category-card-item:hover .category-squircle img,
.category-card-item.active .category-squircle img {
  transform: scale(1.1);
}

.category-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s;
}

.category-card-item.active .category-name {
  color: var(--brand-red);
}

/* ==========================================================================
   PRODUCT CARDS & SPECIAL OFFERS CONTAINER
   ========================================================================== */
.special-offers-box {
  margin: 4px 16px 16px;
  padding: 16px 14px 16px;
  border-radius: var(--radius-xl);
  background: var(--bg-special-box);
  border: 1.5px solid var(--border-special);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

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

.product-card {
  position: relative;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 24px;
  padding: 9px 9px 13px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.3s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(229, 37, 42, 0.25);
}

.product-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.94;
  border-radius: 18px;
  background: var(--bg-card-stage);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: background 0.3s;
}

.product-card:hover .product-stage {
  background: var(--bg-card-stage-hover);
}

.product-stage-img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(15, 23, 42, 0.15));
  transition: transform 0.38s var(--ease-bounce);
}

.product-card:hover .product-stage-img {
  transform: translateY(-4px) scale(1.07);
}

/* Badges on top-left of product stage */
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.badge-discount {
  background: var(--brand-gradient);
  color: #FFFFFF;
}

.badge-new {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.badge-spicy {
  background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
  color: #FFFFFF;
}

.badge-hit {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
}

/* Favorite Heart Button on top-right of product stage */
.fav-heart-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  transition: all 0.25s var(--ease-bounce);
}
[data-theme="dark"] .fav-heart-btn {
  background: rgba(24, 27, 34, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
}

.fav-heart-btn:hover {
  transform: scale(1.12);
}

.fav-heart-btn.liked {
  color: var(--brand-red);
  background: #FFF1F2;
  border-color: rgba(229, 37, 42, 0.25);
  animation: heartPop 0.35s var(--ease-bounce);
}

@keyframes heartPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.product-info-body {
  padding: 0 4px;
}

.product-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-desc {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 11px;
}

.product-footer-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding: 0 4px;
  margin-top: auto;
}

.price-stack {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
}

.price-current.discounted {
  color: var(--brand-red);
}

.price-old {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-top: 1px;
}

.add-plus-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 6px 16px -3px rgba(229, 37, 42, 0.45);
  flex-shrink: 0;
  transition: transform 0.22s var(--ease-bounce), box-shadow 0.22s;
}

.add-plus-btn:hover, .add-plus-btn:active {
  transform: scale(1.1);
  box-shadow: 0 8px 20px -2px rgba(229, 37, 42, 0.6);
}

.card-qty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 4px 6px;
  height: 36px;
  box-shadow: 0 6px 16px -3px rgba(229, 37, 42, 0.4);
}

.card-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
}

.card-qty-val {
  font-size: 13px;
  font-weight: 900;
  min-width: 14px;
  text-align: center;
}

/* ==========================================================================
   ECOSYSTEM / HOW IT WORKS / BRANCHES / TESTIMONIALS (USING ALL ZIP ASSETS)
   ========================================================================== */
.how-it-works-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.step-visual-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s;
}

.step-visual-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.step-num-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-red-soft);
  color: var(--brand-red);
  font-size: 10.5px;
  font-weight: 900;
  margin-bottom: 6px;
}

.step-visual-card img {
  height: 56px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.step-visual-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.branches-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
.branches-scroller::-webkit-scrollbar { display: none; }

.branch-card {
  min-width: 245px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.25s;
}

.branch-card:hover {
  border-color: var(--brand-red);
  box-shadow: var(--shadow-sm);
}

.branch-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.branch-meta h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.branch-meta p {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.branch-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #16A34A;
  background: rgba(34, 197, 94, 0.12);
  padding: 2px 8px;
  border-radius: 99px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.partner-mini-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 118px;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.partner-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.partner-mini-card:hover img {
  transform: scale(1.06);
}

.partner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.15) 65%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  color: #FFFFFF;
}

.partner-overlay h4 {
  font-size: 13.5px;
  font-weight: 800;
}

.partner-overlay span {
  font-size: 11px;
  font-weight: 700;
  color: #FDE047;
}

/* ==========================================================================
   VIEWS & TAB SWITCHING
   ========================================================================== */
.tab-view {
  display: none;
  animation: viewFadeIn 0.32s var(--ease-spring);
}

.tab-view.active {
  display: block;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-top-title-bar {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-large-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ==========================================================================
   EMPTY STATE (CART & ORDERS - EXACT MATCH TO SCREENSHOTS 6 & 7 IN LUXURY WHITE)
   ========================================================================== */
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 24px 36px;
  margin: 12px 16px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
}

.empty-3d-squircle {
  width: 118px;
  height: 118px;
  border-radius: 32px;
  background: var(--bg-card-stage);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  margin-bottom: 22px;
  animation: float3D 4s ease-in-out infinite;
}

.empty-3d-squircle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(229, 37, 42, 0.2));
}

.empty-state-title {
  font-size: 21px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 260px;
  line-height: 1.45;
  margin-bottom: 24px;
}

.primary-red-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 270px;
  height: 54px;
  border-radius: 20px;
  background: var(--brand-gradient);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 28px -4px rgba(229, 37, 42, 0.45);
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}

.primary-red-pill-btn:hover, .primary-red-pill-btn:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 32px -4px rgba(229, 37, 42, 0.58);
}

/* Segmented Tabs (Orders: Активные | История) */
.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  padding: 5px;
  border-radius: 20px;
  margin: 4px 16px 16px;
  box-shadow: var(--shadow-xs);
}

.segment-btn {
  height: 42px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-spring);
}

.segment-btn.active {
  background: var(--bg-app);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   CART FILLED VIEW
   ========================================================================== */
.cart-filled-container {
  padding: 0 16px 24px;
}

.free-delivery-banner {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 20px;
  padding: 13px 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}

.free-del-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 8px;
}

.free-del-bar-bg {
  height: 7px;
  background: var(--bg-app);
  border-radius: 99px;
  overflow: hidden;
}

.free-del-bar-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 99px;
  transition: width 0.4s var(--ease-spring);
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 22px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}

.cart-item-thumb {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  background: var(--bg-card-stage);
  padding: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cart-item-meta {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 900;
  color: var(--brand-red);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 6px;
}

.qty-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.qty-step-btn.plus {
  background: var(--brand-gradient);
  color: #FFFFFF;
}

.qty-step-num {
  font-size: 13.5px;
  font-weight: 900;
  min-width: 16px;
  text-align: center;
}

.cart-promo-card, .cart-summary-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 22px;
  padding: 14px 16px;
  margin-top: 12px;
  box-shadow: var(--shadow-xs);
}

.promo-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-input-row input {
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.promo-apply-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  background: var(--brand-gradient);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.summary-line.total {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-primary);
  padding-top: 10px;
  margin-top: 6px;
  margin-bottom: 0;
  border-top: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   PROFILE VIEW (EXACT MATCH TO SCREENSHOTS 8 & 9 IN LUXURY WHITE)
   ========================================================================== */
.profile-container {
  padding: 12px 16px 28px;
}

.profile-hero-card {
  background:
    radial-gradient(circle at 90% 10%, rgba(229, 37, 42, 0.14) 0%, transparent 55%),
    var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 28px;
  padding: 20px 18px 18px;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}

.profile-user-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-avatar-large {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid var(--bg-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14), 0 0 0 2px var(--brand-red);
  flex: 0 0 auto;
  overflow: visible;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.profile-avatar-status {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--bg-surface);
  border-radius: 50%;
  background: var(--green-accent);
}

.profile-user-details h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
}

.profile-handle {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.add-phone-btn {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-stat-box {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.22s;
}

.profile-stat-box:hover {
  border-color: var(--brand-red);
  transform: translateY(-2px);
}

.stat-orders-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-orders-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-fav-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-fav-inline img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.profile-group-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.profile-row-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  transition: background 0.2s;
}

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

.profile-row-item:hover {
  background: rgba(148, 163, 184, 0.06);
}

.profile-row-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-icon-squircle {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg-card-stage);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  flex-shrink: 0;
}

.profile-icon-squircle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Dedicated favorites page ------------------------------------------------ */
.favorites-view {
  min-height: calc(100vh - 118px);
  padding: 20px 14px 30px;
}

.favorites-page-head h1 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 900;
  color: var(--text-primary);
}

.favorites-page-content {
  padding-top: 16px;
}

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

.favorite-product-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border-card);
  border-radius: 25px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.favorite-product-stage {
  position: relative;
  height: 142px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg-card-stage);
}

.favorite-product-stage img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(15, 23, 42, 0.18));
}

.favorite-remove-btn {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-card);
  border-radius: 50%;
  color: var(--brand-red);
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}

.favorite-remove-btn svg { width: 17px; height: 17px; fill: currentColor; }

.favorite-product-info { padding: 10px 4px 3px; }
.favorite-product-info h2 { overflow: hidden; font-size: 15px; font-weight: 900; white-space: nowrap; text-overflow: ellipsis; color: var(--text-primary); }
.favorite-product-info p { min-height: 19px; overflow: hidden; margin-top: 2px; font-size: 11.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: var(--text-muted); }

.favorite-product-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; }
.favorite-product-price { font-size: 15px; font-weight: 900; color: var(--text-primary); white-space: nowrap; }
.favorite-add-btn { width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--brand-gradient); font-size: 26px; font-weight: 600; line-height: 1; box-shadow: var(--brand-glow); }

.favorites-empty { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 18px 80px; text-align: center; }
.favorites-empty-icon { width: 112px; height: 112px; display: grid; place-items: center; margin-bottom: 22px; border: 1px solid var(--border-card); border-radius: 34px; background: var(--bg-card-stage); box-shadow: var(--shadow-md); }
.favorites-empty-icon img { width: 70px; height: 70px; object-fit: contain; }
.favorites-empty h2 { font-size: 18px; font-weight: 900; color: var(--text-primary); }
.favorites-empty p { max-width: 250px; margin: 7px 0 26px; font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--text-muted); }
.favorites-empty .primary-red-pill-btn { width: 260px; max-width: 100%; }

@media (max-width: 360px) {
  .favorite-product-stage { height: 126px; }
}

.profile-row-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

/* iOS / Telegram Green Switch */
.ios-switch {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 99px;
  background: #CBD5E1;
  padding: 3px;
  transition: background 0.28s var(--ease-spring);
}

.ios-switch.on {
  background: var(--green-accent);
}

.ios-switch-knob {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.28s var(--ease-spring);
}

.ios-switch.on .ios-switch-knob {
  transform: translateX(20px);
}

/* Theme 3-way selector inside Profile Group */
.theme-selector-block {
  padding: 14px 16px 16px;
}

.theme-label-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.theme-pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: 16px;
}

.theme-pill-option {
  height: 36px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-spring);
}

.theme-pill-option.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   FLOATING GLASSMORPHIC BOTTOM NAVIGATION DOCK (5 3D ICONS)
   ========================================================================== */
.bottom-dock-wrap {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 412px;
  z-index: 60;
  pointer-events: none;
}

.bottom-glass-dock {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 6px;
  border-radius: 30px;
  background: var(--bg-nav-dock);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-dock);
}

.dock-nav-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px 6px;
  border-radius: 22px;
  color: var(--text-muted);
  transition: all 0.28s var(--ease-spring);
}

.dock-nav-btn.active {
  background: var(--bg-nav-active);
  color: var(--brand-red);
  box-shadow: inset 0 0 0 1px rgba(229, 37, 42, 0.16);
}

.dock-icon-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-icon-wrap img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: grayscale(18%) opacity(0.78);
  transition: transform 0.3s var(--ease-bounce), filter 0.3s;
}

.dock-nav-btn.active .dock-icon-wrap img,
.dock-nav-btn:hover .dock-icon-wrap img {
  filter: grayscale(0%) opacity(1) drop-shadow(0 4px 8px rgba(229, 37, 42, 0.28));
  transform: translateY(-2px) scale(1.08);
}

.dock-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dock-cart-badge {
  position: absolute;
  top: -4px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--brand-gradient);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 6px rgba(229, 37, 42, 0.4);
}

.dock-cart-badge.visible {
  display: inline-flex;
  animation: heartPop 0.35s var(--ease-bounce);
}

/* ===========================================================================
   COMPACT RED PROMO CAROUSEL
   ========================================================================== */
.hero-carousel-section { padding: 0 16px 14px; overflow: hidden; }
.hero-carousel-viewport { overflow: visible; box-shadow: none; border-radius: 0; }
.hero-carousel-track { gap: 12px; }
.hero-slide {
  min-width: calc(100% - 40px);
  min-height: 176px;
  padding: 20px;
  border: 0;
  border-radius: 27px;
  background: linear-gradient(135deg, #FF4D46 0%, #D51F25 100%) !important;
  color: #fff;
  box-shadow: 0 12px 22px rgba(217, 27, 34, 0.22);
}
.hero-slide::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 95% 0%, rgba(255,255,255,.18), transparent 38%); pointer-events: none; }
.hero-slide-content { max-width: 57%; }
.hero-tag-pill { display: none; }
.hero-brand-heading { color: #fff; font-size: 23px; margin-bottom: 5px; }
.hero-brand-heading .red-accent, .hero-slide-4 .hero-brand-heading span, .hero-slide-5 .hero-brand-heading span { color: #fff !important; }
.hero-subtext { color: rgba(255,255,255,.88); font-size: 12.5px; line-height: 1.25; margin-bottom: 13px; }
.hero-cta-btn, .hero-slide-4 .hero-cta-btn, .hero-slide-5 .hero-cta-btn { padding: 10px 17px; background: #fff !important; color: var(--brand-red); box-shadow: none; }
.hero-slide-visual { width: 43%; align-self: stretch; }
.hero-slide-visual img { max-width: 142px; max-height: 150px; filter: drop-shadow(0 12px 16px rgba(85, 12, 15, .28)); }
.hero-dots { margin-top: 12px; }
.hero-dot { width: 6px; height: 6px; }
.hero-dot.active { width: 19px; background: var(--brand-red); }

/* Desktop home sections use a compact editorial grid instead of one long
   vertical column.  Mobile keeps the existing single-column flow. */
@media (min-width: 768px) {
  #homeStandardSections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 4px 12px 36px;
  }

  #homeStandardSections > .section-block,
  #homeStandardSections > .special-offers-box {
    min-width: 0;
    margin: 0;
    padding: 16px;
  }

  #homeStandardSections .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #homeStandardSections > .section-block:last-child {
    grid-column: 1 / -1;
  }

  #homeStandardSections > .section-block:last-child .branches-scroller,
  #homeStandardSections > .section-block:last-child .partner-grid {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===========================================================================
   DELIVERY / PICKUP ADDRESS SHEET
   ========================================================================== */
.address-sheet .bottom-sheet-card { padding: 10px 16px 24px; background: #F7F7F9; }
.address-sheet .sheet-handle { margin-bottom: 10px; background: rgba(15, 23, 42, .22); }
.delivery-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 17px; background: #E7E7EA; }
.delivery-mode-tabs button { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 13px; color: #74747A; font-size: 13px; font-weight: 800; }
.delivery-mode-tabs button.active { background: #fff; color: #202026; box-shadow: 0 2px 5px rgba(15,23,42,.14); }
.delivery-mode-tabs img { width: 25px; height: 25px; object-fit: contain; }
.delivery-choice-card { width: 100%; min-height: 90px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 2px solid #FF7777; border-radius: 21px; background: #fff; text-align: left; }
.delivery-choice-card > img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.delivery-choice-card span { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.delivery-choice-card strong { font-size: 14px; font-weight: 900; color: #25252B; }
.delivery-choice-card small { overflow: hidden; color: #94949B; font-size: 12px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.delivery-choice-card b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #F0F0F2; color: #33333A; font-size: 22px; }
.delivery-choice-card em { padding: 4px 8px; border-radius: 99px; background: #DDF7E5; color: #26A85A; font-size: 10px; font-style: normal; font-weight: 900; }
.add-address-outline { width: 100%; min-height: 54px; margin-top: 10px; border: 1.5px dashed #D5D5DA; border-radius: 18px; color: #27272D; background: transparent; font-size: 14px; font-weight: 800; text-align: left; padding: 0 18px; }
.add-address-outline::first-letter { color: var(--brand-red); }
.address-form { display: flex; flex-direction: column; gap: 12px; }
.address-form input { width: 100%; height: 48px; padding: 0 15px; border: 1px solid #E8E8EC; border-radius: 15px; color: #24242A; background: #fff; font-size: 14px; font-weight: 700; }
.address-form input::placeholder { color: #A4A4AB; }
.address-form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.address-form-row input { min-width: 0; padding: 0 11px; }
.address-geolocation { min-height: 48px; border-radius: 15px; background: #fff; box-shadow: 0 8px 16px rgba(15,23,42,.06); color: #25252B; font-size: 14px; font-weight: 900; }
.address-geolocation::first-letter { color: var(--brand-red); }
.address-default-switch { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; color: #28282E; font-size: 13px; font-weight: 800; }
.address-default-switch input { position: absolute; opacity: 0; }
.address-default-switch i { width: 50px; height: 30px; position: relative; border-radius: 99px; background: #DADADD; }
.address-default-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: transform .2s; }
.address-default-switch input:checked + i { background: var(--brand-red); }
.address-default-switch input:checked + i::after { transform: translateX(20px); }
.address-save-btn { max-width: none; margin-top: 2px; }

/* ========================================================================== 
   MODALS / BOTTOM SHEETS (PRODUCT DETAIL, ADDRESSES, NOTIFICATIONS, SUPPORT)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.sheet-backdrop.open {
  display: flex;
  opacity: 1;
}

.bottom-sheet-card {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: 30px 30px 0 0;
  padding: 14px 20px 28px;
  box-shadow: 0 -14px 44px rgba(15, 23, 42, 0.22);
  animation: sheetSlideUp 0.34s var(--ease-spring);
}

@media (min-width: 768px) {
  .sheet-backdrop {
    align-items: center;
  }
  .bottom-sheet-card {
    border-radius: 30px;
  }
}

@keyframes sheetSlideUp {
  from { transform: translateY(40px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.4);
  margin: 0 auto 14px;
}

.sheet-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-app);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

/* Toast Notification */
.tma-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 120;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.35s var(--ease-bounce);
  pointer-events: none;
}

.tma-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
