/* Core Styles */

* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', sans-serif;
    }

    :root {
      --color-bg: #201b18;
      --color-bg-secondary: #272220;
      --color-bg-featured: #55433c;
      --color-primary: #a97c37;
      --color-primary-hover: #b88a45;
      --color-text: #ffffff;
      --color-text-muted: #55433c;
      --color-border: #55433c;

      /* Адаптивный отступ от верхней части экрана */
      --safe-area-top: env(safe-area-inset-top, 0px);
      --top-padding-min: 44px;
      --top-padding-max: 68px;
      /* Вычисляем отступ: safe-area + адаптивный padding (24-48px в зависимости от размера экрана) */
      --top-offset: calc(var(--safe-area-top) + clamp(var(--top-padding-min), 3vw, var(--top-padding-max)));
    }

    body {
      background: var(--color-bg);
      color: var(--color-text);
      overflow-x: hidden;
      position: relative;
      min-height: 100vh;
    }

    /* Основной контейнер приложения */
    #app {
      padding-top: 0;
      margin-top: 0;
    }

    /* Header с адаптивным отступом */
    .header {
      margin-top: 0;
      padding-top: 0;
      /* Дополнительный отступ для header, если нужно */
      position: relative;
    }

    /* Для страниц с собственным header */
    .page {
      padding-top: 0;
    }

    /* Отступ сверху для всех страниц (после кнопок Telegram) */
    .page {
      padding-top: 0;
    }

    /* Для главной страницы - увеличенный отступ сверху */
    #home-page {
      padding-top: 100px;
      position: relative;
    }

    /* Адаптивные отступы для разных размеров экранов */
    @media (max-width: 375px) {
      :root {
        --top-padding-min: 44px;
        --top-padding-max: 52px;
      }
    }

    @media (min-width: 376px) and (max-width: 414px) {
      :root {
        --top-padding-min: 48px;
        --top-padding-max: 60px;
      }
    }

    @media (min-width: 415px) {
      :root {
        --top-padding-min: 52px;
        --top-padding-max: 68px;
      }
    }

    /* Для устройств с большой safe area (iPhone X и новее) */
    @supports (padding: max(0px)) {
      :root {
        --top-offset: calc(env(safe-area-inset-top, 0px) + clamp(var(--top-padding-min), 3vw, var(--top-padding-max)));
      }
    }

    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      /* background-image: url('фон приложения кофейни.jpg'); */
      /* Файл не найден, отключено */
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      background-attachment: fixed;
      z-index: -2;
    }

    body::after {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(18, 16, 14, 0.7);
      z-index: -1;
    }

    /* Splash Screen */
    .splash-screen {
      position: fixed;
      inset: 0;
      background: var(--color-bg);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 48px;
      z-index: 9999;
      animation: fadeOut 0.5s ease-out 2s forwards;
    }

    .splash-logo {
      text-align: center;
      animation: scaleIn 0.6s ease-out;
    }

    .splash-icon {
      font-size: 96px;
      animation: bounce 2s ease-in-out infinite;
    }

    .splash-brand {
      font-size: 48px;
      font-weight: 800;
      margin-top: 16px;
    }

    .splash-subtitle {
      font-size: 18px;
      letter-spacing: 8px;
      color: var(--color-primary);
      text-transform: uppercase;
      margin-top: 8px;
    }

    .splash-loader {
      width: 40px;
      height: 40px;
      border: 3px solid var(--color-bg-secondary);
      border-top-color: var(--color-primary);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    /* Main App */
    #app {
      opacity: 0;
      animation: fadeIn 0.5s ease-out 2.5s forwards;
      max-width: 448px;
      margin: 0 auto;
      position: relative;
      z-index: 2;
    }

    /* Background Pattern */
    .bg-pattern {
      position: fixed;
      inset: 0;
      opacity: 0.1;
      background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(169, 124, 55, 0.1) 10px, rgba(169, 124, 55, 0.1) 20px);
      pointer-events: none;
    }

    /* Working Hours Display */
    .working-hours-display {
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      text-align: center;
      padding: 0;
      font-size: 13px;
      font-weight: 600;
      transition: all 0.3s;
      z-index: 10;
      /* Размещаем индикатор работы с учетом padding-top: 100px */
      /* Отступ 70px от верха страницы для баланса */
      top: 70px;
      line-height: 1.2;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
    }

    .working-hours-indicator {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: inline-block;
    }

    .working-hours-indicator.open {
      background-color: #10b981;
      animation: softBlink 2s ease-in-out infinite;
    }

    .working-hours-indicator.closed {
      background-color: #ef4444;
    }

    

    .working-hours-display.open {
      color: #10b981;
    }

    .working-hours-display.closed {
      color: #ef4444;
    }

    .working-hours-display.hidden {
      display: none;
    }

    /* Header */
    .header {
      padding: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
    }

    .header-icon {
      font-size: 40px;
    }

    .header-text {
      font-size: 20px;
      font-weight: 800;
      line-height: 1.2;
      /* Для точного выравнивания baseline */
    }

    /* User Section */
    .user-section {
      padding: 0 20px;
      /* Убрали вертикальный padding, отступ будет через margin-top */
      margin-top: 0;
      /* Отступ будет задан через margin-top у первого элемента внутри */
    }

    .user-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      /* Уменьшенный отступ снизу */
    }

    .user-info {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .user-avatar {
      width: 44px;
      height: 44px;
      background: linear-gradient(135deg, var(--color-primary), #6b4d29);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
    }

    #app-version {
      position: absolute;
      top: 0;
      right: 20px;
      font-size: 10px;
      color: rgba(255, 255, 255, 0.3);
      font-family: 'Courier New', monospace;
      background: rgba(0, 0, 0, 0.3);
      padding: 2px 6px;
      border-radius: 4px;
      pointer-events: none;
      z-index: 10;
    }

    .user-greeting {
      font-size: 24px;
      font-weight: 700;
    }

    .user-greeting span {
      font-weight: 400;
    }

    /* Categories */
    .categories {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 8px;
      margin-bottom: 16px;
    }

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

    .category-btn {
      padding: 8px 16px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(29, 25, 23, 0.6);
      color: rgba(255, 255, 255, 0.5);
      border-radius: 200px;
      white-space: nowrap;
      cursor: pointer;
      transition: all 0.3s;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 600;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
    }

    .category-btn:hover {
      transform: scale(1.05);
    }

    .category-btn.active {
      background: rgba(169, 124, 55, 0.8);
      color: white;
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: 0 4px 12px rgba(169, 124, 55, 0.5);
    }

    /* Attribute Buttons */
    .attribute-btn {
      padding: 12px 16px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(48, 43, 40, 0.6);
      color: rgba(255, 255, 255, 0.8);
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
      text-align: center;
      flex: 1;
      min-width: 0;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
    }

    .attribute-btn:hover {
      border-color: var(--color-primary);
      transform: translateY(-2px);
    }

    .attribute-btn.active {
      background: rgba(169, 124, 55, 0.8);
      color: white;
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: 0 4px 12px rgba(169, 124, 55, 0.3);
    }

    .attribute-btn-compact {
      padding: 8px 12px;
    }

    /* --- Product Card Redesign v1.1.21 --- */
    .product-redesign-container {
      position: relative;
      /* Ultra Wide: Margins -30px as requested (potentially wider than screen if parent < 30px padding) */
      width: calc(100% + 60px);
      margin-left: -30px;
      margin-right: -30px;
      padding-top: 125%;
      /* 4:5 Aspect Ratio */
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 24px;
      background: linear-gradient(135deg, rgba(82, 82, 82, 0.47), rgba(46, 44, 42, 0.28));
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .product-redesign-image-wrapper {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

    .product-redesign-image-wrapper img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s ease;
    }

    /* Gradient Removed as requested */
    .product-redesign-gradient {
      display: none;
    }

    .product-redesign-content {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      /* Adjust padding to compensate for extra wide negative margins (-30px) */
      padding: 20px 30px;
      z-index: 2;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      /* Top info at top, Volume at bottom */
      pointer-events: none;
      /* Let clicks pass through where empty */
    }

    /* Top Info Row */
    .product-top-info {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      width: 100%;
    }

    .product-desc-col {
      flex: 1;
      font-size: 13px;
      line-height: 1.4;
      color: rgba(0, 0, 0, 0.7);
      /* Dark text as requested */
      text-shadow: none;
      /* Removed shadow */
      pointer-events: auto;
    }

    .product-price-col {
      font-size: 28px;
      font-weight: 800;
      color: var(--color-primary);
      text-shadow: none;
      /* Removed shadow */
      white-space: nowrap;
      margin-top: -4px;
      pointer-events: auto;
    }

    /* Volume Selector in Overlay - Stripped styles */
    .volume-selector-overlay {
      background: transparent;
      border: none;
      backdrop-filter: none;
      border-radius: 0;
      padding: 0;
      pointer-events: auto;
      width: 100%;
    }

    .volume-label-shadow {
      text-shadow: none;
      /* Removed shadow */
      color: rgba(0, 0, 0, 0.7);
      /* Dark text for label */
    }

    /* Volume buttons grid to match other attributes */
    #size-attribute-buttons-container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }

    .attribute-btn {
      /* Reduced height as requested */
      padding: 10px 16px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(48, 43, 40, 0.6);
      color: rgba(255, 255, 255, 0.8);
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
      text-align: center;
      /* flex: 1; - Removed flex:1 since we use grid now for size too, but safe to keep if mixed */
      min-width: 0;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
    }

    /* Products Grid */
    .products-grid {
      display: flex;
      gap: 14px;
      overflow-x: auto;
    }

    .products-grid::-webkit-scrollbar {
      display: none;
    }

    .product-card {
      flex-shrink: 0;
      width: 140px;
      height: 140px;
      background: rgba(48, 43, 40, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      padding: 12px;
      position: relative;
      cursor: pointer;
      transition: all 0.3s;
      display: flex;
      flex-direction: column;
      justify-content: center;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    /* 2-column grid layout - only for "Все товары" section */
    .products-grid-2col .product-card {
      width: 100%;
      height: auto;
      padding: 16px 12px !important;
      justify-content: flex-start;
    }

    /* Larger product images in 2-column grid */
    .products-grid-2col .product-image {
      width: 96px;
      height: 96px;
      font-size: 52px;
      margin-bottom: 12px;
    }

    .products-grid-2col .product-name {
      font-size: 14px;
      margin-bottom: 6px;
    }

    .products-grid-2col .product-price {
      font-size: 14px;
    }

    .product-card.featured {
      background: rgba(85, 67, 60, 0.5);
      border: 1px solid rgba(255, 255, 255, 0.15);
    }

    .product-card:hover {
      transform: scale(1.05);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .hot-badge {
      position: absolute;
      top: 8px;
      left: 8px;
      background: var(--color-primary);
      color: white;
      padding: 2px 8px;
      border-radius: 200px;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      z-index: 2;
    }

    .favorite-btn {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 24px;
      height: 24px;
      background: rgba(0, 0, 0, 0.5);
      border: none;
      border-radius: 50%;
      color: white;
      font-size: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2;
      transition: all 0.3s;
    }

    .favorite-btn:hover {
      background: var(--color-primary);
      transform: scale(1.1);
    }

    .favorite-btn.active {
      color: #ef4444;
    }

    .product-image {
      width: 64px;
      height: 64px;
      margin: 0 auto 6px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 36px;
      overflow: hidden;
    }

    .product-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .product-name {
      font-size: 12px;
      font-weight: 700;
      text-align: center;
      margin-bottom: 3px;
      line-height: 1.2;
    }

    .product-price {
      color: var(--color-primary);
      font-size: 12px;
      font-weight: 700;
      text-align: center;
    }

    /* Section */
    .section {
      padding: 20px;
    }

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

    .section-title {
      font-size: 14px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.5);
    }

    .see-all {
      font-size: 12px;
      color: var(--color-primary);
      text-decoration: underline;
      cursor: pointer;
    }

    /* Horizontal Products */
    .horizontal-products {
      display: flex;
      gap: 14px;
      overflow-x: auto;
    }

    .horizontal-products::-webkit-scrollbar {
      display: none;
    }

    .horizontal-item {
      flex-shrink: 0;
      width: 190px;
      background: var(--color-bg-secondary);
      border-radius: 12px;
      padding: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: all 0.3s;
      position: relative;
    }

    .horizontal-item:nth-child(even) {
      background: var(--color-bg-featured);
    }

    .horizontal-item:hover {
      transform: scale(1.05);
    }

    .horizontal-image {
      width: 60px;
      height: 60px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      flex-shrink: 0;
      overflow: hidden;
    }

    .horizontal-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .horizontal-info {
      flex: 1;
    }

    .horizontal-name {
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .horizontal-price {
      color: var(--color-primary);
      font-size: 12px;
      font-weight: 700;
    }

    /* Bottom Nav */
    .bottom-nav {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      max-width: 380px;
      width: calc(100% - 40px);
      background: rgba(36, 32, 30, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 24px;
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      z-index: 1000;
      /* Поднимаем выше всего */
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s;
    }

    /* Скрытие тачбара при открытой клавиатуре */
    body.keyboard-open .bottom-nav {
      transform: translate(-50%, 100px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .nav-container {
      padding: 16px 35px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .nav-btn {
      position: relative;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(48, 43, 40, 0.4);
      color: rgba(255, 255, 255, 0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
    }

    .nav-btn:hover {
      transform: scale(1.1);
      border-color: var(--color-primary);
      background: rgba(169, 124, 55, 0.2);
      color: var(--color-primary);
    }

    .nav-btn.active {
      background: var(--color-primary);
      color: #000;
      border-color: rgba(255, 255, 255, 0.2);
      box-shadow: 0 4px 12px rgba(169, 124, 55, 0.4);
    }

    /* Сворачиваемый контейнер профиля */
    .collapsible-content {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
      opacity: 0;
    }

    .collapsible-content.expanded {
      max-height: 500px;
      /* Достаточно для всех полей */
      opacity: 1;
      margin-top: 12px;
    }

    .edit-toggle-btn {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: rgba(169, 124, 55, 0.15);
      border: 1px solid rgba(169, 124, 55, 0.4);
      border-radius: 8px;
      color: var(--color-primary);
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
    }

    .edit-toggle-btn:hover {
      background: rgba(169, 124, 55, 0.2);
    }

    .current-jk-card {
      background: var(--color-bg-secondary);
      border-radius: 12px;
      padding: 16px;
      border: 1px solid var(--color-border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .jk-info-label {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.5);
      margin-bottom: 2px;
    }

    .jk-name-value {
      font-size: 16px;
      font-weight: 700;
      color: white;
    }

    .btn-change-jk {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: white;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 12px;
      cursor: pointer;
    }

    .badge {
      position: absolute;
      top: -4px;
      right: -4px;
      width: 20px;
      height: 20px;
      background: var(--color-primary);
      color: white;
      font-size: 11px;
      font-weight: 700;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Toast */
    .toast {
      position: fixed;
      top: 80px;
      left: 50%;
      transform: translateX(-50%);
      background: linear-gradient(to right, var(--color-primary), var(--color-primary-hover));
      color: white;
      padding: 12px 24px;
      border-radius: 200px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
      z-index: 1000;
      display: none;
      align-items: center;
      gap: 8px;
      font-weight: 600;
      font-size: 14px;
      animation: slideDown 0.4s ease-out;
    }

    .toast.show {
      display: flex;
    }

    /* Page Content */
    .page {
      display: none;
      padding-bottom: 120px;
    }

    .page.active {
      display: block;
    }

    /* Cart Page */
    .cart-page {
      padding: 20px 20px 120px 20px;
      padding-top: 110px;
      /* Увеличенный отступ сверху для страниц с cart-header */
    }

    .cart-header {
      font-size: 24px;
      font-weight: 800;
      /* Такая же как у header-text */
      margin-bottom: 24px;
      display: flex;
      align-items: baseline;
      /* Выравнивание по baseline текста */
      justify-content: center;
      position: relative;
      padding: 0 48px;
      /* Убрали верхний padding, так как отступ уже есть у .cart-page */
      line-height: 1.2;
      /* Такая же как у header-text */
    }

    .cart-header .back-btn {
      position: absolute;
      left: 0;
      background: none;
      border: none;
      color: white;
      font-size: 24px;
      cursor: pointer;
      padding: 4px 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      transition: background 0.2s;
    }

    .cart-header .back-btn:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .cart-header .back-btn:active {
      background: rgba(255, 255, 255, 0.2);
    }

    .cart-header>span {
      text-align: center;
      flex: 1;
    }

    .cart-item {
      background: var(--color-bg-secondary);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 12px;
      display: flex;
      gap: 12px;
    }

    /* Левая часть: изображение */
    .cart-item__image {
      width: 80px;
      height: 80px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 40px;
      flex-shrink: 0;
      overflow: hidden;
    }

    .cart-item__image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* Старые классы для истории заказов (обратная совместимость) */
    .cart-item-image {
      width: 80px;
      height: 80px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 40px;
      flex-shrink: 0;
      overflow: hidden;
    }

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

    .cart-item-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .cart-item-name {
      font-size: 18px;
      font-weight: 700;
      line-height: 1.4;
      color: white;
    }

    /* ОДИНАКОВАЯ логика для центра и правой колонки */
    .cart-item__col {
      display: flex;
      flex-direction: column;
    }

    .cart-item__col--center {
      flex: 1;
      min-width: 0;
    }

    .cart-item__col--right {
      flex-shrink: 0;
      align-items: flex-end;
    }

    /* 🔝 Верх */
    .cart-item__top {
      display: flex;
      flex-direction: column;
      gap: 7px;
      /* Отступ между названием и атрибутами */
    }

    .cart-item__title {
      font-size: 18px;
      font-weight: 700;
      line-height: 1.4;
      color: white;
    }

    /* 🎯 Атрибуты */
    .cart-item__attributes {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 8px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.5);
      line-height: 1.4;
    }

    .cart-item__attributes .attr {
      white-space: nowrap;
    }

    /* 🔥 КОНТРОЛИРУЕМЫЙ ПРОМЕЖУТОК */
    .cart-item__spacer {
      height: 7px;
      /* ← тот самый зазор */
      flex-shrink: 0;
    }

    /* 🔽 Низ всегда прижат */
    .cart-item__bottom {
      margin-top: auto;
    }

    /* Управление количеством */
    .cart-item__quantity {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .cart-item__qty-btn {
      width: 32px;
      height: 32px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(48, 43, 40, 0.6);
      color: white;
      border-radius: 8px;
      cursor: pointer;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
      transition: all 0.3s;
    }

    .cart-item__qty-btn:hover {
      background: rgba(169, 124, 55, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .cart-item__qty-input {
      width: 40px;
      height: 32px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(48, 43, 40, 0.6);
      color: white;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      text-align: center;
      appearance: textfield;
      -moz-appearance: textfield;
      pointer-events: none;
    }

    .cart-item__qty-input::-webkit-outer-spin-button,
    .cart-item__qty-input::-webkit-inner-spin-button {
      appearance: none;
      -webkit-appearance: none;
      margin: 0;
    }

    .cart-item__price {
      color: var(--color-primary);
      font-size: 20px;
      font-weight: 700;
      line-height: 1.2;
      white-space: nowrap;
      text-align: right;
    }

    .cart-item__actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .cart-total {
      background: var(--color-bg-featured);
      padding: 20px;
      border-radius: 12px;
      margin-top: 24px;
    }

    .total-row {
      display: flex;
      justify-content: space-between;
      font-size: 18px;
      font-weight: 700;
    }

    .checkout-btn {
      width: 100%;
      padding: 16px;
      background: rgba(169, 124, 55, 0.8);
      color: white;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      font-size: 16px;
      font-weight: 700;
      margin-top: 16px;
      cursor: pointer;
      transition: all 0.3s;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
      box-shadow: 0 4px 16px rgba(169, 124, 55, 0.3);
    }

    .checkout-btn:hover {
      background: var(--color-primary-hover);
      transform: translateY(-2px);
      box-shadow: 0 8px 16px rgba(169, 124, 55, 0.4);
    }

    /* Empty State */
    .empty-state {
      text-align: center;
      padding: 60px 20px;
    }

    .empty-icon {
      font-size: 80px;
      margin-bottom: 16px;
      opacity: 0.3;
    }

    .empty-text {
      font-size: 18px;
      color: rgba(255, 255, 255, 0.5);
    }

    /* Animations */
    

    

    

    

    

    

    /* Button */
    button {
      font-family: 'Inter', sans-serif;
    }

    .btn-primary {
      width: 100%;
      padding: 16px 24px;
      background: rgba(169, 124, 55, 0.8);
      color: white;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.3s;
      backdrop-filter: blur(10px) saturate(150%);
      -webkit-backdrop-filter: blur(10px) saturate(150%);
      box-shadow: 0 4px 16px rgba(169, 124, 55, 0.3);
    }

    .btn-primary:hover {
      background: var(--color-primary-hover);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(169, 124, 55, 0.4);
    }

    .btn-primary:active {
      transform: translateY(0);
      box-shadow: 0 2px 8px rgba(169, 124, 55, 0.3);
    }

    /* Payment Methods */
    .payment-methods {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .payment-method {
      background: var(--color-bg-secondary);
      border: 2px solid var(--color-border);
      border-radius: 12px;
      padding: 16px;
      cursor: pointer;
      transition: all 0.3s;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .payment-method:hover {
      border-color: var(--color-primary);
      transform: translateY(-2px);
    }

    .payment-method.active {
      border-color: var(--color-primary);
      background: rgba(169, 124, 55, 0.1);
    }

    .payment-radio {
      width: 20px;
      height: 20px;
      border: 2px solid var(--color-border);
      border-radius: 50%;
      position: relative;
      transition: all 0.3s;
    }

    .payment-method.active .payment-radio {
      border-color: var(--color-primary);
    }

    .payment-method.active .payment-radio::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 10px;
      height: 10px;
      background: var(--color-primary);
      border-radius: 50%;
    }

    /* Form Inputs */
    input,
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    textarea,
    select {
      background: var(--color-bg-secondary) !important;
      background-color: var(--color-bg-secondary) !important;
      color: white !important;
      border: 1px solid var(--color-border);
      border-radius: 8px;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    input:focus,
    textarea:focus,
    select:focus {
      outline: none;
      border-color: var(--color-primary) !important;
      background: var(--color-bg-secondary) !important;
      background-color: var(--color-bg-secondary) !important;
    }

    input::placeholder,
    textarea::placeholder {
      color: rgba(255, 255, 255, 0.3);
    }

    /* Автозаполнение браузера - убираем белый фон */
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    input:-webkit-autofill:active,
    textarea:-webkit-autofill,
    textarea:-webkit-autofill:hover,
    textarea:-webkit-autofill:focus,
    textarea:-webkit-autofill:active {
      -webkit-box-shadow: 0 0 0 1000px var(--color-bg-secondary) inset !important;
      -webkit-text-fill-color: white !important;
      background-color: var(--color-bg-secondary) !important;
      transition: background-color 5000s ease-in-out 0s;
    }

    /* Firefox autofill */
    input:-moz-autofill,
    input:-moz-autofill:hover,
    input:-moz-autofill:focus {
      background-color: var(--color-bg-secondary) !important;
      color: white !important;
    }

    /* Order Cards */
    .order-card {
      background: var(--color-bg-secondary);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 12px;
      cursor: pointer;
      transition: all 0.3s;
    }

    .order-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .cancel-order-btn:hover {
      background: rgba(239, 68, 68, 0.3) !important;
      border-color: #ef4444 !important;
      transform: translateY(-1px);
    }

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

    .order-number {
      font-size: 16px;
      font-weight: 700;
    }

    .order-date {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.5);
    }

    .order-status {
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      display: inline-block;
    }

    .order-status.preparing {
      background: rgba(59, 130, 246, 0.2);
      color: #60a5fa;
    }

    .order-status.ready {
      background: rgba(251, 191, 36, 0.2);
      color: #fbbf24;
    }

    .order-status.delivering {
      background: rgba(168, 85, 247, 0.2);
      color: #a855f7;
    }

    .order-status.delivered {
      background: rgba(34, 197, 94, 0.2);
      color: #22c55e;
    }

    .order-status.cancelled {
      background: rgba(239, 68, 68, 0.2);
      color: #ef4444;
    }

    .order-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 14px;
      color: rgba(255, 255, 255, 0.7);
    }

    .order-total {
      font-size: 18px;
      font-weight: 700;
      color: var(--color-primary);
    }

    .order-total {
      font-size: 18px;
      font-weight: 700;
      color: var(--color-primary);
    }

    .cart-item__action {
      background: rgba(255, 255, 255, 0.1);
      border: none;
      color: rgba(255, 255, 255, 0.5);
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s;
      flex-shrink: 0;
      padding: 0;
    }

    .cart-item__action--edit:hover {
      background: rgba(169, 124, 55, 0.2);
      color: var(--color-primary);
    }

    .cart-item__action--remove:hover {
      background: rgba(239, 68, 68, 0.2);
      color: #ef4444;
    }

    /* ===== LANDSCAPE ORIENTATION ADAPTIVE STYLES ===== */
    @media (orientation: landscape) and (max-height: 600px) {

      /* Уменьшаем отступы сверху для landscape */
      :root {
        --top-padding-min: 12px;
        --top-padding-max: 20px;
      }

      body {
        padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
      }

      /* Компактный header */
      .header {
        padding: 12px 20px;
      }

      .header-icon {
        font-size: 32px;
      }

      .header-text {
        font-size: 20px;
      }

      /* Компактная секция пользователя */
      .user-section {
        padding: 0 20px;
      }

      .user-greeting {
        font-size: 24px;
      }

      .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 20px;
      }

      /* Компактные категории */
      .categories {
        margin-bottom: 12px;
        gap: 6px;
      }

      .category-btn {
        padding: 6px 12px;
        font-size: 13px;
      }

      /* Адаптивная сетка товаров для landscape */
      .products-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        overflow-x: visible;
        overflow-y: auto;
      }

      .products-grid-2col {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      }

      .product-card {
        width: 100%;
        height: auto;
        min-height: 120px;
        padding: 10px;
      }

      .product-image {
        width: 60px;
        height: 60px;
        font-size: 36px;
        margin-bottom: 8px;
      }

      .product-name {
        font-size: 12px;
        margin-bottom: 4px;
      }

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

      /* Компактные отступы для страниц */
      .page {
        padding-top: 40px;
      }

      #home-page {
        padding-top: 30px;
      }

      /* Адаптивные карточки заказов и корзины */
      .cart-item,
      .order-item {
        padding: 12px;
      }

      /* Компактные кнопки */
      .btn {
        padding: 10px 16px;
        font-size: 14px;
      }

      /* Адаптивный контейнер приложения */
      #app {
        max-width: 100%;
        padding: 0 12px;
      }
    }

    /* Для больших landscape экранов (планшеты) */
    @media (orientation: landscape) and (min-height: 601px) and (max-height: 900px) {

      /* Умеренные отступы */
      :root {
        --top-padding-min: 16px;
        --top-padding-max: 28px;
      }

      /* Сетка товаров - больше колонок */
      .products-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
        overflow-x: visible;
      }

      .products-grid-2col {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      }

      .product-card {
        width: 100%;
        min-height: 140px;
      }

      /* Адаптивный контейнер */
      #app {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
      }
    }

    /* Для очень больших landscape экранов */
    @media (orientation: landscape) and (min-height: 901px) {

      /* Полноценные отступы */
      :root {
        --top-padding-min: 24px;
        --top-padding-max: 40px;
      }

      /* Максимальная ширина контейнера */
      #app {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 24px;
      }

      /* Больше колонок в сетке */
      .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
      }

      .products-grid-2col {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      }
    }

    /* Дополнительные адаптации для всех landscape режимов */
    @media (orientation: landscape) {

      /* Улучшенная прокрутка */
      .products-grid {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        overflow-x: hidden;
      }

      /* Компактные модальные окна */
      .modal-content {
        max-height: 90vh;
        max-width: 90vw;
      }

      /* Адаптивные формы */
      .form-group {
        margin-bottom: 12px;
      }

      .form-input {
        padding: 10px 14px;
        font-size: 14px;
      }

      /* Компактные секции */
      .section-title {
        font-size: 18px;
        margin-bottom: 12px;
      }
    }

    /* Заглушка технических работ */
    .maintenance-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--color-bg);
      z-index: 99999;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 24px;
      text-align: center;
    }

    .maintenance-icon {
      font-size: 80px;
      margin-bottom: 24px;
      animation: pulse 2s infinite;
    }

    

    .maintenance-title {
      font-size: 24px;
      font-weight: 700;
      color: var(--color-text);
      margin-bottom: 16px;
    }

    .maintenance-text {
      font-size: 16px;
      color: var(--color-text-muted);
      max-width: 400px;
      line-height: 1.6;
      margin-bottom: 24px;
    }

    .maintenance-timer {
      background: var(--color-bg-secondary);
      border-radius: 16px;
      padding: 20px 32px;
      margin-top: 16px;
    }

    .maintenance-timer-label {
      font-size: 14px;
      color: var(--color-text-muted);
      margin-bottom: 8px;
    }

    .maintenance-timer-value {
      font-size: 32px;
      font-weight: 700;
      color: var(--color-primary);
      font-variant-numeric: tabular-nums;
    }

/* Extracted Additional Styles */
.modal-overlay {
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: rgba(0, 0, 0, 0.7);
          backdrop-filter: blur(8px);
          display: flex;
          align-items: center;
          justify-content: center;
          z-index: 10000;
          padding: 0;
          animation: fadeIn 0.3s ease-in-out;
        }

        
.coffee-shop-btn {
          padding: 16px;
          background: rgba(48, 43, 40, 0.6);
          border: 1px solid rgba(255, 255, 255, 0.1);
          border-radius: 12px;
          color: white;
          cursor: pointer;
          transition: all 0.3s;
          text-align: left;
          margin-bottom: 12px;
          width: 100%;
        }

        .coffee-shop-btn:hover {
          background: rgba(169, 124, 55, 0.2);
          border-color: rgba(169, 124, 55, 0.5);
        }

        .coffee-shop-btn.active {
          background: rgba(169, 124, 55, 0.3);
          border: 2px solid #a97c37;
        }

        .coffee-shop-btn-name {
          font-size: 16px;
          font-weight: 600;
          margin-bottom: 4px;
        }

        .coffee-shop-btn-address {
          font-size: 12px;
          color: rgba(255, 255, 255, 0.6);
        }

        .coffee-shop-btn-selected {
          margin-top: 8px;
          font-size: 12px;
          color: #a97c37;
          font-weight: 600;
        }