* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.6;
}

/* ==================== HEADER ==================== */
header {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #1f1f1f;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}

header h1 span {
  color: #00ff88;
}

nav a {
  color: #ccc;
  text-decoration: none;
  margin: 0 18px;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #00ff88;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-right input {
  padding: 10px 16px;
  width: 280px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 50px;
  color: white;
  outline: none;
}

.header-right input:focus {
  border-color: #00ff88;
}

#cart-btn {
  padding: 10px 20px;
  background: #00ff88;
  color: black;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

#cart-btn:hover {
  background: #00cc6a;
  transform: translateY(-2px);
}

/* ==================== HERO ==================== */
.hero {
  background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.85)), #0a0a0a;
  padding: 100px 20px 80px;
  text-align: center;
}

.hero h2 {
  font-size: 3.2rem;
  color: #00ffcc;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.2rem;
  color: #aaa;
  max-width: 700px;
  margin: 0 auto 20px;
}

/* ==================== FILTERS ==================== */
.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 30px 20px;
  background: #111;
  flex-wrap: wrap;
}

.filters button {
  padding: 10px 24px;
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #333;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
}

.filters button:hover {
  background: #222;
}

.filters button.active {
  background: #00ff88;
  color: black;
  border-color: #00ff88;
}

/* ==================== PRODUCTS GRID ==================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  background: #111111;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #222;
  transition: all 0.3s ease;
  height: 100%; /* Важно для ровной сетки */
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: #00ff88;
  box-shadow: 0 15px 30px rgba(0, 255, 136, 0.15);
}

.product-image {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-card:hover img {
  transform: scale(1.08);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #00ff88;
  color: black;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
}

/* Информация в карточке */
.product-info {
  padding: 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  min-height: 50px;
}

.price {
  font-size: 1.6rem;
  font-weight: 700;
  color: #00ff88;
  margin: 8px 0;
}

.stock {
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.stock.in-stock {
  color: #00ff88;
}

.stock.out-of-stock {
  color: #ff5555;
}

.add-to-cart {
  margin-top: auto;
  padding: 14px;
  background: #00ff88;
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.3s;
}

.add-to-cart:hover {
  background: #00e077;
  transform: scale(1.03);
}

.add-to-cart:disabled {
  background: #333;
  color: #777;
  cursor: not-allowed;
}
/* ==================== FOOTER ==================== */
footer {
  background: #0a0a0a;
  padding: 50px 20px 30px;
  text-align: center;
  border-top: 1px solid #222;
}

footer p {
  color: #666;
  margin-top: 20px;
}

/* Адаптив */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2.6rem;
  }
  
  .header-right input {
    width: 200px;
  }
  
  nav {
    display: none; /* Можно потом сделать мобильное меню */
  }
}
/* ==================== CART PAGE ==================== */
.cart-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #222;
  padding-bottom: 15px;
}

.items-count {
  color: #00ff88;
  font-weight: 600;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
}

.cart-item {
  display: flex;
  align-items: center;
  background: #141414;
  border-radius: 16px;
  padding: 18px;
  gap: 20px;
  border: 1px solid #222;
}

.cart-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 20px;
}

.cart-item-controls button {
  width: 36px;
  height: 36px;
  background: #1f1f1f;
  border: 1px solid #333;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

.remove-btn {
  color: #ff5555;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
}

.cart-summary {
  background: #141414;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid #222;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.total-final {
  display: flex;
  justify-content: space-between;
  font-size: 1.4rem;
  margin: 20px 0;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.promo-code {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.promo-code input {
  flex: 1;
  padding: 12px;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 10px;
  color: white;
}

.checkout-btn {
  width: 100%;
  padding: 18px;
  font-size: 1.2rem;
  font-weight: 700;
  background: #00ff88;
  color: black;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 10px;
}

.delivery-info {
  text-align: center;
  font-size: 0.95rem;
  color: #888;
  margin-top: 20px;
}

.empty-cart {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.empty-cart h3 {
  margin-bottom: 15px;
  color: #aaa;
}