* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Onest', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: #f6f6f6;
  padding-bottom: 80px;
}

/* HEADER */
.header {
  background: #ff2f5b;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.logo {
  height: 50px;
}

/* SEARCH */
.search-box {
  padding: 15px;
}

.search-box input {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-size: 14px;
}

/* CATEGORIES */
.categories {
  display: flex;
  gap: 10px;
  padding: 10px 15px;
  overflow-x: auto;
}

.category {
  background: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  white-space: nowrap;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* POPULAR */
.popular {
  padding: 15px;
}

.popular h2 {
  margin-bottom: 12px;
}

.product-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.product-card img {
  width: 100%;
  height: auto;
}

.product-info {
  padding: 15px;
}

.price {
  font-weight: 700;
  font-size: 18px;
}

.title {
  margin: 6px 0 12px;
  color: #555;
}

.buy-btn {
  background: #6a5cff;
  color: #fff;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 14px;
  font-size: 15px;
  cursor: pointer;
}

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  border-top: 1px solid #eee;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: #999;
}

.nav-item.active {
  color: #6a5cff;
}

.logo {
  height: 48px;
  object-fit: contain;
}

.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  border-radius: 8px;
}

.product-card button {
  margin-top: 8px;
  padding: 8px;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: white;
  font-size: 14px;
}

/* ===== CART PAGE ===== */

.back-btn {
  text-decoration: none;
  color: #6b4eff;
  font-weight: 600;
}

.cart-container {
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cart-item img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-info {
  flex: 1;
}

.cart-info h3 {
  margin: 0;
  font-size: 16px;
}

.cart-info p {
  margin: 4px 0;
  color: #666;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-controls button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #eee;
  font-size: 16px;
  cursor: pointer;
}

.cart-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 16px;
  border-top: 1px solid #eee;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: #6b4eff;
  color: #fff;
  font-size: 16px;
  margin-top: 12px;
  cursor: pointer;
}

.cart-icon {
  margin-left: auto;
  text-decoration: none;
  font-size: 18px;
  color: #000;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-icon span {
  font-weight: 600;
}

.cart-title {
  color: #eee;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 0 auto;
}


.cart-count {
  position: absolute;
  top: -6px;
  right: -28px;

  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}


.cart-btn {
  margin-left: auto;
  position: relative;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  color: #000;
}

.cart-btn .cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #6b4eff;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 12px;
}

.back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  border-radius: 999px;

  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}



.header {
  position: relative;
}

button,
.cart-btn,
.back-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;
}

button:active,
.cart-btn:active,
.back-btn:active {
  transform: scale(0.96);
}

.checkout-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.checkout-btn:hover {
  box-shadow: 0 8px 18px rgba(107, 78, 255, 0.35);
}

.checkout-btn:active {
  transform: scale(0.95);
}

.cart-controls button:active {
  transform: scale(0.85);
}

.cart-info-right {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.checkout-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

button,
.checkout-btn {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

button:active,
.checkout-btn:active {
  transform: scale(0.96);
}

.cart-item {
  animation: fadeUp 0.25s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-controls span {
  display: inline-block;
  transition: transform 0.15s ease;
}

.cart-controls span.bump {
  transform: scale(1.15);
}

.total {
  font-weight: 600;
  display: inline-block;        /* 🔑 ВАЖНО */
  transform-origin: center;     /* 🔑 ВАЖНО */
  transition: transform 0.2s ease, color 0.2s ease;
}

.total.bump {
  transform: scale(1.08);
  color: #6c5ce7;
}

.total-value {
  display: inline-block;
  transform-origin: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.total-value.bump {
  transform: scale(1.08);
  color: #6c5ce7;
}

