:root {
  --bg-color: #0f1117;
  --card-bg: #1a1d26;
  --accent-color: #ff3366;
  --text-main: #ffffff;
  --text-muted: #9aa0a6;
  --border-color: #2e323e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Шапка */
.header {
  background: rgba(15, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.85;
}

.logo span {
  color: var(--accent-color);
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 15px;
  font-weight: 500;
  transition: color 0.3s;
}

.nav a:hover {
  color: var(--accent-color);
}

.cart-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-badge {
  background: #fff;
  color: var(--accent-color);
  padding: 2px 7px;
  border-radius: 50%;
  font-size: 0.85rem;
}

/* Баннер */
.hero {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,51,102,0.1) 0%, rgba(15,17,23,0) 100%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 15px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

/* Каталог */
.catalog {
  padding: 40px 0 80px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* Сетка карточек */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.product-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s, border-color 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

.badge-new {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 10px;
  z-index: 2;
}

.product-img-container {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
  background: #12141c;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-brand {
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 5px 0 10px;
}

/* Размеры */
.size-picker-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.sizes-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.size-btn {
  background: #12141c;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover {
  border-color: var(--accent-color);
}

.size-btn.selected {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  font-weight: bold;
}

.product-bottom {
  margin-top: auto;
}

.details-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  margin-bottom: 12px;
  display: inline-block;
}

.details-btn:hover {
  color: #fff;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 800;
}

.add-to-cart-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.add-to-cart-btn:hover {
  opacity: 0.9;
}

/* Модальные окна */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  position: relative;
  border: 1px solid var(--border-color);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Корзина детали */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #12141c;
  padding: 12px 15px;
  border-radius: 12px;
}

.cart-item-info h4 {
  font-size: 0.95rem;
}

.cart-item-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.cart-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.checkout-btn {
  width: 100%;
  background: #28a745;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.checkout-btn:hover {
  background: #218838;
}

/* Детали товара во всплывающем окне */
.product-detail-modal img {
  width: 100%;
  border-radius: 12px;
  max-height: 220px;
  object-fit: cover;
  margin-bottom: 15px;
}

.specs-list {
  list-style: none;
  margin: 15px 0;
}

.specs-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}

.specs-list span {
  color: var(--text-muted);
}

.footer {
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}