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

html {
  overflow-x: hidden;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  height: 100%;
  position: fixed;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: 
    radial-gradient(ellipse at top left, rgba(255, 250, 245, 1) 0%, transparent 50%),
    radial-gradient(ellipse at top right, rgba(245, 237, 225, 1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(250, 245, 235, 1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 248, 235, 1) 0%, transparent 50%),
    linear-gradient(135deg, #faf9f7 0%, #f5f3f0 50%, #faf5ed 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  color: #1f2937;
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  height: 100%;
  touch-action: pan-y;
  position: fixed;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.6s ease-out;
  pointer-events: auto;
  background: 
    radial-gradient(ellipse at center, rgba(166, 139, 91, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse at top left, rgba(255, 250, 245, 1) 0%, transparent 50%),
    radial-gradient(ellipse at top right, rgba(245, 237, 225, 1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(250, 245, 235, 1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 248, 235, 1) 0%, transparent 50%),
    linear-gradient(135deg, #faf9f7 0%, #f5f3f0 50%, #faf5ed 100%);
  background-size: 100% 100%, 200% 200%, 200% 200%, 200% 200%, 200% 200%, 200% 200%;
}

.splash-screen.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  display: none !important;
}

.splash-screen.fade-out {
  pointer-events: none !important;
}

.splash-screen.fade-out {
  pointer-events: none;
}

.splash-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at center, rgba(166, 139, 91, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse at top left, rgba(255, 250, 245, 1) 0%, transparent 50%),
    radial-gradient(ellipse at top right, rgba(245, 237, 225, 1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(250, 245, 235, 1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 248, 235, 1) 0%, transparent 50%),
    linear-gradient(135deg, #faf9f7 0%, #f5f3f0 50%, #faf5ed 100%);
  background-size: 100% 100%, 200% 200%, 200% 200%, 200% 200%, 200% 200%, 200% 200%;
  animation: gradientShift 15s ease infinite;
}

.splash-logo {
  position: relative;
  z-index: 1;
  max-width: 280px;
  width: 80%;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: splashLogoAppear 1s ease-out 0.3s forwards,
             splashLogoDisappear 0.5s ease-in 2.3s forwards;
}

@keyframes splashLogoAppear {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splashLogoDisappear {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.app {
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height для мобильных */
  display: flex;
  flex-direction: column;
  background: 
    linear-gradient(135deg, 
      rgba(166, 139, 91, 0.1) 0%, 
      rgba(212, 196, 176, 0.15) 25%,
      rgba(245, 243, 240, 0.2) 50%,
      rgba(212, 196, 176, 0.15) 75%,
      rgba(139, 115, 85, 0.1) 100%
    ),
    radial-gradient(ellipse at top left, rgba(166, 139, 91, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(139, 115, 85, 0.08) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='tobacco' x='0' y='0' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='50' cy='50' r='1.5' fill='%23a68b5b' opacity='0.15'/%3E%3Ccircle cx='25' cy='25' r='1' fill='%238b7355' opacity='0.1'/%3E%3Ccircle cx='75' cy='75' r='1' fill='%238b7355' opacity='0.1'/%3E%3Ccircle cx='75' cy='25' r='1.2' fill='%23a68b5b' opacity='0.12'/%3E%3Ccircle cx='25' cy='75' r='1.2' fill='%23a68b5b' opacity='0.12'/%3E%3Cpath d='M20,20 Q30,10 40,20 T60,20' stroke='%23d4c4b0' stroke-width='0.5' fill='none' opacity='0.2'/%3E%3Cpath d='M25,25 Q35,15 45,25 T65,25' stroke='%23d4c4b0' stroke-width='0.5' fill='none' opacity='0.15'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23tobacco)'/%3E%3C/svg%3E"),
    linear-gradient(to bottom, #faf9f7 0%, #f5f3f0 50%, #faf9f7 100%);
  background-size: auto, auto, auto, 200px 200px, 100% 100%;
  background-attachment: fixed;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  opacity: 1;
  z-index: 1;
  visibility: visible;
}

/* Убеждаемся, что интерфейс виден после анимации */
.app.visible {
  opacity: 1 !important;
  z-index: 10001 !important;
  visibility: visible !important;
  display: flex !important;
}

/* Понижаем z-index .app когда открыто модальное окно */
.app.modal-open {
  z-index: 1 !important;
}

.app-header {
  padding: 16px 16px 10px;
  transition: opacity 0.2s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.5s, max-height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
  visibility: visible;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  max-height: 500px;
  overflow: hidden;
  background: 
    linear-gradient(135deg, 
      rgba(255, 252, 248, 0.98) 0%, 
      rgba(250, 247, 243, 0.95) 25%,
      rgba(255, 255, 255, 0.9) 50%,
      rgba(250, 247, 243, 0.85) 75%,
      rgba(245, 242, 238, 0.8) 100%
    );
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 
    0 4px 20px rgba(139, 115, 85, 0.12),
    0 2px 8px rgba(139, 115, 85, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-100%);
  opacity: 0;
}

.app.visible .app-header {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Анимация для фильтров - выезжают сверху при загрузке */
.app-header .filter-dropdown {
  transform: translateY(-100%) !important;
}

.app.visible .app-header .filter-dropdown {
  transform: translateY(-10px) !important;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.5s !important;
}

.app.visible .app-header .filter-dropdown.is-open {
  transform: translateY(0) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bottom-nav {
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.8s;
  opacity: 0;
}

.app.visible .bottom-nav {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.content {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out 2.8s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.8s;
  position: relative;
  z-index: 1;
  visibility: visible;
  display: block;
}

.app.visible .content {
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
}

/* Анимация для продуктов - выезжают снизу */
.products {
  transform: translateY(50px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.8s, opacity 0.6s ease-out 2.8s;
  visibility: visible;
}

.app.visible .products {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Добавляем анимированный блеск для header */
.app-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 8s infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

.app-header.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

.header-title {
  flex: 1;
  text-align: left;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #8b7355 0%, #c9a86a 25%, #a68b5b 50%, #c9a86a 75%, #8b7355 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s ease infinite;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(139, 115, 85, 0.1));
}

@keyframes gradientFlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.brand::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(166, 139, 91, 0.5), transparent);
  border-radius: 2px;
}

.subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 249, 247, 0.9));
  backdrop-filter: blur(10px);
  color: #8b7355;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.1);
  flex-shrink: 0;
  min-width: 80px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  align-self: center;
}

.filter-toggle.is-open {
  background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(166, 139, 91, 0.08));
  border-color: rgba(139, 115, 85, 0.4);
}

.filter-toggle:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(250, 249, 247, 0.95));
  border-color: rgba(201, 168, 106, 0.5);
  box-shadow: 
    0 6px 20px rgba(139, 115, 85, 0.2),
    0 3px 10px rgba(201, 168, 106, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 1),
    0 0 15px rgba(201, 168, 106, 0.1);
  transform: translateY(-2px);
}

.filter-toggle:active {
  transform: translateY(0);
}

.filter-label {
  font-size: 13px;
  font-weight: 500;
}

.filter-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.filter-arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.filter-toggle.is-open .filter-arrow {
  transform: rotate(180deg);
}

.filter-dropdown {
  margin-top: 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  padding: 0 16px;
}

.filter-dropdown.is-open {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding-bottom: 8px;
}

.category-tabs {
  margin-top: 0;
  display: flex;
  gap: 8px;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 249, 247, 0.85));
  backdrop-filter: blur(10px);
  padding: 4px;
  border-radius: 999px;
  position: relative;
  box-shadow: 
    0 2px 12px rgba(139, 115, 85, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(166, 139, 91, 0.15);
}

.category-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, #a68b5b 0%, #8b7355 50%, #a68b5b 100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  width: calc(33.333% - 5.33px);
  box-shadow: 
    0 2px 8px rgba(139, 115, 85, 0.4),
    0 0 12px rgba(166, 139, 91, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.category-tabs[data-active-index="0"]::before {
  transform: translateX(0);
}

.category-tabs[data-active-index="1"]::before {
  transform: translateX(calc(100% + 8px));
}

.category-tabs[data-active-index="2"]::before {
  transform: translateX(calc(200% + 16px));
}

.category-tab {
  flex: 1;
  border-radius: 999px;
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: #6b7280;
  position: relative;
  z-index: 1;
  transition: color 0.2s ease;
}

.category-tab.is-active {
  color: #ffffff;
}

.subfilters {
  margin-top: 12px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

/* Для ПК - добавляем возможность переноса строк и вертикальной прокрутки */
@media (min-width: 768px) {
  .subfilters {
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: auto;
    max-height: 200px;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 115, 85, 0.3) rgba(139, 115, 85, 0.1);
  }
  
  .subfilters::-webkit-scrollbar {
    display: block;
    width: 6px;
  }
  
  .subfilters::-webkit-scrollbar-track {
    background: rgba(139, 115, 85, 0.1);
    border-radius: 3px;
  }
  
  .subfilters::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.3);
    border-radius: 3px;
    transition: background 0.2s;
  }
  
  .subfilters::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 115, 85, 0.5);
  }
}

.chip {
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(139, 115, 85, 0.4);
  padding: 4px 10px;
  font-size: 11px;
  color: #4b5563;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.chip.is-active {
  border-color: transparent;
  background: rgba(139, 115, 85, 0.2);
  color: #8b7355;
  font-weight: 600;
}

/* Фильтры для администратора */
.admin-filters {
  margin-top: 16px;
  margin-bottom: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(139, 115, 85, 0.08), rgba(139, 115, 85, 0.04));
  border-radius: 12px;
  border: 1px solid rgba(139, 115, 85, 0.15);
}

.admin-filters-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(139, 115, 85, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.admin-filters-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.admin-filter-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  transition: transform 0.2s;
}

.admin-filter-btn:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(139, 115, 85, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.15);
}

.admin-filter-btn:active {
  transform: translateY(0);
}

.admin-filter-btn.is-active {
  background: rgba(139, 115, 85, 0.15);
  border-color: rgba(139, 115, 85, 0.5);
  color: #8b7355;
  font-weight: 600;
}

.admin-filter-btn.is-active svg {
  transform: scale(1.1);
}

.search-container {
  padding: 0;
  background: transparent;
  margin-bottom: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 249, 247, 0.9));
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(139, 115, 85, 0.2);
  padding: 10px 14px;
  box-shadow: 
    0 2px 8px rgba(139, 115, 85, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: rgba(139, 115, 85, 0.4);
  box-shadow: 
    0 4px 12px rgba(139, 115, 85, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.search-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #8b7355;
  margin-right: 10px;
  opacity: 0.6;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #1f2937;
  font-weight: 400;
  padding: 0;
  min-width: 0;
}

.search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.search-clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(139, 115, 85, 0.1);
  border-radius: 50%;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
  padding: 0;
}

.search-clear:hover {
  background: rgba(139, 115, 85, 0.2);
  transform: scale(1.1);
}

.search-clear:active {
  transform: scale(0.95);
}

.content {
  flex: 1;
  padding: 8px 12px calc(100px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
  touch-action: pan-y;
  width: 100%;
  max-width: 100%;
}

/* Ограничиваем прокрутку для страниц профиля и "О нас" */
.content.no-scroll {
  overflow-y: hidden !important;
  height: fit-content;
}

.page {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1;
  overflow-x: hidden;
  touch-action: pan-y;
}

.page.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}

/* Страницы профиля и чата */
.page-profile.is-active {
  display: flex;
  flex-direction: column;
  height: fit-content;
  max-height: fit-content;
  overflow: visible;
  min-height: calc(100vh - 160px);
  padding-bottom: 80px;
}

.page-chat.is-active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  overflow: hidden;
  min-height: calc(100vh - 80px);
  position: relative;
}

.chat-container {
  display: none;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.chat-container.show {
  display: flex !important;
  height: 100% !important;
}

.chat-container[style*="flex"],
.chat-container.show {
  display: flex !important;
}

.chat-header {
  padding: 16px;
  border-bottom: 1px solid rgba(139, 115, 85, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  flex: 1;
}

.chat-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(139, 115, 85, 0.1);
  color: #8b7355;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-back-btn:hover {
  background: rgba(139, 115, 85, 0.2);
  transform: scale(1.05);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #faf9f7;
  min-height: 0;
  height: 100%;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 75%;
  animation: fadeIn 0.3s ease;
}

.chat-message.sent {
  align-self: flex-end;
}

.chat-message.received {
  align-self: flex-start;
}

.chat-message-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(139, 115, 85, 0.1);
}

.chat-message.sent .chat-message-bubble {
  background: linear-gradient(135deg, #8b7355 0%, #a68b5b 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.received .chat-message-bubble {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  color: #1f2937;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(139, 115, 85, 0.1);
}

.chat-message-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  padding: 0 4px;
}

.chat-message-image {
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}

.chat-message-image img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  border-radius: 12px;
}

.chat-input-container {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  border-top: 1px solid rgba(139, 115, 85, 0.1);
  flex-shrink: 0;
  min-height: fit-content;
}

.chat-attach-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(139, 115, 85, 0.1);
  color: #8b7355;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-attach-btn:hover {
  background: rgba(139, 115, 85, 0.2);
  transform: scale(1.05);
}

.chat-attach-btn:active {
  transform: scale(0.95);
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 20px;
  font-size: 14px;
  background: white;
  outline: none;
}

.chat-input:focus {
  border-color: rgba(139, 115, 85, 0.4);
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #8b7355 0%, #a68b5b 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.2);
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-users-list {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.users-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.user-item {
  padding: 12px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  border-radius: 12px;
  border: 1px solid rgba(139, 115, 85, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.15);
  border-color: rgba(139, 115, 85, 0.3);
}

.user-item-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.user-item-info {
  font-size: 12px;
  color: #6b7280;
}

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

/* Страница корзины может прокручиваться только если много товаров */
.page-cart.is-active {
  min-height: auto;
  height: auto;
}

.page-content {
  padding: 16px 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.page-content p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

/* Стили для страницы профиля */
.profile-container {
  padding: 20px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  border-radius: 16px;
  box-shadow: 
    0 4px 16px rgba(139, 115, 85, 0.12),
    0 2px 8px rgba(139, 115, 85, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(166, 139, 91, 0.15);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: 
    linear-gradient(135deg, rgba(139, 115, 85, 0.1) 0%, rgba(166, 139, 91, 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 
    0 4px 16px rgba(139, 115, 85, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.8);
  border: 3px solid rgba(255, 255, 255, 0.9);
}

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

.profile-avatar svg {
  color: rgba(139, 115, 85, 0.5);
  width: 60px;
  height: 60px;
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin: 0;
  background: linear-gradient(135deg, #8b7355 0%, #c9a86a 50%, #a68b5b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-info-section {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 
    0 2px 12px rgba(139, 115, 85, 0.12),
    0 1px 6px rgba(139, 115, 85, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(166, 139, 91, 0.15);
}

.profile-info-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #8b7355;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-info-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(139, 115, 85, 0.1);
}

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

.info-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.info-value {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
  text-align: right;
}

.info-value.no-username {
  color: #ef4444;
  font-size: 12px;
  font-style: italic;
}

/* Переключатель темы */
.theme-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.theme-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
}

.theme-icon {
  color: #8b7355;
  flex-shrink: 0;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 249, 247, 0.9));
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.1);
  outline: none;
}

.theme-toggle-btn:hover {
  border-color: rgba(201, 168, 106, 0.5);
  box-shadow: 
    0 4px 16px rgba(139, 115, 85, 0.15),
    0 2px 8px rgba(201, 168, 106, 0.1);
  transform: translateY(-1px);
}

.theme-toggle-track {
  width: 40px;
  height: 22px;
  background: rgba(139, 115, 85, 0.2);
  border-radius: 999px;
  position: relative;
  transition: background 0.3s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #ffffff, #f5f3f0);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(139, 115, 85, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn.dark-mode .theme-toggle-track {
  background: linear-gradient(135deg, #8b7355, #a68b5b);
}

.theme-toggle-btn.dark-mode .theme-toggle-thumb {
  left: 20px;
  background: linear-gradient(135deg, #1f2937, #374151);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.theme-toggle-text {
  font-size: 13px;
  font-weight: 600;
  color: #8b7355;
  min-width: 70px;
  text-align: left;
}

.cart-header {
  padding: 16px 0 12px;
  border-bottom: 1px solid rgba(139, 115, 85, 0.1);
  margin-bottom: 12px;
}

.cart-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  padding-bottom: 160px; /* Отступ для фиксированного footer + bottom nav */
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(166, 139, 91, 0.15);
  box-shadow: 
    0 2px 12px rgba(139, 115, 85, 0.12), 
    0 1px 4px rgba(139, 115, 85, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.cart-item:hover {
  box-shadow: 
    0 4px 16px rgba(139, 115, 85, 0.18), 
    0 2px 6px rgba(139, 115, 85, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.cart-item-image {
  flex-shrink: 0;
}

.cart-item-image img {
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.cart-item-image {
  width: 80px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(139, 115, 85, 0.05);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.cart-item-price {
  font-size: 16px;
  font-weight: 600;
  color: #8b7355;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(139, 115, 85, 0.05);
  padding: 4px;
  border-radius: 8px;
}

.cart-item-delete {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.cart-item-delete:focus {
  outline: none;
}

.cart-item-delete:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.5);
}

.cart-item-delete:active {
  transform: scale(0.95);
}

.cart-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 80px; /* Чуть выше панели навигации */
  padding: 10px 12px;
  background: transparent;
  z-index: 95;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  display: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cart-footer.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  border-radius: 12px;
  box-shadow: 
    0 2px 12px rgba(139, 115, 85, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(166, 139, 91, 0.15);
}

.cart-total-label {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.cart-total-price {
  font-size: 20px;
  font-weight: 700;
  color: #8b7355;
}

.cart-checkout-btn {
  width: 100%;
  border-radius: 12px;
  border: none;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #8b7355, #a68b5b);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
  transition: all 0.2s ease;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.cart-checkout-btn:focus {
  outline: none;
}

.cart-checkout-btn:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(139, 115, 85, 0.5);
  transform: translateY(-1px);
}

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

.cart-checkout-btn:active:not(:disabled) {
  transform: translateY(0);
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.cart-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.cart-empty-text {
  font-size: 16px;
  margin-bottom: 8px;
}

.cart-empty-subtext {
  font-size: 14px;
  opacity: 0.7;
}

/* Прячем ползунки прокрутки, оставляя сам скролл */
body,
.content {
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}

body::-webkit-scrollbar,
.content::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Telegram WebView */
}

.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-bottom: 20px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.empty-state {
  padding: 16px 4px;
  font-size: 13px;
  color: #6b7280;
  grid-column: 1 / -1;
  text-align: center;
}

.pagination {
  padding: 16px 0 24px;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.pagination-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(139, 115, 85, 0.1);
  border-color: rgba(139, 115, 85, 0.4);
}

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

.pagination-btn.is-active {
  background: linear-gradient(135deg, #8b7355, #a68b5b);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(139, 115, 85, 0.3);
}

.pagination-dots {
  padding: 0 4px;
  color: #9ca3af;
  font-size: 13px;
}

.product-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 247, 0.95) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 2px 12px rgba(139, 115, 85, 0.15), 
    0 1px 3px rgba(139, 115, 85, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(166, 139, 91, 0.15);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease-out, transform 0.22s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(166, 139, 91, 0.3), rgba(139, 115, 85, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.product-card:hover {
  box-shadow: 
    0 8px 32px rgba(139, 115, 85, 0.3), 
    0 4px 16px rgba(201, 168, 106, 0.2),
    0 2px 8px rgba(139, 115, 85, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    0 0 20px rgba(201, 168, 106, 0.15);
  border-color: rgba(201, 168, 106, 0.4);
  transform: translateY(-2px);
}

.product-card:hover::before {
  opacity: 1;
}

/* Добавляем эффект сияния при наведении */
.product-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
  border-radius: 14px;
}

.product-card:hover::after {
  opacity: 0.4;
}

.product-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Карточка добавления нового товара (только для админов) */
.add-product-card {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: 
    linear-gradient(135deg, rgba(139, 115, 85, 0.05) 0%, rgba(139, 115, 85, 0.08) 100%);
  border: 2px dashed rgba(139, 115, 85, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-product-card:hover {
  background: 
    linear-gradient(135deg, rgba(139, 115, 85, 0.1) 0%, rgba(139, 115, 85, 0.15) 100%);
  border-color: rgba(139, 115, 85, 0.5);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(139, 115, 85, 0.2),
    0 4px 12px rgba(139, 115, 85, 0.15);
}

.add-product-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

.add-product-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(139, 115, 85, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-product-card:hover .add-product-icon {
  background: rgba(139, 115, 85, 0.2);
  transform: rotate(90deg) scale(1.1);
}

.add-product-icon svg {
  color: rgba(139, 115, 85, 0.6);
  transition: color 0.3s;
}

.add-product-card:hover .add-product-icon svg {
  color: rgba(139, 115, 85, 0.8);
}

.add-product-text {
  font-size: 14px;
  font-weight: 600;
  color: rgba(139, 115, 85, 0.7);
  text-align: center;
  transition: color 0.3s;
}

.add-product-card:hover .add-product-text {
  color: rgba(139, 115, 85, 0.9);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 115, 85, 0.05);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.product-thumb:hover {
  transform: scale(1.02);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 6px;
}

.price {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 115, 85, 0.15);
  color: #8b7355;
  font-weight: 500;
}

.qty-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  min-height: 40px;
  background: rgba(139, 115, 85, 0.05);
  padding: 4px;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

.add-to-cart-btn {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: linear-gradient(135deg, #8b7355 0%, #c9a86a 50%, #a68b5b 100%);
  background-size: 200% auto;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 12px rgba(139, 115, 85, 0.3),
    0 2px 6px rgba(201, 168, 106, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:hover::before {
  width: 300px;
  height: 300px;
}

.add-to-cart-btn:focus {
  outline: none;
}

.add-to-cart-btn:hover {
  background-position: right center;
  box-shadow: 
    0 6px 20px rgba(139, 115, 85, 0.4),
    0 3px 10px rgba(201, 168, 106, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 20px rgba(201, 168, 106, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.add-to-cart-btn:active {
  transform: translateY(0) scale(0.98);
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
  color: #8b7355;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(139, 115, 85, 0.1);
  min-width: 32px;
}

.qty-btn:focus {
  outline: none;
}

.qty-btn:hover {
  background: linear-gradient(135deg, rgba(139, 115, 85, 0.15), rgba(139, 115, 85, 0.1));
  border-color: rgba(139, 115, 85, 0.4);
  box-shadow: 0 3px 6px rgba(139, 115, 85, 0.2);
  transform: translateY(-1px);
}

.qty-btn:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 1px 2px rgba(139, 115, 85, 0.2);
}

.qty-value {
  min-width: 20px;
  text-align: center;
  font-size: 14px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: 
    linear-gradient(to top, 
      rgba(255, 255, 255, 0.98) 0%,
      rgba(250, 249, 247, 0.96) 50%,
      rgba(245, 242, 238, 0.94) 100%
    );
  backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid rgba(201, 168, 106, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 
    0 -4px 20px rgba(139, 115, 85, 0.2),
    0 -2px 10px rgba(201, 168, 106, 0.15),
    0 -6px 30px rgba(139, 115, 85, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 100;
  min-height: 72px;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.8s;
}

.bottom-nav.hidden {
  transform: translateY(100%);
}

/* Индикатор активной вкладки - плавно перемещается */
.bottom-nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 33.333%;
  height: 4px;
  background: linear-gradient(90deg, #c9a86a 0%, #a68b5b 25%, #8b7355 50%, #a68b5b 75%, #c9a86a 100%);
  background-size: 200% auto;
  animation: gradientFlow 3s ease infinite;
  border-radius: 4px 4px 0 0;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  z-index: 1;
  box-shadow: 
    0 -4px 16px rgba(201, 168, 106, 0.6),
    0 -2px 8px rgba(166, 139, 91, 0.5),
    0 0 20px rgba(201, 168, 106, 0.4),
    0 0 40px rgba(201, 168, 106, 0.2);
}

/* Позиции индикатора для разных вкладок */
.bottom-nav[data-active-nav="menu"]::after {
  left: 0%;
  width: 33.333%;
}

.bottom-nav[data-active-nav="profile"]::after {
  left: 33.333%;
  width: 33.333%;
}

.bottom-nav[data-active-nav="cart"]::after {
  left: 66.666%;
  width: 33.333%;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 64px;
  justify-content: center;
}

/* Увеличиваем область нажатия для кнопки корзины */
.nav-btn[data-nav="cart"] {
  padding: 12px 20px;
  min-height: 72px;
}

.nav-btn:focus {
  outline: none;
}

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

.nav-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: #8b7355;
}

.nav-btn.is-active {
  color: #8b7355;
  background: linear-gradient(135deg, rgba(139, 115, 85, 0.15), rgba(166, 139, 91, 0.1));
  border-radius: 12px;
  position: relative;
  transform: translateY(-2px);
}

.nav-btn.is-active svg {
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 2px rgba(139, 115, 85, 0.3));
  transform: scale(1.05);
}

.nav-btn span {
  font-size: 11px;
  line-height: 1.2;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(135deg, #a68b5b 0%, #8b7355 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 2px 8px rgba(139, 115, 85, 0.5),
    0 0 12px rgba(166, 139, 91, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 10;
  animation: badgePop 0.3s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cart-badge.show {
  display: flex;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Модальное окно карточки товара - полноэкранное */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20000 !important;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 247, 0.95));
  backdrop-filter: blur(20px);
}

.product-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-modal-backdrop {
  display: none;
}

.product-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-modal.is-open .product-modal-content {
  transform: translateX(0);
}

.product-modal-header-buttons {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20002;
  gap: 8px;
}

.product-modal-back {
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: #8b7355;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.2);
  font-size: 14px;
  font-weight: 500;
}

.product-modal-back:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(139, 115, 85, 0.4);
  transform: translateX(-2px);
}

.product-modal-back:active {
  transform: translateX(0);
}

.product-modal-edit {
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: rgba(139, 115, 85, 0.9);
  backdrop-filter: blur(10px);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.2);
  font-size: 14px;
  font-weight: 500;
}

.product-modal-edit:hover {
  background: rgba(139, 115, 85, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.product-modal-edit:active {
  transform: translateY(0);
}

.product-modal-image-container {
  width: 100%;
  height: 50vh;
  min-height: 300px;
  max-height: 50vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 115, 85, 0.05);
  overflow: hidden;
  position: relative;
  padding: 60px 20px 20px 20px;
}

.product-modal-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.product-modal-info {
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 247, 0.95));
  border-top: 1px solid rgba(139, 115, 85, 0.1);
  -webkit-overflow-scrolling: touch;
}

.product-modal-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-modal-name {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

.product-modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-modal-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(139, 115, 85, 0.3);
  background: rgba(255, 255, 255, 0.8);
  color: #8b7355;
}

.product-modal-badge-category {
  background: rgba(139, 115, 85, 0.15);
  border-color: rgba(139, 115, 85, 0.4);
  color: #8b7355;
}

.product-modal-price {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 4px 0;
}

.product-modal-description {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin: 8px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: calc(1.6em * 3);
  max-height: calc(1.6em * 6);
  padding-right: 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.product-modal-description::-webkit-scrollbar {
  width: 4px;
}

.product-modal-description::-webkit-scrollbar-track {
  background: rgba(139, 115, 85, 0.1);
  border-radius: 2px;
}

.product-modal-description::-webkit-scrollbar-thumb {
  background: rgba(139, 115, 85, 0.3);
  border-radius: 2px;
}

.product-modal-description::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 115, 85, 0.5);
}

.product-modal-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 115, 85, 0.1);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-modal-qty-controls {
  flex-shrink: 0;
}

.product-modal-cart-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 16px;
  border: 2px solid rgba(139, 115, 85, 0.4);
  background: rgba(255, 255, 255, 0.9);
  color: #8b7355;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
}

.product-modal-cart-btn:hover {
  background: rgba(139, 115, 85, 0.1);
  border-color: rgba(139, 115, 85, 0.6);
  transform: translateY(-1px);
}

.product-modal-cart-btn:active {
  transform: translateY(0);
}

.product-modal-add-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #a68b5b 0%, #8b7355 50%, #a68b5b 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 
    0 4px 12px rgba(139, 115, 85, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.product-modal-qty-controls .product-modal-add-btn {
  width: 100%;
}

.product-modal-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(139, 115, 85, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.product-modal-add-btn:active {
  transform: translateY(0);
}

.product-modal-qty-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
}

.product-modal-qty-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid rgba(139, 115, 85, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: #8b7355;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-qty-btn:hover {
  background: rgba(139, 115, 85, 0.1);
  border-color: rgba(139, 115, 85, 0.5);
  transform: scale(1.05);
}

.product-modal-qty-btn:active {
  transform: scale(0.95);
}

.product-modal-qty-value {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  min-width: 40px;
  text-align: center;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

.product-modal-qty-value::-webkit-inner-spin-button,
.product-modal-qty-value::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-modal-qty-value:focus {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Модальное окно редактирования товара - полноэкранное */
.product-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30000 !important;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 247, 0.95));
  backdrop-filter: blur(20px);
  overflow-x: hidden;
}

.product-edit-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-edit-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-edit-modal.is-open .product-edit-modal-content {
  transform: translateX(0);
}

.product-edit-modal-header {
  padding: 20px;
  border-bottom: 1px solid rgba(139, 115, 85, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-edit-modal-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.product-edit-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: #8b7355;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.2);
}

.product-edit-modal-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.product-edit-form {
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}

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

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid rgba(139, 115, 85, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(139, 115, 85, 0.5);
  background: rgba(255, 255, 255, 1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.image-upload-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#edit-image-preview {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid rgba(139, 115, 85, 0.2);
}

#edit-image {
  display: none;
}

.image-upload-label {
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px dashed rgba(139, 115, 85, 0.3);
  background: rgba(139, 115, 85, 0.05);
  color: #8b7355;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.image-upload-label:hover {
  background: rgba(139, 115, 85, 0.1);
  border-color: rgba(139, 115, 85, 0.5);
}

.status-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid rgba(139, 115, 85, 0.2);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-option:hover {
  background: rgba(139, 115, 85, 0.05);
  border-color: rgba(139, 115, 85, 0.4);
}

.status-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.status-option input[type="radio"]:checked + span {
  font-weight: 600;
  color: #8b7355;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 115, 85, 0.1);
}

.form-actions-right {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

.btn-cancel,
.btn-save,
.btn-delete {
  padding: 14px 20px;
  border-radius: 16px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #ef4444 100%);
  color: #ffffff;
  box-shadow: 
    0 4px 12px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-delete:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-delete:active {
  transform: translateY(0);
}

.btn-cancel,
.btn-save {
  flex: 1;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.9);
  color: #8b7355;
  border: 2px solid rgba(139, 115, 85, 0.3);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(139, 115, 85, 0.5);
}

.btn-save {
  background: linear-gradient(135deg, #a68b5b 0%, #8b7355 50%, #a68b5b 100%);
  color: #ffffff;
  box-shadow: 
    0 4px 12px rgba(139, 115, 85, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(139, 115, 85, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-save:active {
  transform: translateY(0);
}

/* Модальное окно выбора типа получения заказа */
.order-type-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.order-type-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.order-type-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.order-type-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 247, 0.95));
  border-radius: 24px;
  padding: 24px;
  max-width: 90%;
  width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-type-modal.is-open .order-type-modal-content {
  transform: scale(1);
}

.order-type-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.order-type-modal-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.order-type-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #8b7355;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.order-type-modal-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.order-type-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-type-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 2px solid rgba(139, 115, 85, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.order-type-option:hover {
  border-color: rgba(139, 115, 85, 0.6);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.2);
}

.order-type-option:active {
  transform: translateY(0);
}

.order-type-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.order-type-info {
  flex: 1;
}

.order-type-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.order-type-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.order-type-desc small {
  font-size: 12px;
  color: #9ca3af;
}

/* Модальное окно ввода адреса доставки */
.delivery-address-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40001 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.delivery-address-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.delivery-address-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.delivery-address-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 247, 0.95));
  border-radius: 24px;
  padding: 24px;
  max-width: 90%;
  width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.delivery-address-modal.is-open .delivery-address-modal-content {
  transform: scale(1);
}

.delivery-address-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.delivery-address-modal-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.delivery-address-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #8b7355;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.delivery-address-modal-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.delivery-address-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.delivery-address-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(139, 115, 85, 0.3);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
}

.delivery-address-input:focus {
  outline: none;
  border-color: rgba(139, 115, 85, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.delivery-address-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Модальное окно ошибки отсутствия username */
.username-error-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40002 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.username-error-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.username-error-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.username-error-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 247, 0.95));
  border-radius: 24px;
  padding: 32px;
  max-width: 90%;
  width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.username-error-modal.is-open .username-error-modal-content {
  transform: scale(1);
}

.username-error-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.username-error-modal-content h2 {
  margin: 0 0 16px 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.username-error-modal-content p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

.username-error-instructions {
  text-align: left !important;
  background: rgba(139, 115, 85, 0.1);
  padding: 16px;
  border-radius: 12px;
  margin-top: 20px !important;
}

.username-error-instructions strong {
  color: #1f2937;
  display: block;
  margin-bottom: 8px;
}

#username-error-close {
  margin-top: 24px;
  width: 100%;
}

/* Модальное окно успешного оформления заказа */
.order-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40003 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.order-success-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.order-success-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.order-success-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 247, 0.95));
  border-radius: 24px;
  padding: 32px;
  max-width: 90%;
  width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-success-modal.is-open .order-success-modal-content {
  transform: scale(1);
}

.order-success-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: successPulse 0.6s ease;
}

@keyframes successPulse {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.order-success-modal-content h2 {
  margin: 0 0 16px 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.order-success-modal-content p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

.order-success-message {
  background: rgba(139, 115, 85, 0.1);
  padding: 16px;
  border-radius: 12px;
  margin-top: 20px !important;
  text-align: left !important;
}

#order-success-close {
  margin-top: 24px;
  width: 100%;
}

