:root {
        --tg-theme-bg: #000000;
        --tg-card-bg: #1c1c1e;
        --tg-accent: #ffffff;
        --tg-button-bg: #2c2c2e;
        --tg-text-gray: #8e8e93;
        --tg-price-bg: #2c2c2e;
        --tg-input-bg: #1c1c1e;
      }
      body {
        font-family:
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        background-color: var(--tg-theme-bg);
        color: #ffffff;
        margin: 0;
        padding: 16px;
        padding-bottom: 100px;
        -webkit-user-select: none;
      }

      /* Поиск */
      .search-container {
        position: relative;
        margin-bottom: 20px;
      }
      .search-input {
        width: 100%;
        background: var(--tg-input-bg);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 12px 12px 12px 40px;
        color: white;
        font-size: 16px;
        box-sizing: border-box;
        outline: none;
      }
      .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--tg-text-gray);
      }

      /* Сетка товаров */
      .products-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
      }
      .card {
        background: var(--tg-card-bg);
        border-radius: 20px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border: 1px solid rgba(255, 255, 255, 0.05);
      }
      .card-img-container {
        position: relative;
        width: 100%;
        height: 160px;
      }
      .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      .price-badge {
        position: absolute;
        top: 10px;
        left: 10px;
        background: rgba(0, 0, 0, 0.6);
        padding: 4px 8px;
        border-radius: 8px;
        font-size: 12px;
        backdrop-filter: blur(5px);
      }
      .card-body {
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 4px;
      }
      .old-price {
        font-size: 12px;
        text-decoration: line-through;
        color: var(--tg-text-gray);
      }
      .current-price {
        font-weight: 800;
        font-size: 1.1em;
      }
      .card-title {
        font-size: 13px;
        font-weight: 700;
        color: #fff;
        margin-top: 4px;
      }
      .card-dur {
        font-size: 12px;
        color: var(--tg-text-gray);
      }
      .pay-method-btn {
        display: flex;
        align-items: center;
        gap: 12px;
        background: var(--tg-button-bg);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 14px;
        border-radius: 14px;
        margin-bottom: 10px;
        width: 100%;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
      }
      .pay-method-btn:active {
        transform: scale(0.98);
      }
      .pay-method-btn img {
        width: 24px;
        height: 24px;
      }
      .add-btn {
        background: var(--tg-button-bg);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px;
        border-radius: 14px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        margin-top: 8px;
        transition: all 0.2s ease;
      }
      .add-btn.added {
        background: white;
        color: black;
      }

      /* Модалки и слои */
      .layer {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        flex-direction: column;
      }
      .modal-overlay {
        background: rgba(0, 0, 0, 0.85);
        align-items: flex-end;
      }
      .modal-box {
        background: var(--tg-card-bg);
        width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 20px;
        box-sizing: border-box;
        animation: slideUp 0.3s ease-out;
      }
      @keyframes slideUp {
        from {
          transform: translateY(100%);
        }
        to {
          transform: translateY(0);
        }
      }

      .user-profile {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
      }
      .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--tg-button-bg);
      }
      .user-info {
        display: flex;
        flex-direction: column;
      }
      .user-name {
        font-weight: 700;
        font-size: 15px;
      }
      .user-tag {
        font-size: 12px;
        color: var(--tg-text-gray);
      }
      .cart-float {
        position: fixed;
        bottom: 24px;
        left: 16px;
        right: 16px;
        background: white;
        color: black;
        padding: 16px 20px;
        border-radius: 18px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 800;
        z-index: 900;
      }
      .cart-item {
        background: var(--tg-card-bg);
        padding: 16px;
        border-radius: 18px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        border: 1px solid rgba(255, 255, 255, 0.05);
      }

      #cart-page {
        background: var(--tg-theme-bg);
        padding: 20px;
        box-sizing: border-box;
      }