* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #222;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.header-main {
  text-align: left;
}

.header h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  color: #666;
}

.contacts {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-link {
  font-size: 12px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #0088cc;
  color: #0088cc;
}

.contact-link:hover {
  background-color: #e6f4ff;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  background-color: #e0e0e0;
}

.btn.primary {
  background-color: #0088cc;
  color: #fff;
}

.btn.danger {
  background-color: #e74c3c;
  color: #fff;
}

.btn.small {
  font-size: 12px;
  padding: 6px 10px;
}

.cart-btn {
  white-space: nowrap;
  font-size: 13px;
  padding: 6px 10px;
}

/* Категории */

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.category-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}

.category-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background-color: #eee;
}

.category-info {
  flex: 1;
}

.category-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-meta {
  font-size: 13px;
  color: #666;
}

/* Товары */

.products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.product-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background-color: #eee;
}

.product-info {
  flex: 1;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.product-subcategory {
  font-size: 12px;
  color: #777;
  margin-bottom: 2px;
}

.product-price {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.product-short {
  font-size: 13px;
  color: #555;
}

/* Страница товара */

.product-details {
  margin-top: 8px;
  background-color: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.product-details img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
}

.product-details h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.product-details .sku {
  font-size: 13px;
  color: #777;
  margin-bottom: 4px;
}

.product-details .price {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-details .description {
  font-size: 14px;
  color: #444;
  margin-bottom: 12px;
}

.sizes-row {
  margin-bottom: 12px;
}

.sizes-row label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.sizes-select {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* Корзина */

.cart {
  margin-top: 16px;
  background-color: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cart h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.cart-empty {
  font-size: 14px;
  color: #555;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.cart-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
}

.cart-item-meta {
  font-size: 13px;
  color: #666;
  margin: 2px 0 4px;
}

.cart-summary {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Админка */

.admin-section {
  background-color: #fff;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-section h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

form input[type="text"],
form input[type="number"],
form textarea,
form select {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  margin-top: 4px;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.admin-list .product-card {
  flex-direction: column;
}

.admin-list .product-meta {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

.admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hidden {
  display: none;
}

.images-preview {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.images-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
}
/* ===== ГАЛЕРЕЯ ТОВАРА ===== */

.product-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.product-gallery-image {
  max-width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.product-gallery-btn {
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.15s;
}

.product-gallery-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.product-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.product-gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.product-gallery-dot.active {
  background: #ffffff;
}