  :root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #f9fafc;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-soft: #eef1f5;
    --brand: #111827;
    --brand-soft: #f3f4f6;
    --accent: #ff6b35;
    --accent-soft: #fff1eb;
    --success: #16a34a;
    --danger: #ef4444;
    --shadow-sm: 0 4px 14px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 10px 30px rgba(17, 24, 39, 0.08);
    --shadow-lg: 0 18px 44px rgba(17, 24, 39, 0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
  }


  .glovo-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    min-height: calc(100vh - 180px);
    padding: 8px 12px 40px;
  }

  /* ===== SIDEBAR ===== */
  .glovo-sidebar {
    width: 290px;
    flex-shrink: 0;
    position: sticky;
    top: 88px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    padding: 12px;
  }

  .glovo-sidebar::-webkit-scrollbar {
    width: 6px;
  }

  .glovo-sidebar::-webkit-scrollbar-thumb {
    background: #d7dce4;
    border-radius: 999px;
  }

  .sidebar-category-group {
    border-bottom: 1px solid var(--line-soft);
    padding: 6px 0;
  }

  .sidebar-category-group:last-child {
    border-bottom: none;
  }

  .sidebar-category-item,
  .sidebar-subcategory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.18s ease;
    position: relative;
  }

  .sidebar-category-item {
    padding: 14px 14px;
    margin: 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    border-radius: 16px;
  }

  .sidebar-subcategory-item {
    padding: 12px 14px;
    margin: 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    border-radius: 14px;
  }

  .sidebar-category-item:hover,
  .sidebar-subcategory-item:hover {
    background: var(--surface-2);
  }

  .sidebar-category-item.active {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #fff;
    box-shadow: var(--shadow-sm);
  }

  .sidebar-category-item.active .sidebar-category-name,
  .sidebar-category-item.active .sidebar-chevron {
    color: #fff;
  }

  .sidebar-subcategory-item.active {
    background: #f3f4f6;
    color: var(--brand);
    font-weight: 700;
  }

  /* --- Стили для Акций и Избранного --- */
  .sidebar-favorite-item,
  .sidebar-promo-item {
    margin-bottom: 8px !important;
  }

  .sidebar-favorite-item {
    background: #fff0f0 !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.1) !important;
  }

  .sidebar-favorite-item:hover {
    background: #ffebeb !important;
    transform: scale(1.02);
  }

  .sidebar-favorite-item.active {
    background: linear-gradient(135deg, #ef4444 0%, #ff6b6b 100%) !important;
    color: #fff !important;
    border: none !important;
  }

  .sidebar-promo-item {
    background: #fff1eb !important;
    color: #ff6b35 !important;
    border: 1px solid rgba(255, 107, 53, 0.2) !important;
    position: relative;
    overflow: hidden;
  }

  .sidebar-promo-item:hover {
    background: #ffe4d9 !important;
    color: #e65a2b !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
  }

  .sidebar-promo-item.active {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c61 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3);
  }


  .sidebar-promo-item:hover span:first-child {
    display: inline-block;
    animation: fire-shake 0.3s infinite alternate;
  }

  @keyframes fire-shake {
    0% { transform: rotate(-10deg); }
    100% { transform: rotate(10deg); }
  }

  .sidebar-category-name {
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-chevron,
  .sidebar-sub-chevron {
    font-size: 13px;
    color: var(--muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }

  .sidebar-category-item.expanded .sidebar-chevron,
  .sidebar-subcategory-item.expanded .sidebar-sub-chevron {
    transform: rotate(180deg);
  }

  .sidebar-subcategories,
  .sidebar-subsubcategories {
    display: none;
    padding: 4px 0 8px;
  }

  .sidebar-subcategories.show,
  .sidebar-subsubcategories.show {
    display: block;
  }

  .sidebar-subsubcategory-item {
    display: block;
    padding: 10px 14px 10px 36px;
    margin: 2px 0;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 12px;
    transition: 0.18s ease;
  }

  .sidebar-subsubcategory-item:hover {
    background: var(--surface-2);
    color: var(--text);
  }

  .sidebar-subsubcategory-item.active {
    background: #eef2ff;
    color: #1d4ed8;
    font-weight: 700;
  }

  .sidebar-favorite-item {
    background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 100%);
    border: 1px solid #ffe4e6;
  }

  .sidebar-favorite-item.active {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  }

  .sidebar-favorite-item.active .sidebar-category-name {
    color: #fff;
  }

  /* ===== CONTENT ===== */
  .glovo-content {
    flex: 1;
    min-width: 0;
    background: transparent;
    padding: 0 0 30px;
  }

  .catalog-branding {
    background:
      radial-gradient(circle at top right, rgba(255,107,53,0.10), transparent 28%),
      radial-gradient(circle at left center, rgba(17,24,39,0.05), transparent 30%),
      linear-gradient(135deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid var(--line-soft);
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    padding: 30px 32px 24px;
    margin-bottom: 18px;
    overflow: hidden;
    position: relative;
    z-index: 1;
  }

  .catalog-branding-img {
    position: absolute;
    right: -10px;
    bottom: -35px;
    width: 310px;
    height: auto;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }

  .catalog-branding::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,107,53,0.14), transparent 65%);
    pointer-events: none;
  }

  .catalog-title-wrapper {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
  }

  .catalog-main-title {
    margin: 0;
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1.4px;
    color: var(--brand);
  }

  .catalog-horizontal-line {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #ffb089);
  }

  .catalog-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    position: relative;
    z-index: 1;
  }

  .info-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.78);
    border: 1px solid var(--line-soft);
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(17,24,39,0.04);
  }

  .info-highlight {
    color: var(--brand);
    font-weight: 800;
  }

  .content-header {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    padding: 20px 24px;
    margin-bottom: 22px;
  }

  .content-title {
    margin: 0 0 16px;
    color: var(--brand);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
  }

  /* ===== FILTERS ===== */
  .filters-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }

  .filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--brand);
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
  }

  .filter-toggle-btn:hover {
    background: #eef2f7;
    transform: translateY(-1px);
  }

  .filter-toggle-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
  }

  .filters-dropdown {
    display: none;
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #fafbff 0%, #f7f8fc 100%);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
  }

  .filters-dropdown.show {
    display: block;
  }

  .filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }

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

  .filter-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
  }

  .filter-select,
  .filter-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: 0.18s ease;
  }

  .filter-select:focus,
  .filter-input:focus {
    border-color: #c7d2fe;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.10);
  }

  .filter-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
  }

  .filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
  }

  .filter-submit,
  .filter-reset,
  .show-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.18s ease;
  }

  .filter-submit,
  .show-all-btn {
    border: none;
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }

  .filter-submit:hover,
  .show-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }

  .filter-reset {
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--line);
  }

  .filter-reset:hover {
    background: var(--surface-2);
  }

  /* ===== SECTIONS ===== */
  .category-section,
  .overview-section {
    background: transparent;
    padding: 0;
    scroll-margin-top: 100px;
    margin-bottom: 30px;
  }

  .section-title,
  .overview-title {
    margin: 0 0 16px;
    color: var(--brand);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
  }

  .overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    background: transparent;
  }

  .overview-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }

  .scroll-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 18px;
    color: var(--brand);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.18s ease;
    box-shadow: var(--shadow-sm);
  }

  .scroll-arrow:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }

  /* ===== CATEGORY TILES ===== */
  .tiles-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 2px 10px;
  }

  .tiles-container::-webkit-scrollbar {
    height: 6px;
  }

  .tiles-container::-webkit-scrollbar-thumb {
    background: #d7dce4;
    border-radius: 999px;
  }

  .category-tile {
    width: 180px;
    flex: 0 0 180px;
    text-decoration: none;
  }

  .tile-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: 0.2s ease;
  }

  .tile-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%);
    padding: 3px;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
    transition: 0.2s ease;
      backface-visibility: inherit;

  }

  .category-tile:hover .tile-image-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(0, 0, 0, 0.8) 100%);
    transform: translateY(-4px);
  }

  .tile-image,
  .tile-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    background: #ececec;
  }

  .tile-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    padding: 0 4px;
    white-space: normal;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* ===== PRODUCT LIST DESKTOP ===== */
  .product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
  }

  .product-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: 0.2s ease;
  }

  .product-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

  .product-image-link {
    display: block;
    width: calc(100% - 12px);
    margin: 6px auto 0;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    border-radius: 14px;
  }

  .product-image,
  .product-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
  }

  .product-info {
    padding: 8px 8px 6px;
    min-width: 0;
  }

  .product-name-link {
    text-decoration: none;
    color: inherit;
  }

  .product-name {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--text);
    min-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .product-description {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
  }

  .product-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .product-price {
    font-size: 17px;
    font-weight: 900;
    color: var(--brand);
  }

  .product-price-old {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
  }

  .product-discount-badge {
    padding: 4px 6px;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.18);
  }

  .product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px 8px;
  }

  .favorite-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.18s ease;
    box-shadow: var(--shadow-sm);
  }

  .favorite-btn:hover {
    transform: scale(1.06);
    box-shadow: var(--shadow-md);
  }

  .qty-controls,
  .product-actions > .qty-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 3px;
    margin-left: auto;
    transition: all 0.25s ease;
  }

  .qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.18s ease;
  }

  .qty-btn:hover {
    background: #f3f4f6;
  }

  .qty-btn.qty-plus {
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    border-color: #111827;
    color: #fff;
  }

  .qty-btn.qty-plus.has-qty {
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--line);
  }

  .qty-btn.qty-plus.has-qty:hover {
    background: #f3f4f6;
  }

  .qty-btn.qty-plus:hover:not(:disabled) {
    filter: brightness(1.05);
  }

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

  .qty-value {
    min-width: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--brand);
  }

  .empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 24px;
    color: var(--muted);
  }

  .empty-state-icon {
    font-size: 54px;
    margin-bottom: 14px;
  }

  .empty-state-text {
    font-size: 16px;
    font-weight: 700;
  }

  /* ===== MOBILE ===== */
  @media (max-width: 1024px) {
    .glovo-container {
      gap: 16px;
      padding: 8px 10px 28px;
    }

    .glovo-sidebar {
      width: 250px;
    }

    .catalog-main-title {
      font-size: 34px;
    }
  }

  @media (max-width: 768px) {
    .glovo-container {
      flex-direction: column;
      gap: 14px;
      padding: 6px 8px 24px;
    }

    .glovo-sidebar {
      display: flex !important;
      position: sticky;
      top: 62px;
      width: 100%;
      max-height: none;
      overflow-x: auto;
      overflow-y: hidden;
      flex-direction: row;
      padding: 10px;
      border-radius: 18px;
      z-index: 100;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .glovo-sidebar::-webkit-scrollbar {
      display: none;
    }

    .sidebar-category-group {
      display: flex;
      flex-direction: row;
      border-bottom: none;
      padding: 0;
    }

    .sidebar-category-item {
      white-space: nowrap;
      margin: 0 6px 0 0;
      padding: 10px 14px;
      font-size: 14px;
      border-radius: 999px;
      background: #fff;
      border: 1px solid var(--line);
    }

    .sidebar-category-item.active {
      background: linear-gradient(135deg, #111827 0%, #374151 100%);
      color: #fff;
    }

    .sidebar-chevron,
    .sidebar-subcategories {
      display: none !important;
    }

    .catalog-branding {
      padding: 22px 18px 18px;
      border-radius: 22px;
    }

    .catalog-branding-img {
      width: 180px;
      right: -5px;
      bottom: -15px;
      opacity: 0.8;
    }

    .catalog-title-wrapper {
      gap: 12px;
      align-items: center;
    }

    .catalog-main-title {
      font-size: 26px;
      letter-spacing: -0.8px;
    }

    .catalog-horizontal-line {
      height: 5px;
    }

    .content-header {
      padding: 16px;
      border-radius: 20px;
    }

    .content-title {
      font-size: 24px;
      margin-bottom: 12px;
    }

    .filter-grid {
      grid-template-columns: 1fr;
    }

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

    .product-item {
      border-radius: 20px;
    }

    .product-image-link {
      width: calc(100% - 24px);
      margin: 12px auto 0;
      padding: 0;
      border-radius: 12px;
    }

    .product-info {
      padding: 8px 8px 6px;
    }

    .product-name {
      font-size: 15px;
      min-height: 2.6em;
    }

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

    .product-actions {
      padding: 0 8px 8px;
      align-items: center;
    }

    .favorite-btn {
      width: 40px;
      height: 40px;
      font-size: 18px;
    }

    .qty-controls {
      gap: 6px;
      padding: 3px;
    }

    .qty-btn {
      width: 36px;
      height: 36px;
      font-size: 20px;
    }

    .tile-image-container {
      width: 100%;
    }

    .category-tile {
      width: 150px;
      flex-basis: 150px;
    }
  }

  @media (max-width: 480px) {
    .catalog-main-title {
      font-size: 22px;
    }

    .info-item {
      width: 100%;
      justify-content: flex-start;
      border-radius: 16px;
    }

    .product-list {
      gap: 8px;
    }

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

    .product-price {
      font-size: 15px;
    }
  }
.qty-controls.loading {
  opacity: 0.7;
  pointer-events: none;
}
.qty-controls.loading .qty-btn {
  cursor: wait;
}
