.drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
  }
  
  .drawer[hidden] {
    display: none;
  }
  
  .drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 28, 0.45);
    backdrop-filter: blur(3px);
  }
  
  .drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
  
    width: 420px;
    max-width: 92vw;
  
    background: #fff;
  
    display: flex;
    flex-direction: column;
  
    box-shadow: -20px 0 60px rgba(15, 20, 28, 0.2);
  
    animation: slideIn 0.25s ease;
  }
  
  @keyframes slideIn {
    from {
      transform: translateX(100%);
    }
  
    to {
      transform: translateX(0);
    }
  }
  
  
  /* ============================================================
     HEADER
     ============================================================ */
  
  .drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  
    padding: 20px 24px;
  
    border-bottom: 1px solid #e8eaee;
  }
  
  .drawer__tabs {
    display: flex;
    gap: 8px;
  }
  
  .drawer__tab {
    padding: 8px 16px;
  
    font-size: 14px;
    font-weight: 700;
  
    color: #9aa1ad;
  
    cursor: pointer;
  
    background: none;
    border: none;
  }
  
  .drawer__tab.is-active {
    color: #0f1419;
    border-bottom: 2px solid #0f1419;
  }
  
  .drawer__x {
    font-size: 18px;
  
    color: #9aa1ad;
  
    cursor: pointer;
  
    background: none;
    border: none;
  }
  
  
  /* ============================================================
     BODY
     ============================================================ */
  
  .drawer__body {
    flex: 1;
  
    overflow-y: auto;
  
    padding: 16px 24px;
  }
  
  .drawer__empty {
    text-align: center;
  
    color: #9aa1ad;
  
    padding: 60px 20px;
  }
  
  
  /* ============================================================
     FOOTER
     ============================================================ */
  
  .drawer__foot {
    padding: 20px 24px;
  
    border-top: 1px solid #e8eaee;
  }
  
  .drawer__total {
    display: flex;
    justify-content: space-between;
  
    font-weight: 800;
    font-size: 18px;
  
    margin-bottom: 14px;
  }
  
  .drawer__checkout {
    width: 100%;
    height: 50px;
  
    background: #111827;
    color: #fff;
  
    border: none;
  
    font-weight: 700;
    font-size: 15px;
  
    cursor: pointer;
  }
  
  .drawer__checkout:hover {
    background: #1e252f;
  }
  
  
  /* ============================================================
     ТОВАР
     ============================================================ */
  
  .drawer-item {
    display: flex;
  
    gap: 12px;
  
    padding: 14px 0;
  
    border-bottom: 1px solid #f0f1f4;
  
    align-items: center;
  }
  
  .drawer-item__img {
    width: 60px;
    height: 60px;
  
    background: #f2f3f6;
  
    flex-shrink: 0;
  }
  
  .drawer-item__img img {
    width: 100%;
    height: 100%;
  
    object-fit: cover;
  }
  
  .drawer-item__info {
    flex: 1;
  
    min-width: 0;
  }
  
  .drawer-item__brand {
    font-size: 10px;
  
    font-weight: 700;
  
    text-transform: uppercase;
  
    color: #9aa1ad;
  }
  
  .drawer-item__name {
    font-size: 13px;
  
    font-weight: 600;
  
    color: #0f1419;
  
    display: block;
  }
  
  .drawer-item__price {
    font-size: 14px;
  
    font-weight: 800;
  
    margin-top: 2px;
  }
  
  
  /* ============================================================
     КОРЗИНА — КОЛИЧЕСТВО
     ============================================================ */
  
  .drawer-item__controls {
    display: flex;
  
    align-items: center;
  
    gap: 6px;
  }
  
  .qty-btn {
    width: 26px;
    height: 26px;
  
    border: 1px solid #d8dbe2;
  
    background: #fff;
  
    font-weight: 700;
  
    cursor: pointer;
  }
  
  .qty {
    min-width: 24px;
  
    text-align: center;
  
    font-weight: 700;
  
    font-size: 14px;
  }
  
  .drawer-item__del {
    margin-left: 6px;
  
    color: #9aa1ad;
  
    background: none;
  
    border: none;
  
    cursor: pointer;
  }
  
  
  /* ============================================================
     ОБЩАЯ КНОПКА «В КОРЗИНУ»
     ============================================================ */
  
  .drawer-item__tocart {
    padding: 8px 12px;
  
    background: #111827;
  
    color: #fff;
  
    border: none;
  
    font-family: inherit;
  
    font-size: 12px;
  
    font-weight: 700;
  
    cursor: pointer;
  
    white-space: nowrap;
  }
  
  .drawer-item__tocart:hover {
    background: #1e252f;
  }
  
  
  /* ============================================================
     ИЗБРАННОЕ
     ============================================================ */
  
  .drawer-item--fav {
    display: flex;
  
    align-items: center;
  
    gap: 12px;
  }
  
  
  
  .drawer-item--fav .drawer-item__info {
    flex: 1;
  
    min-width: 0;
  }
  
  
  
  .drawer-item--fav .drawer-item__actions {
    display: flex;
  
    flex-direction: column;
  
    align-items: flex-end;
  
    justify-content: center;
  
    gap: 7px;
  
    flex-shrink: 0;
  }
  
  
  /* ============================================================
     ИЗБРАННОЕ — В КОРЗИНУ
     ============================================================ */
  
  .drawer-item--fav .drawer-item__tocart {
    padding: 8px 12px;
  
    background: #111827;
  
    color: #fff;
  
    border: none;
  
    font-family: inherit;
  
    font-size: 12px;
  
    font-weight: 700;
  
    cursor: pointer;
  
    white-space: nowrap;
  }
  
  .drawer-item--fav .drawer-item__tocart:hover {
    background: #1e252f;
  }
  
  
  /* ============================================================
     ИЗБРАННОЕ — УДАЛИТЬ
     ============================================================ */
  
  .drawer-item--fav .drawer-item__remove-fav {
    padding: 0;
  
    border: none;
  
    background: transparent;
  
    color: #9aa1ad;
  
    font-family: inherit;
  
    font-size: 12px;
  
    font-weight: 600;
  
    line-height: 1;
  
    cursor: pointer;
  
    white-space: nowrap;
  }
  
  .drawer-item--fav .drawer-item__remove-fav:hover {
    color: #0f1419;
  }
  
  
  /* ============================================================
     CART BADGE
     ============================================================ */
  
  .header__cart {
    position: relative;
  }
  
  /* иначе display перебивает hidden */
  .header__cart-badge[hidden] {
    display: none;
  }

  .header__cart-badge {
    position: absolute;
  
    top: -4px;
    right: -4px;
  
    min-width: 18px;
    height: 18px;
  
    padding: 0 4px;
  
    background: #e11d48;
    color: #fff;
  
    border-radius: 999px;
  
    font-size: 11px;
    font-weight: 700;
  
    display: flex;
  
    align-items: center;
    justify-content: center;
  }

  /* ============================================================
     АККАУНТ (блок сверху панели)
     ============================================================ */

  .drawer__account {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 14px 24px;

    background: #f7f8fa;
    border-bottom: 1px solid #e8eaee;
  }

  .drawer__account-phone {
    font-size: 14px;
    font-weight: 700;

    color: #0f1419;
  }

  .drawer__account-actions {
    display: flex;

    align-items: center;

    gap: 12px;
  }

  .drawer__account-form {
    display: inline-flex;
  }

  .drawer__account-logout {
    padding: 0;

    border: none;
    background: transparent;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    color: #0f1419;

    cursor: pointer;
  }

  .drawer__account-logout:hover {
    color: #1e252f;
  }

  .drawer__account-delete {
    padding: 0;

    border: none;
    background: transparent;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    color: #9aa1ad;

    cursor: pointer;
  }

  .drawer__account-delete:hover {
    color: #e11d48;
  }


  /* ============================================================
     МОИ ЗАКАЗЫ
     ============================================================ */

  .drawer-order {
    padding: 14px 0;

    border-bottom: 1px solid #f0f1f4;
  }

  .drawer-order__row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 8px;
  }

  .drawer-order__row + .drawer-order__row {
    margin-top: 6px;
  }

  .drawer-order__number {
    font-size: 13px;
    font-weight: 700;

    color: #0f1419;
  }

  .drawer-order__date {
    font-size: 12px;
    font-weight: 600;

    color: #9aa1ad;
  }

  .drawer-order__status {
    font-size: 12px;
    font-weight: 600;

    color: #0f1419;
  }

  .drawer-order__total {
    font-size: 14px;
    font-weight: 800;

    color: #0f1419;
  }

  .drawer-order__meta {
    font-size: 12px;

    color: #9aa1ad;
  }

  .drawer-order__invoice {
    font-size: 12px;
    font-weight: 700;

    color: #111827;

    text-decoration: underline;
  }

  .drawer-order__invoice:hover {
    color: #1e252f;
  }


  /* ============================================================
     МОБИЛЬНАЯ АДАПТАЦИЯ (ТОЛЬКО ТЕЛЕФОНЫ)
     ============================================================ */

  @media (max-width: 640px) {
    .drawer__panel {
      width: 100%;
      max-width: 100vw;
    }

    .drawer__head {
      padding: 14px 16px;
    }

    .drawer__tabs {
      gap: 2px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .drawer__tab {
      padding: 10px 10px;
      font-size: 12.5px;
      white-space: nowrap;
    }

    .drawer__x {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      flex: 0 0 auto;
    }

    .drawer__body {
      padding: 12px 16px;
    }

    .drawer__foot {
      padding: 14px 16px;
    }

    .drawer__checkout {
      height: 48px;
    }

    .drawer__account {
      padding: 12px 16px;
      flex-wrap: wrap;
      gap: 10px;
    }

    .drawer__account-actions {
      gap: 14px;
    }

    .drawer-item {
      flex-wrap: wrap;
      gap: 10px;
      padding: 12px 0;
    }

    .drawer-item__img {
      width: 52px;
      height: 52px;
    }

    .drawer-item__controls {
      flex: 1 0 100%;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 4px;
    }

    .qty-btn {
      width: 38px;
      height: 38px;
      font-size: 16px;
    }

    .qty {
      min-width: 28px;
      font-size: 15px;
    }

    .drawer-item__del {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      margin-left: 2px;
    }

    .drawer-item--fav {
      flex-wrap: wrap;
    }

    .drawer-item--fav .drawer-item__actions {
      flex: 1 0 100%;
      flex-direction: row;
      align-items: center;
      justify-content: flex-end;
      margin-top: 6px;
    }

    .drawer-item--fav .drawer-item__remove-fav {
      padding: 10px 4px;
    }

    .drawer-item--fav .drawer-item__tocart {
      padding: 10px 14px;
    }

    .drawer-order {
      padding: 12px 0;
    }

    .drawer-order__invoice {
      display: inline-block;
      padding: 6px 0;
    }
  }
