* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #000;
  color: #ffffff;
  line-height: 1.6;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  background: #121212;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
  border-radius: 16px;
  position: relative;
}

/* ———————————————————
   Главный заголовок магазина
——————————————————— */

.main-header {
  text-align: center;
  padding: 24px 0 16px;
}

.main-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: #ffdd57; /* Ярко-жёлтый — контрастный акцент */
  letter-spacing: -0.8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ———————————————————
   Карусель баннеров
——————————————————— */

.banner-carousel {
  position: relative;
  width: 100%;
  height: 180px;
  margin: 20px 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border: 1px solid #333;
}

.banner-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.banner-item.active {
  opacity: 1;
}

.banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9); /* чуть затемним, чтобы текст поверх был читаем */
}

/* ———————————————————
   Поиск
——————————————————— */

.search-section {
  margin: 24px 0;
}

#search {
  width: 100%;
  padding: 16px;
  border: 2px solid #444;
  border-radius: 14px;
  font-size: 16px;
  background: #1e1e1e;
  color: white;
  outline: none;
  transition: all 0.3s;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

#search:focus {
  border-color: #ffdd57;
  box-shadow: 0 0 0 2px rgba(255, 221, 87, 0.3);
}

#search::placeholder {
  color: #aaa;
}

/* ———————————————————
   Заголовки секций
——————————————————— */

.section-title {
  margin: 30px 0 16px;
}

.section-title h2 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid #ffdd57;
  padding-left: 12px;
}

/* ———————————————————
   Сетка категорий
——————————————————— */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.category-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.category-card:hover {
  background: #2a2a2a;
  border-color: #ffdd57;
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(255, 221, 87, 0.2);
}

.category-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

/* ———————————————————
   Сетка товаров
——————————————————— */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.product-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: #ffdd57;
  box-shadow: 0 8px 24px rgba(255, 221, 87, 0.25);
}

.product-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.3;
}

.product-card p.price {
  font-weight: 800;
  font-size: 20px;
  color: #ff6b6b; /* Ярко-красный — акцент на цене */
  margin: 10px 0;
}

.product-card p.desc {
  font-size: 14px;
  color: #bbb;
  margin-bottom: 16px;
  line-height: 1.5;
}

.product-card button {
  width: 100%;
  padding: 14px;
  background: #ffdd57;
  color: #000;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.product-card button:hover {
  background: #ffd130;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 221, 87, 0.4);
}

/* ———————————————————
   Вкладки (Tabs)
——————————————————— */

.tabs {
  display: flex;
  gap: 12px;
  margin: 30px 0 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab {
  padding: 12px 20px;
  border: none;
  background: #2a2a2a;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: #ddd;
  transition: all 0.3s;
}

.tab.active {
  background: #ffdd57;
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 221, 87, 0.4);
}

.tab:hover:not(.active) {
  background: #3a3a3a;
  color: #fff;
}

/* ———————————————————
   Корзина
——————————————————— */

#cart {
  display: none;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #333;
}

.cart-item div:first-child {
  flex: 1;
}

.cart-item strong {
  color: #ffffff;
  font-size: 16px;
}

.cart-item small {
  color: #aaa;
  font-size: 13px;
}

.cart-item button.remove-btn {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  margin-left: 12px;
  transition: background 0.3s;
}

.cart-item button.remove-btn:hover {
  background: #c0392b;
}

#cart-total {
  font-size: 20px;
  font-weight: 800;
  margin: 24px 0;
  text-align: right;
  color: #ffdd57;
}

#checkout {
  background: #27ae60;
  color: white;
  font-weight: 700;
}

#checkout:hover {
  background: #229954;
  transform: translateY(-2px);
}

/* ———————————————————
   Админка (стили заранее)
——————————————————— */

#my-shop, #admin {
  display: none;
}

input, textarea, select {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #444;
  border-radius: 12px;
  font-size: 16px;
  background: #1e1e1e;
  color: white;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: #ffdd57;
  box-shadow: 0 0 0 2px rgba(255, 221, 87, 0.3);
}

.btn {
  background: #ffdd57;
  color: #000;
  border: none;
  padding: 16px 28px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  margin: 20px 0;
  transition: all 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  background: #ffd130;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 221, 87, 0.4);
}

/* ———————————————————
   Footer
——————————————————— */

footer {
  text-align: center;
  margin-top: 50px;
  padding: 24px 0;
  color: #888;
  font-size: 14px;
  border-top: 1px solid #333;
}

/* ———————————————————
   Адаптивность
——————————————————— */

@media (max-width: 480px) {
  .app {
    padding: 12px;
    border-radius: 0;
  }

  .main-header h1 {
    font-size: 26px;
  }

  .banner-carousel {
    height: 150px;
    border-radius: 12px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-title h2 {
    font-size: 20px;
  }

  .tab {
    padding: 10px 16px;
    font-size: 15px;
  }
}