/* === ОБЪЕДИНЕННЫЙ CSS === */

/* --- Сброс и базовые стили --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f4f4;
  color: #222;
  padding: 10px;
  overflow-x: hidden;
}
body.modal-open {
  overflow: hidden;
}

/* --- Заголовок --- */
.header {
  background-image: url('https://boxexpress54.ru/header.jpg');
  background-size: cover;
  background-position: center;
  height: 160px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 1px 1px 5px black;
}

.container {
  position: relative;
  z-index: 1;
  padding-bottom: 70px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

/* --- Верхнее горизонтальное меню --- */
.horizontal-menu {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 15px;
  overflow-x: auto;
  white-space: nowrap;
}
.horizontal-menu ul {
  list-style: none;
  display: flex;
  padding: 10px 5px;
  gap: 10px;
}
.horizontal-menu ul li {
  flex-shrink: 0;
}
.menu-btn {
  padding: 8px 14px;
  font-size: 0.9rem;
  border: none;
  border-radius: 8px;
  background-color: #0088cc;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}
.menu-btn:hover {
  background-color: #0077b3;
}

/* --- Сетка товаров --- */
#product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.product-card {
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
  text-align: center;
}
.product-card:hover {
  transform: translateY(-3px);
}
.product-card img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
}
.product-card h3 {
  font-size: 1rem;
  margin-bottom: 5px;
  text-align: center;
}
.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  width: 100%;
}
.product-price {
  font-weight: bold;
  font-size: 1rem;
  color: #333;
  min-width: 70px;
  text-align: right;
  user-select: none;
}

.btn-square {
  width: 36px;
  height: 36px;
  font-size: 20px;
  text-align: center;
  border: 1.5px solid #0088cc;
  border-radius: 8px;
  color: #0088cc;
  background: white;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}
.btn-square:hover {
  background-color: #0088cc;
  color: white;
}
.btn-square.active {
  background-color: #e91e63;
  border-color: #e91e63;
  color: white;
}

.btn-favorite.active {
  color: #e91e63;
}

/* --- Кнопки выбора пола --- */
.gender-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-top: 20px;
}
.gender-buttons button {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #0088cc;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}
.gender-buttons button:hover {
  background-color: #0077b3;
}
.gender-buttons button.pink {
  background-color: #e91e63;
}
.gender-buttons button.pink:hover {
  background-color: #c2185b;
}
.pink {
  background-color: #ff69b4;
  color: white;
}

/* --- Кнопки анимации --- */
.btn-animated {
  position: relative;
  overflow: hidden;
  background-color: #4CAF50;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.btn-animated::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: rgba(0, 0, 0, 0.05);
  transition: all 0.5s ease;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
}
.btn-animated:active::after {
  transform: translate(-50%, -50%) scale(1);
}
.btn-animated:active,
.btn-animated.clicked {
  transform: scale(0.95);
  background-color: #3e8e41;
}

/* --- Модалка --- */
#aboutModal,
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}
#aboutModal > div,
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  text-align: left;
}
#aboutModal ul {
  list-style: none;
  padding-left: 0;
  font-size: 1.1rem;
}
#aboutModal li {
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
#aboutModal li:hover {
  background-color: #f0f0f0;
}
#aboutClose {
  margin-top: 15px;
  padding: 8px 12px;
  background:#e91e63;
  color:white;
  border:none;
  border-radius:6px;
  cursor:pointer;
  width: 100%;
  font-weight: bold;
  font-size: 1rem;
}
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
}
.close:hover {
  color: #e91e63;
}

/* --- Избранные товары --- */
#favoritesPage,
#favorites-list {
  padding-bottom: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.fav-card {
  background: white;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
}
.fav-card h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}
.fav-actions {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.fav-remove-btn {
  padding: 6px 12px;
  background: #e91e63;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.3s ease;
}
.fav-remove-btn:hover {
  background-color: #c2185b;
}

/* --- Категории --- */
#categoriesPage {
  display: none;
  max-width: 600px;
  margin: 0 auto 20px;
  padding: 10px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#categoriesPage h2 {
  text-align: center;
  margin-bottom: 15px;
}
#categoriesPage .category-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #0088cc;
  background: #e0f0ff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#categoriesPage .category-btn:hover {
  background: #b3ddff;
}
.categories {
  list-style: none;
  padding: 0;
  margin: 20px;
  font-size: 1.2rem;
}
.categories li {
  margin-bottom: 10px;
}
.categories a {
  text-decoration: none;
  color: #007bff;
}
.categories a:hover {
  text-decoration: underline;
}
.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 20px;
}
.subcategory-grid a,
.subcategory-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eee;
  border-radius: 10px;
  height: 120px;
  text-align: center;
  font-size: 1.2em;
  text-decoration: none;
  color: #333;
  transition: 0.2s;
}
.subcategory-item:hover,
.subcategory-grid a:hover {
  background-color: #ddd;
}

/* --- Нижнее меню --- */
.bottom-buttons,
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 500;
  max-width: 600px;
  margin: 0 auto;
}
.bottom-nav a {
  text-decoration: none;
  color: #444;
  font-size: 12px;
  user-select: none;
  flex-grow: 1;
  text-align: center;
}
.bottom-nav a span {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}
.bottom-btn {
  background-color: #0088cc;
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 0.85rem;
  padding: 8px 12px;
  cursor: pointer;
  flex: 1;
  margin: 0 5px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}
.bottom-btn:hover {
  background-color: #0077b3;
}

/* --- Страница поиска --- */
#searchPage {
  display: none;
  padding: 15px;
}
#backSearch {
  cursor: pointer;
  color: #0088cc;
  font-weight: bold;
  margin-bottom: 15px;
}
#searchInput {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}
#searchResults {
  font-size: 0.95rem;
  color: #333;
}
.main-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.category-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  height: 100px;
  background-color: #0088cc;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  text-align: center;
  transition: background-color 0.2s ease;
}

.category-button:hover {
  background-color: #006fa3;
}

.back-button {
  margin-top: 20px;
  padding: 12px;
  width: 100%;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: #0088cc;
  color: #fff;
  cursor: pointer;
}
img/
  men/
    tshirt1.jpg
  women/
    jeans1.jpg
  misc/
    hat1.jpg


.profile-header {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.avatar {
  background: #d98fff;
  color: white;
  font-weight: bold;
  font-size: 24px;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.user-info div {
  font-size: 14px;
  color: #444;
}

.profile-options,
.profile-legal {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #f9f9f9;
}

.profile-options li,
.profile-legal li {
  padding: 14px 16px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
}

.profile-options li:last-child,
.profile-legal li:last-child {
  border-bottom: none;
}

.btn-back {
  background: none;
  border: none;
  color: #007aff;
  font-size: 16px;
  cursor: pointer;
}
.slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 20px;
}

.slides {
  display: flex;
  width: 300%; /* 100% * кол-во слайдов */
  transition: transform 0.6s ease-in-out;
}

.slide {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
  height: 200px;
  display: none;
}

.slide.active {
  display: block;
}
