body {
  font-family: 'Roboto', 'Montserrat', sans-serif;
}

h1, h2, h3, .hero-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* style.css */
body.dark {
  background-color: #fff;
  color: #111;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  position: sticky;  /* липкое поведение */
  top: 0;            /* отступ от верхнего края */
  z-index: 1000;     /* поверх контента */

  background-color: #000;
  padding: 20px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 15px;
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover {
  color: #f0f0f0;
  background-color: rgba(255, 255, 255, 0.1);
}


.product-list {
  display: grid;
  grid-template-columns: repeat(4, auto); /* 4 карточки без растяжки */
  gap: 68px; /* расстояние между карточками */
  padding: 20px;
  justify-content: center;
}

.product-card {
  background-color: #fff;
  border: none;
  border-radius: 8px;
  width: 240px;
  padding: 12px;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}


.product-card:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* изображение фиксированной высоты, не обрезается */
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain; /* вместо cover, чтобы не обрезалось */
  border-radius: 6px;
  background-color: #f8f8f8; /* подложка, если прозрачный фон */
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 10px 0 6px;
  min-height: 40px;
  text-align: center;
}

.product-card p {
  font-size: 1rem;
  line-height: 1.4;
}

.product-card strong {
  font-size: 1rem;
  margin-bottom: 6px;
  display: block;
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  width: 300px;
  color: #000;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  text-align: center;
  position: relative;
}

.modal-content h2 {
  margin-top: 0;
  color: #000;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  border: 1px solid #ccc;
  background: #fff;
  color: #111;
}

.modal-content button {
  width: 100%;
  padding: 10px;
  background-color: #000;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #333;
}

.error-msg {
  color: #d00;
  margin-top: 10px;
}

/* Кнопка удаления */
.delete-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 10px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.3s;
}

.delete-btn:hover {
  background-color: #ff0000;
}


/* Общий шрифт */
body {
  font-family: 'Montserrat', sans-serif;
}

/* Hero секция */
.hero {
  background: url('https://static.vecteezy.com/system/resources/previews/023/977/557/non_2x/front-view-dark-silhouette-of-a-modern-sport-black-car-isolated-on-black-background-ai-generated-free-photo.jpg') no-repeat center center/cover;
  height: 400px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}



.hero-overlay {
  background: linear-gradient(
    to bottom right,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(20, 20, 20, 0.55) 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
  backdrop-filter: blur(2px); /* Лёгкий блюр фона */
  -webkit-backdrop-filter: blur(2px);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  color: white;
  text-align: center;
  max-width: 800px;
  padding: 20px;
}

.hero-content h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
}


.form-section {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

form#addProductForm {
  background-color: #f9f9f9;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-width: 500px;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
}

form#addProductForm label {
  display: block;
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 0.95rem;
}

form#addProductForm input,
form#addProductForm textarea {
  resize: vertical; /* ⬅️ Только по вертикали, не по горизонтали */
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fff;
  color: #111;
  margin-top: 5px;
  font-family: inherit;
}

form#addProductForm input:focus,
form#addProductForm textarea:focus {
  outline: 2px solid #000;
}

form#addProductForm button {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
}

form#addProductForm button:hover {
  background-color: #333;
}

#message {
  text-align: center;
  margin-top: 20px;
  font-size: 1rem;
  color: green;
}

.product-modal {
  background-color: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  color: #111;
  text-align: center;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  max-height: 90vh;
}

.product-modal img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 20px;
}

.product-modal h3 {
  margin-bottom: 10px;
  font-size: 1.6rem;
  font-weight: 700;
}

.product-modal h2 {

    margin-top: 20px; /* отступ сверху */
}

.product-modal p {
  font-size: 1rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

.product-modal strong {
  font-size: 1.2rem;
  font-weight: 600;
  color: #000;
}

/* Верхняя контактная панель */
.top-bar {
  background-color: #111;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.top-bar a {
  color: #fff;
  text-decoration: none;
  margin-left: 5px;
}

.top-bar a:hover {
  text-decoration: underline;
}

.contact-info span {
  margin-right: 20px;
}

.social-icons a {
  margin-left: 10px;
  font-size: 1.2rem;
}

/* Хедер с логотипом */
header {
  background-color: #000;
  padding: 20px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
}

.site-logo {
  height: 80px;
  margin-right: 20px;
}

.site-logo {
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.site-logo:hover {
  transform: scale(1.1) rotate(-2deg);
  filter: brightness(1.2);
}

.site-logo:active {
  transform: scale(0.95);
}

header h1 {
  margin: 0;
  font-weight: 700;
  font-size: 1.8rem;
  color: #fff;
}

/* Футер */
footer {
  background-color: #000;
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid #444;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-content a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
}

.footer-content a:hover {
  text-decoration: underline;
}

.footer-logo {
  max-height: 60px;
  margin-bottom: 15px;
}

.social-links a {
  margin: 0 10px;
  font-size: 1.5rem;
}

.benefits, .categories, .how-it-works, .cta {
  padding: 60px 20px;
  text-align: center;
  background-color: #f9f9f9;
}

.benefits h2, .categories h2, .how-it-works h2, .cta h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.benefits ul {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}

.benefits li {
  font-size: 1.1rem;
  margin-bottom: 12px;
  text-align: left;
}

.benefits li i {
  margin-right: 8px;
  color: #000;
}

.category-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.category {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 20px 30px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  transition: transform 0.2s;
  cursor: pointer;
}

.category:hover {
  transform: scale(1.05);
}

.how-it-works ol {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.1rem;
}

.cta {
  background-color: #000;
  color: #000000;
}

.cta p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.cart-item-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.cart-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 15px;
  border: 1px solid #ddd;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.cart-item-info span {
  font-weight: bold;
  color: #000;
}

.remove-cart-btn {
  background-color: #d00;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.remove-cart-btn:hover {
  background-color: #a00;
}

.product-modal.new-layout {
  width: 90%;
    max-width: 1200px; /* было 900px */
}

.product-modal-body {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.product-image-container img {
  max-width: 300px;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #ddd;
}

.product-info-container {
  flex: 1;
}



.product-info-container h3 {
  margin-top: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.product-info-container p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 10px 0;
}

.product-info-container strong {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 20px;
}

.product-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
  
}


.product-modal-actions button {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #000;
  color: #fff;
  transition: background-color 0.3s;
  
}

.product-modal-actions button:hover {
  background-color: #333;
}


.favorite-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.3s, transform 0.2s;
  z-index: 2;
}

.favorite-icon:hover {
  background-color: #ffecec;
  transform: scale(1.1);
}

.favorite-icon.favorited {
  color: red;
}

.product-actions {
  margin-top: auto;
  text-align: center;
}

.add-to-cart-btn {
  width: 100%;
  padding: 10px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
  background-color: #333;
}

.quantity-counter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.quantity-counter button {
  padding: 6px 12px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.quantity-counter button:hover {
  background-color: #333;
}

.quantity-counter .count {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  color: #000;
}

.favorite-icon i {
  font-size: 1.1rem;
  transition: transform 0.3s, color 0.3s;
  color: #000;
}

.favorite-icon.favorited i {
  color: #000;
}

.quantity-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.go-to-cart-btn {
  padding: 8px 16px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.go-to-cart-btn:hover {
  background-color: #333;
}



.admin-product-card {
  width: 220px;
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.9rem;
  position: relative;
}

.admin-product-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 10px;
}

.admin-product-card h3 {
  font-size: 1rem;
  margin: 5px 0;
  text-align: center;
}

.admin-product-card p {
  margin: 4px 0;
  text-align: center;
}

.admin-product-card strong {
  margin-top: 6px;
  color: #000;
}

.admin-product-card button {
  margin-top: 8px;
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.admin-product-card .edit-btn {
  background-color: #007bff;
  color: white;
}

.admin-product-card .edit-btn:hover {
  background-color: #0056b3;
}

.admin-product-card .delete-btn {
  background-color: #d00;
  color: white;
}

.admin-product-card .delete-btn:hover {
  background-color: #a00;
}

.edit-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 10px;
  background-color: #000000;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.3s;
}

.edit-btn:hover {
  background-color: #0056b3;
}

.admin-title {
  width: 100%;
  text-align: center;
}

.admin-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 20px;
}

.admin-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding: 40px;
  max-width: 1600px;
  margin : 0 auto;
}


.admin-left form#addProductForm {
  background-color: #f9f9f9;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.admin-left form h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.admin-right .admin-title {
  margin-bottom: 20px;
  text-align: center;
}

.admin-right select {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Обновленное модальное окно */
.modal-content.enhanced-modal {
  max-width: 800px;
  width: 90%;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  background-color: #fff;
}

/* Заголовок с иконкой */
.modal-content.enhanced-modal h2 {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  color: #000;
  margin-bottom: 20px;
  gap: 10px;
}

.modal-content.enhanced-modal h2 i {
  font-size: 1.6rem;
  color: #000;
}

/* Элементы в корзине и избранном */
.modal-content.enhanced-modal ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

.modal-content.enhanced-modal .cart-item {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  border: 1px solid #ccc;
}

.modal-content.enhanced-modal .cart-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.modal-content.enhanced-modal .cart-item-info h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.modal-content.enhanced-modal .cart-item-info span {
  font-size: 1rem;
  font-weight: bold;
  color: #000;
}

.modal-content.enhanced-modal .remove-cart-btn,
.modal-content.enhanced-modal .remove-fav-btn {
  background-color: #d00;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-content.enhanced-modal .remove-cart-btn:hover,
.modal-content.enhanced-modal .remove-fav-btn:hover {
  background-color: #a00;
}

.benefits,
.categories,
.how-it-works,
.partners,
.cta {
  background: linear-gradient(rgba(94, 94, 94, 0.85), rgba(255, 255, 255, 0.85)),
              url('section-bg.jpg') no-repeat center center / cover;
  background-attachment: fixed;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.footer-left {
  flex: 1 1 60%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #fff;
}

.footer-column h3 {
  font-size: 1.5rem;
  margin-top: 10px;
  margin-bottom: 10px;
}

.footer-column h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.footer-column p,
.footer-column a {
  font-size: 1rem;
  margin: 6px 0;
  color: #ddd;
}

.footer-column a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 8px;
  color: #fff;
}

.footer-column p {
  margin: 4px 0;
  color: #ddd;
}

.footer-column i {
  margin-right: 8px;
  color: #fff;
}

.footer-slogan {
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 8px;
}

.footer-logo {
  max-height: 60px;
  margin-bottom: 10px;
}

.social-links.large-icons a {
  font-size: 2rem;
  margin-right: 20px;
  color: #fff;
  transition: color 0.3s;
}

.social-links.large-icons a:hover {
  color: #ccc;
}



.footer-map {
  flex: 1 1 35%;
  min-width: 300px;
  max-width: 500px;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
  background-color: #000;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr; /* на планшетах и телефонах в столбик */
  }


  .footer-left,
  .footer-map {
    width: 100%;
    text-align: center;
  }

  .social-links.large-icons a {
    margin: 0 10px;
  }
}

.main-nav {
  font-size: 0.9rem;  /* было крупнее */
  margin: 0 10px; 
  display: flex;
  justify-content: space-between; /* пространство между группами */
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.center-nav {
  display: flex;
  flex: 1; /* центр занимает доступное пространство */
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.center-nav a {
  font-weight: 500;
  padding: 6px 10px;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 6px;
}

.center-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.right-nav {
  display: flex;
  gap: 15px;
  flex-shrink: 0; /* не сжимается */
  margin-left: auto;
}

.left-nav i,
.right-nav a,
.center-nav a {
  color: #fff;
  text-decoration: none;
}

.left-nav i:hover,
.right-nav a:hover,
.center-nav a:hover {
  color: #f0f0f0;
}

header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-bottom: -1px;
}

/* Общий стиль ссылок в навигации */
.main-nav a {
  position: relative;
  display: inline-block;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px; /* ✅ гарантированное скругление */
  transition: background-color 0.3s, color 0.3s;
}



.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: #fff;
  transition: width 0.3s ease;
}

.main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
}

.main-nav a:hover::after {
  width: 100%;
}

/* Иконки (сердце, корзина) — плавная анимация */
.main-nav i {
  transition: transform 0.3s ease, color 0.3s ease;
}

.main-nav i:hover {
  transform: scale(1.2);
  color: #f0f0f0;
}

.product-controls {
  margin: 30px 0 20px;
  padding: 0 40px;
}

.product-controls .product-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

/* Горизонтальный контейнер для фильтров */
.filter-bar.horizontal {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-right: 16%; /* отступ блока от правого края */
}

.filter-bar.horizontal input,
.filter-bar.horizontal select {
  width: 220px;               /* одинаковый размер */
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}




#searchInput {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  color: #111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}



.icon-with-badge {
  position: relative;
  display: inline-block;
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: red;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
  display: none;
}

.category-tiles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 200px;
  gap: 15px;
  padding: 20px;
}

.category-tile {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile span {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-weight: bold;
  text-align: center;
  font-size: 1rem;
}

.category-tile:hover img {
  transform: scale(1.1);
}

.category-tile.active {
  border: 2px solid #000;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

.stock-status {
  font-size: 0.9rem;
  margin-bottom: 10px;
  font-weight: bold;
  text-align: center;
}
.stock-status.in-stock {
  color: green;
}
.stock-status.out-of-stock {
  color: red;
}

.out-of-stock-btn {
  width: 100%;
  padding: 10px;
  background-color: #888;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Исправляем фон при открытии модалки */
.modal {
  backdrop-filter: blur(2px);
}

.modal .modal-content {
  z-index: 1000;
}

body.modal-open {
  overflow: hidden; /* убираем скролл страницы при открытой модалке */
}

.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  border-radius: 20px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.status-badge.in-stock {
  background-color: #28a745; /* зелёный */
}

.status-badge.out-of-stock {
  background-color: #cc3333; /* красно-серый */
}

.modal-content, .product-modal {
  animation: fadeInScale 0.3s ease-out;
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.category.active {
  background-color: #000;
  color: #fff;
  border-color: #000;
  transform: scale(1.08);
}


.clear-btn {
  margin-top: 15px;
  padding: 10px 15px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
.clear-btn:hover {
  background-color: #333;
}

.page-intro {
  text-align: center;
  padding: 30px 20px 10px;
}

.page-intro h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #000;
}

.page-intro p {
  font-size: 1.1rem;
  color: #555;
}


/* Кнопка "Выйти" в шапке (как "Добавить товар") */
#logoutBtn {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#logoutBtn:hover {
  background-color: #333;
}

/* Стиль модального окна входа */
#loginModal .modal-content {
  background-color: #f9f9f9;
  border-radius: 12px;
  padding: 30px 25px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  font-family: 'Montserrat', sans-serif;
}

#loginModal .modal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

#loginModal .modal-content input {
  width: 100%;
  padding: 12px;
  margin: 8px 0 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

#loginModal .modal-content button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #000;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#loginModal .modal-content button:hover {
  background-color: #333;
}

/* Общие плавные переходы для всех элементов */
* {
  transition: all 0.3s ease;
}

/* Для карточек товаров */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Плавное увеличение изображения */
.product-card img {
  transition: transform 0.4s ease;
}
.product-card:hover img {
  transform: scale(1.05);
}

/* Для категорий */
.category-tile {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-tile:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.category-tile img {
  transition: transform 0.4s ease;
}
.category-tile:hover img {
  transform: scale(1.07);
}

.product-list:has(.no-products) {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh; /* центрируем по экрану */
}

.no-products {
  text-align: center;
  color: #555;
}

.no-products i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #888;
}

nav a.active {
  color: #ffffff; /* золотистый цвет текста */
  border-bottom: 2px solid #ffffff; /* нижняя линия */
}


.modal-content.enhanced-modal {
  max-width: 700px;
  width: 90%;
  background: #fff;
  border-radius: 14px;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

.modal-content.enhanced-modal h2 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 15px;
}

.modal-footer {
  border-top: 1px solid #ddd;
  padding-top: 15px;
  text-align: right;
}

.footer-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.clear-btn,
.checkout-btn {
  background-color: #000;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.checkout-btn {
  background-color: #007bff;
}

.clear-btn:hover { background-color: #333; }
.checkout-btn:hover { background-color: #0056b3; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


.main-nav a.active {
  border-bottom: 2px solid #fff;
  text-shadow: 0 0 6px rgba(255,255,255,0.5);
}

.category-list .category {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
}
.category-list .category:hover {
  background-color: #000;
  color: #fff;
}
.category-list .category.active {
  background-color: #000;
  color: #fff;
}


/* Эффект нажатия для всех кнопок */
button,
.add-to-cart-btn,
.go-to-cart-btn,
.clear-btn,
.checkout-btn,
.edit-btn,
.delete-btn {
  transition: transform 0.1s ease;
}

button:active,
.add-to-cart-btn:active,
.go-to-cart-btn:active,
.clear-btn:active,
.checkout-btn:active,
.edit-btn:active,
.delete-btn:active {
  transform: scale(0.96);
}


/* Полное выравнивание размеров поиска и сортировки */

/* Фильтры внутри панели должны быть одинакового размера */


/* Анимированный градиент */
.hero {
  background: linear-gradient(270deg, #000000, #1a1a1a, #222);
  background-size: 600% 600%;
  animation: gradientMove 20s ease infinite;
  position: relative;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Стили контента hero */
.hero-content {
  color: white;
  text-align: center;
  max-width: 800px;
  padding: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 1.2s ease forwards;
}

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 25px;
  line-height: 1.6;
}

.hero-button {
  display: inline-block;
  padding: 14px 28px;
  background-color: #ffffff;
  color: #000000;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
}

.hero-button:hover {
  background-color: #f5f5f5;
  transform: scale(1.05);
}

.category-tiles-grid .category-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.category-tiles-grid .category-tile img {
  transition: transform 0.5s ease, filter 0.5s ease;
}

.category-tiles-grid .category-tile:hover img {
  transform: scale(1.1);
  filter: brightness(70%);
}

.category-tiles-grid .category-tile span {
  position: absolute;
  bottom: 10px;
  left: -10px;
  color: white;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.category-tiles-grid .category-tile:hover span {
  transform: scale(1.05);
}
/* Анимация появления карточки */
.product-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.product-card.show {
  opacity: 1;
  transform: translateY(0);
}

.product-card {
  background-color: #fff;
  border-radius: 8px;
  width: 240px;
  padding: 12px;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: scale(1.04) translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Иконка избранного уже есть, усилим её эффект */
.favorite-icon {
  opacity: 1;
  transition: transform 0.3s ease;
}


/* Полупрозрачный слой для нет в наличии */
/* Только изображение будет блюриться при отсутствии товара */
.product-card.out-of-stock img {
  filter: blur(2px) grayscale(30%);
  opacity: 0.9;
}

footer {
  background-color: #000;
  color: #fff;
  padding: 50px 20px 20px;
  border-top: 1px solid #333;
  font-family: 'Montserrat', sans-serif;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr; /* карта занимает больше места */
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto 30px;
}

.footer-col h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.footer-logo {
  max-width: 140px;
  margin-bottom: 15px;
}

.footer-tagline {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #ccc;
}

.footer-col p {
  margin: 6px 0;
  font-size: 0.95rem;
}

.footer-col i {
  margin-right: 8px;
}

.footer-socials {
  margin-top: 10px;
}

.footer-socials a {
  color: #fff;
  margin-right: 12px;
  font-size: 1.5rem;
  transition: transform 0.3s, color 0.3s;
}

.footer-socials a:hover {
  color: #ffd65a;
  transform: scale(1.2);
}

.footer-map .map-container {
  width: 150%;
  height: 450px; /* увеличили высоту */
  overflow: hidden;
  border-radius: 8px;
}

.footer-map iframe {
  border: none;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid #333;
  font-size: 0.9rem;
  color: #aaa;
}
.footer-col:nth-child(1),
.footer-col:nth-child(2) {
  margin-top: 100px; /* подбирай значение по вкусу */
}

/* Блок со временем работы */
.worktime-block {
  position: relative;
  left: -60%;      /* смещение времени работы */
  margin-top: 65px; 
}

/* Блок соцсетей */
.footer-socials {
  position: relative;
  left: -57%;      /* отдельно регулируешь */
  margin-top: 15px; /* отдельно регулируешь */
}

.footer-map h3 {
  position: relative;
  left: 125px; /* сместить заголовок вправо */
}

/* Базовая модалка */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.modal-content.modern {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  padding: 24px;
  max-width: 950px;
  width: 92%;
  animation: modalFade 0.35s ease;
}

@keyframes modalFade {
  from {opacity: 0; transform: scale(0.95);}
  to {opacity: 1; transform: scale(1);}
}

.modal-body {
  display: flex;
  gap: 36px;
}
/*
.modal-left {
  flex: 0 0 55%;
  display: flex;
  align-items: center;
  justify-content: center;
}
*/
.modal-left img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 12px;
}

.modal-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-right h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.modal-right p {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #444;
}

.modal-right .price {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 15px 0;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.actions button {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: all .3s ease;
}

.actions .primary {
  background: #000;
  color: #fff;
  border: none;
}
.actions .primary:hover { background: #333; }

.actions .secondary {
  background: transparent;
  border: 2px solid #ccc;
  color: #000;
}
.actions .secondary:hover { border-color: #000; }

@media(max-width: 768px) {
  .modal-body { flex-direction: column; }
  .modal-left { flex: none; }
}

/* Модалки корзины и избранного */
#cartItems img, #favoritesItems img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
}

#cartItems .cart-item,
#favoritesItems .cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px;
  border-bottom: 1px solid #ddd;
}

#cartItems .cart-item-info,
#favoritesItems .cart-item-info {
  flex: 1;
}

.remove-cart-btn,
.remove-fav-btn {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.remove-cart-btn:hover,
.remove-fav-btn:hover {
  background-color: #333;
}

/* --- Этап 7. Редизайн админки --- */
.admin-header {
  width: 100%;
  text-align: center;
  margin-bottom: 30px;
}

.admin-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #000;
}

.admin-wrapper {
  display: flex;
  gap: 40px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px;
  flex-wrap: wrap;
}



/* Улучшение формы */
.admin-left form {
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.admin-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;

  /* Только вертикальная прокрутка */
  max-height: 75vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
}
@media (min-width: 1100px) {
  .admin-product-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Карточка товара */
.admin-product-card {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Кнопки */
.admin-product-card .edit-btn {
  background-color: #007bff;
  color: #fff;
}
.admin-product-card .edit-btn:hover {
  background-color: #0056b3;
}

.admin-product-card .delete-btn {
  background-color: #d00;
  color: #fff;
}
.admin-product-card .delete-btn:hover {
  background-color: #a00;
}

.admin-right {
  flex: 0 0 65%;  /* список товаров займёт ~65% ширины */
  min-width: 600px;
  margin-right: -180px;
  height: 600px;
}

.admin-left,
.admin-right {
  margin-top: -80px;
}
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.toast {
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateX(100%);
  animation: slideIn 0.4s forwards, fadeOut 0.4s 3s forwards;
}

.toast.success { background: #2e7d32; }
.toast.error { background: #c62828; }

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Прокрутка для длинных списков в корзине и избранном */
.cart-item-list,
#favoritesItems {
  max-height: 400px;      /* ограничиваем высоту */
  overflow-y: auto;       /* вертикальная прокрутка */
  padding-right: 10px;    /* отступ под скролл */
}

.footer-cta {
  text-align: center;
  margin-top: 40px;
  padding: 40px 20px;
  background-color: #111;
  border-top: 1px solid #333;
}

.footer-cta h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
}

.footer-cta p {
  font-size: 1rem;
  color: #ddd;
  margin-bottom: 20px;
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #000 0%, #222 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.cta-button:hover {
  background: linear-gradient(90deg, #222 0%, #444 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.cta-button:active {
  transform: scale(0.97);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Стили для предпросмотра нескольких изображений */
.image-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 15px;
  max-width: 500px;
}

.image-previews-grid img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-previews-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


.modal-left .slider-btn {
  all: unset;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.35);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem; /* влияет на размер иконки */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.25s, transform 0.2s;
  z-index: 10;
}

.modal-left .slider-btn i {
  pointer-events: none;
  font-size: 0.9rem; /* размер самой иконки */
}

.modal-left .slider-btn:hover {
  background-color: rgba(0,0,0,0.65);
  transform: translateY(-50%) scale(1.1);
}

.modal-left .slider-btn.prev {
  left: 10px;
}



.modal-left .slider-btn.next {
  right: 10px;
}

/* Фиксированная область под изображение в модалке */
.modal-left {
  position: relative;
  width: 100%;
  max-width: 500px;  /* можно подогнать под твой дизайн */
  height: 500px;     /* фиксируем высоту */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-left img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.20s ease, transform 0.20s ease;
  opacity: 1;
  transform: translateX(0);
}

.modal-left img.slide-out-left {
  opacity: 0;
  transform: translateX(-20px);
}

.modal-left img.slide-out-right {
  opacity: 0;
  transform: translateX(20px);
}

.admin-product-card .sku-text {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.6);
  margin: 2px 0;
}

.product-modal .sku-text {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
}

/* Заголовок и подзаголовок */
.hero-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  line-height: 1.6;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.product-card {
  opacity: 0;
  transform: translateY(-30px);
}

.product-card.show {
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 1;
  transform: translateY(0);
}

/* ==== Footer mobile fix (≤ 768px) ==== */
@media (max-width: 768px) {

  /* Складываем колонки в столбик и выравниваем отступы */
  .footer-grid {
    display: flex;            /* перекрываем grid/flex-конфликт */
    flex-direction: column;
    gap: 24px;
    padding: 24px 16px;
  }

  .footer-col,
  .footer-map {
    width: 100%;
  }

  /* Снимаем «сдвиги» и возвращаем нормальный поток */
  .worktime-block,
  .footer-socials,
  .footer-map h3 {
    position: static !important;
    left: auto !important;
    margin: 12px 0 0;
    text-align: left;         /* можно поставить center, если хочется */
  }

  /* Контакты/текст читаемее на телефоне */
  .footer-col p,
  .footer-tagline {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  /* Соцсети — крупнее и кликабельнее */
  .footer-socials a {
    font-size: 1.6rem;
    margin-right: 14px;
  }

  /* Карта не вылезает за экран */
  .footer-map .map-container {
    width: 100% !important;   /* перекрываем прежние 150% */
    height: 220px;            /* было 450px на десктопе */
    border-radius: 8px;
    overflow: hidden;
  }
  .footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

  /* CTA-блок под мобильные */
  .footer-cta {
    padding: 28px 16px;
    text-align: center;
  }
  .footer-cta h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }
  .footer-cta p {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }
  .cta-button {
    width: 100%;
    padding: 12px 18px;
    font-size: 1rem;
    border-radius: 10px;
  }

  /* Нижняя строка — компактнее */
  .footer-bottom {
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 16px;
  }
}


.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.close-btn:hover {
  color: #ff0000;
  transform: rotate(90deg) scale(1.1);
}

.benefits-how-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  padding: 60px 20px;
  background: linear-gradient(rgba(94,94,94,0.85), rgba(255,255,255,0.85)),
              url('section-bg.jpg') no-repeat center center / cover;
  background-attachment: fixed; /* эффект параллакса */
}

.benefits-how-wrapper .benefits,
.benefits-how-wrapper .how-it-works {
  flex: 1 1 500px;
  background-color: rgba(255, 255, 255, 0.85); /* полупрозрачный белый */
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);

  display: flex;                 /* включаем флекс */
  flex-direction: column;        /* текст идет сверху вниз */
  align-items: center;           /* центр по горизонтали */
  justify-content: center;       /* центр по вертикали */
  text-align: center;            /* выравнивание текста по центру */
}

.benefits,
.how-it-works {
  font-family: 'Montserrat', sans-serif;
  padding: 40px; /* одинаковые внутренние отступы */
  text-align: left; /* или center, если хочешь по центру */
}

.benefits h2,
.how-it-works h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px; /* одинаковый отступ под заголовком */
}

.benefits ul,
.how-it-works ol {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  padding-left: 20px; /* одинаковый отступ для списков */
}

.benefits li,
.how-it-works li {
  margin-bottom: 10px; /* одинаковый промежуток между пунктами */
}


.modal-left {
  flex: 0 0 300px; /* фикс ширины изображения */
}

.modal-right {
  flex: 1; /* текст занимает всё остальное */
}

#modalDescription {
  text-align: left; /* выравниваем по левому краю */
  font-size: 1rem;
  line-height: 1.5;
}


/* Единый стиль заголовков на всех страницах */
.page-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  margin: 20px 0;
  text-align: center;
}

/* Единый стиль подзаголовков */
.page-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  margin: 10px 0;
  text-align: center;
  color: #555;
}

/* ==== Увеличение всех элементов футера ==== */
footer,
footer * {
  font-size: 1.2rem !important; /* увеличиваем всё, включая ссылки и списки */
  line-height: 1.6;
}

.footer-logo {
  max-height: 90px !important; /* больше логотип */
}

.footer-column h3,
.footer-column h4 {
  font-size: 1.5rem !important; /* крупные заголовки */
}

.footer-column i {
  font-size: 1.4rem !important; /* увеличенные иконки */
  margin-right: 10px;
}

footer .footer-socials a i {
  font-size: 2.4rem !important;
}

.footer-link {
  color: #ffffff; /* Белый цвет */
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-link:hover {
  color: #cccccc; /* Светло-серый при наведении */
  text-decoration: underline;
}

.checkout-modal.new-layout {
  width: 90%;
  max-width: 960px;
  max-height: 90vh;
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  font-family: 'Montserrat', sans-serif;
}

.checkout-modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.checkout-products {
  flex: 1;
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 6px;
  background: #f8f8f8;
}

.checkout-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.checkout-products-list .item {
  display: flex;
  justify-content: space-between;
}

.checkout-total {
  margin-top: 15px;
  font-weight: bold;
  font-size: 16px;
}

.checkout-form {
  flex: 1;
  min-width: 280px;
}

.checkout-form h3 {
  margin-bottom: 15px;
}

.checkout-form .form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.checkout-form input,
.checkout-form textarea {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.checkout-form button {
  background-color: black;
  color: white;
  padding: 12px 18px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.checkout-form button:hover {
  background-color: #222;
}

.checkout-modal .close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  border: none;
  background: none;
  color: black;
  cursor: pointer;
  font-weight: bold;
}

.input-error {
  border: 2px solid red !important;
}

.error-message {
  color: red;
  font-size: 13px;
  margin-top: 5px;
}

.hidden {
  display: none !important;
}

/* Ряды полей внутри checkout */
.checkout-form .form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Скролл, если контента много */
.checkout-modal.new-layout { max-height: 90vh; }
.checkout-modal-body {
  max-height: calc(90vh - 100px);
  overflow: auto;
}

/* На узких экранах поля становятся в столбик */
@media (max-width: 720px) {
  .checkout-form .form-row.two { grid-template-columns: 1fr; }
}

/* ==== Checkout modal — UI refresh (не ломая HTML) ==== */

/* Контейнер модалки */
.checkout-modal.new-layout {
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  padding: 28px;
  backdrop-filter: saturate(1.1);
}

/* Убираем горизонтальную прокрутку внутри модалки */
.checkout-modal-body {
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;   /* товары | форма */
  gap: 24px;
}

/* На узких экранах — в одну колонку */
@media (max-width: 900px) {
  .checkout-modal-body {
    grid-template-columns: 1fr;
  }
}

/* Блок товаров (суммарий) */
.checkout-products {
  background: #f7f7f8;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 16px;
  max-height: 420px;
  overflow-y: auto;
}

/* Заголовки блоков */
.checkout-products h3,
.checkout-form h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 12px 0;
}

/* Список товаров в заказе */
.checkout-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
}

/* Карточка позиции */
.checkout-products-list .item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eee;
}

/* Если в разметке есть <img> — отрисуем миниатюру красиво */
.checkout-products-list .item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* Итог */
.checkout-total {
  margin-top: 14px;
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
}

/* Правая колонка — форма */
.checkout-form {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 16px;
}

/* Группы полей и двухколоночные ряды */
.checkout-form .form-group { margin-bottom: 12px; }
.checkout-form .form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .checkout-form .form-row.two { grid-template-columns: 1fr; }
}

/* Поля ввода */
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  outline: none;
}

/* Фокус */
.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}

/* Ошибки (использует твой класс .input-error) */
.input-error {
  border-color: #cc2b2b !important;
  box-shadow: 0 0 0 3px rgba(204,43,43,.12);
}
.error-message {
  color: #cc2b2b;
  font-size: 0.82rem;
  margin-top: 6px;
}

/* Комментарий: только вертикальный ресайз и ограничение по высоте */
#customerComment {
  resize: vertical;
  max-height: 180px;
  width: 100%;
}

/* Кнопка отправки формы */
#checkoutForm button[type="submit"],
.checkout-form button {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 700;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
}
#checkoutForm button[type="submit"]:hover,
.checkout-form button:hover {
  background: #333;
}

/* Крестик закрытия — как в остальных модалках, но немного аккуратнее */
.checkout-modal .close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  line-height: 36px;
  text-align: center;
  font-size: 22px;
  color: #000;
  border: 1px solid #e5e5e5;
  background: #fff;
}
.checkout-modal .close-btn:hover {
  filter: brightness(0.96);
}

/* ---- Checkout: фиксы сетки и полей ---- */

/* Две колонки формы: не ломаемся на узких местах и выравниваем элементы */
.checkout-form .form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.checkout-form .form-row.two > * { min-width: 0; } /* важно: чтобы инпуты не вылезали */

/* Унифицируем размеры полей, чтобы телефон не «уплывал» */
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  font-size: 0.95rem;
}

/* Телефон — как обычный инпут, без сжатия */
#customerPhone {
  width: 100%;
  text-align: left;
}

/* Комментарий — только вертикальный ресайз, ограничение по высоте,
   и НИКАКОГО растягивания по ширине */
#customerComment {
  resize: vertical;
  max-height: 180px;
  width: 100%;
}

/* ---- Checkout: «Итого» под списком ---- */

/* Левая колонка превращаем в колонковый флекс-контейнер */
.checkout-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Список товаров можно прокручивать, а «Итого» окажется снизу */
.checkout-products .checkout-list {
  max-height: 360px;          /* при необходимости отрегулируй */
  overflow-y: auto;
  padding-right: 4px;          /* чтобы не прилипал скроллбар */
}

/* Сам блок «Итого» — внизу, с разделителем */
.checkout-products .checkout-total {
  margin-top: auto;            /* толкаем в низ контейнера */
  padding-top: 12px;
  border-top: 1px solid #e7e7e7;
  font-weight: 700;
  text-align: right;
  font-size: 1rem;
}

/* На узких экранах форма в одну колонку */
@media (max-width: 860px) {
  .checkout-form .form-row.two { grid-template-columns: 1fr; }
}

/* --- Checkout Modal (оформление заказа) --- */
#checkoutModal .modal-content {
  max-width: 880px;
  width: 94%;
  padding: 28px 28px 24px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

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

#checkoutModal .modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

#checkoutModal .modal-close {
  border: 1px solid #e5e5e5;
  background: #fff;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
#checkoutModal .modal-close:hover { background:#f7f7f7; transform: scale(1.06); }

#checkoutModal .modal-body {
  display: grid;
  grid-template-columns: 1.2fr .8fr; /* левая форма + правая колонка (товары/итоги) */
  gap: 24px;
}

/* Секции внутри модалки */
#checkoutModal .section {
  background: #f9f9f9;
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  padding: 16px;
}

/* Сетка полей формы */
#checkoutModal .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

#checkoutModal .form-group { display: flex; flex-direction: column; gap: 6px; }
#checkoutModal label { font-weight: 600; font-size: .95rem; }

#checkoutModal input[type="text"],
#checkoutModal input[type="tel"],
#checkoutModal textarea,
#checkoutModal select {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}

#checkoutModal input:focus,
#checkoutModal textarea:focus,
#checkoutModal select:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}

/* Комментарий — только вертикальное изменение размера */
#checkoutModal textarea { resize: vertical; min-height: 70px; max-height: 220px; }

/* Блок товаров/итогов справа */
#checkoutModal .summary-list { display: grid; gap: 10px; }
#checkoutModal .summary-item {
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: 10px; align-items: center;
  padding: 10px; border: 1px solid #eee; border-radius: 10px; background: #fff;
}
#checkoutModal .summary-item img { width:56px; height:56px; object-fit:cover; border-radius:8px; border:1px solid #eee; }
#checkoutModal .summary-total { display:flex; justify-content:space-between; font-weight:700; margin-top: 8px; }

/* Кнопка отправки без эмодзи */
#checkoutModal #submitOrderBtn {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #000; color:#fff; border:0; font-weight:700; cursor:pointer;
  display: inline-flex; align-items:center; gap:10px; justify-content:center;
  transition: transform .1s ease, background .2s ease;
}
#checkoutModal #submitOrderBtn:hover { background:#222; transform: translateY(-1px); }

/* Адаптив */
@media (max-width: 900px) {
  #checkoutModal .modal-body { grid-template-columns: 1fr; }
}

/* Левая колонка в чекауте тянется по высоте, список скроллится */
.checkout-modal-body { 
  display: grid;
  grid-template-columns: 1fr 1fr; /* товары | форма */
  gap: 24px;
}

.checkout-products {
  display: flex;
  flex-direction: column;
  min-width: 260px;
  background: #f7f7f8;
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  padding: 16px;
}

.checkout-products-list {
  flex: 1;           /* занимает всё доступное пространство */
  overflow: auto;    /* если много товаров — появляется скролл */
  min-height: 0;     /* чтобы flex-элемент корректно сжимался */
}

/* «Итого» — на одной линии и ниже списка */
.checkout-products .checkout-total { margin-top: 12px; }
.checkout-products .checkout-total .total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e7e7e7;
  font-weight: 700;
  font-size: 1rem;
}

/* --- Thank You modal (единый стиль) --- */
#thankYouModal .product-modal.thankyou-modal {
  max-width: 520px;
  width: 90%;
  padding: 28px 24px;
  border-radius: 12px;
}

#thankYouModal .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  line-height: 36px;
  text-align: center;
  font-size: 22px;
  color: #000;
  border: 1px solid #e5e5e5;
  background: #fff;
  cursor: pointer;
}

#thankYouModal .close-btn:hover {
  filter: brightness(0.96);
}

.thankyou-body {
  text-align: center;
}

.thankyou-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

#thankYouModal h3 {
  font-size: 1.6rem;        /* как заголовки в карточках/модалках */
  margin: 6px 0 8px;
}

#thankYouModal .thankyou-text {
  margin: 0 0 10px;
  color: #333;
}

.thankyou-order {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0 18px;
}

.thankyou-order code {
  display: inline-block;
  padding: 8px 12px;
  background: #f3f3f3;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 1.05rem;
}

.thankyou-actions {
  display: flex;
  justify-content: center;
}

/* === RESPONSIVE FIX: мобильные правки изолированы === */

/* безопасные глобальные вещи */
html, body { max-width: 100%; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; }

/* Плавность (без скрытия на ПК) */
#mainNav { transition: transform .28s ease, opacity .28s ease; }

/* ----- ТОЛЬКО МОБИЛЬ/ПЛАНШЕТЫ ----- */
@media (max-width: 992px) {
  /* Бургер */
  .menu-toggle {
    display: inline-flex;
    width: 40px; height: 36px;
    border: 1px solid #2a2a2a; border-radius: 10px;
    background: #111; margin-left: 12px;
    align-items: center; justify-content: center; cursor: pointer;
  }
  .menu-toggle span {
    display: block; width: 22px; height: 2px; background: #fff;
    margin: 3px 0; transition: transform .25s ease, opacity .25s ease;
  }

  header { position: sticky; top: 0; z-index: 1000; }

  /* Мобильное меню (скрыто по умолчанию) */
  .main-nav {
    position: fixed;
    left: 0; right: 0; top: var(--menuTop, 60px);
    background: #000; padding: 14px 16px;
    display: block;
    transform: translateY(-120%); opacity: 0;
    max-height: calc(100vh - 120px); overflow-y: auto;
    border-top: 1px solid #222;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  body.menu-open { overflow: hidden; }

  .main-nav .center-nav,
  .main-nav .right-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px; margin: 0;
  }
  .main-nav a { padding: 10px 12px; background: #0d0d0d; border-radius: 10px; }

  /* Фильтры: в столбик */
  .filter-bar.horizontal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0;
    justify-content: initial;
  }
  .filter-bar.horizontal input,
  .filter-bar.horizontal select { width: 100%; }

  /* Сетка товаров на мобиле — авто-адаптив */
  .product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 16px !important;
    padding: 16px;
  }
  .product-card { width: 100% !important; }
  .product-card img { height: 160px; object-fit: contain; }

  /* Плитки категорий — гибко */
  .category-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px; padding: 0 16px 24px;
  }
  .category-tile img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; }

  /* HERO поменьше */
  .hero { height: 260px; }
  .hero-content h2 { font-size: 1.6rem; }
  .hero-content p { font-size: .95rem; }

  /* Модалки: во всю ширину экрана */
  /* нижний лист (bottom sheet) */
  .modal { align-items: flex-end; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }

  /* единые размеры контейнеров модалок */
  .modal .modal-content,
  .modal .product-modal,
  .modal-content.enhanced-modal,
  #checkoutModal .modal-content,
  #thankYouModal .product-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 88vh !important;
    height: auto;
    margin: 0;
    padding: 16px !important;
    border-radius: 16px 16px 0 0 !important;
    overflow: hidden;           /* прокручиваем только тело */
    display: flex;
    flex-direction: column;
  }

  /* «тело» делает скролл, экшены приклеиваются снизу */
  .product-modal-body,
  .checkout-modal-body,
  .modal-content.enhanced-modal ul,
  #cartItems, #favoritesItems {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(88vh - 120px);
  }

  /* кнопки внизу с затенением и safe-area */
  .product-modal-actions,
  .thankyou-actions,
  .checkout-actions {
    position: sticky;
    bottom: calc(-1 * env(safe-area-inset-bottom));
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, #fff 45%);
    margin: 8px -16px -16px;
  }

  /* крупные тап-таргеты для кнопок закрытия во всех модалках */
  #closeProductModal,
  #closeCartModal,
  #closeFavoritesModal,
  #closeThankYouModal {
    position: absolute;
    right: 12px; top: 12px;
    width: 40px; height: 40px;
    font-size: 22px;
    border-radius: 10px;
  }

  /* изображения в товарной модалке на мобиле */
  .product-image-container img { max-height: 36vh; object-fit: contain; }
}

/* ----- ЯВНЫЕ НАСТРОЙКИ ДЛЯ ПК (перестраховка) ----- */
/* ===== DESKTOP: как было раньше ===== */
@media (min-width: 993px) {
  /* Сетка карточек: 4 столбца без растяжения, с большим зазором */
  .product-list {
    display: grid;
    grid-template-columns: repeat(4, auto) !important;
    gap: 68px !important;
    padding: 20px !important;
    justify-content: center !important;
  }

  /* Карточка фиксированной ширины */
  .product-card {
    width: 240px !important;
  }

  /* Изображение как было */
  .product-card img {
    height: 180px !important;
    object-fit: contain;
  }

  /* Фильтры/поиск в одну линию, без растяжений */
  .filter-bar.horizontal {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 0 !important;
  }
  .filter-bar.horizontal input,
  .filter-bar.horizontal select {
    width: auto !important;
  }

  /* Навигация на ПК — обычная */
  .menu-toggle { display: none !important; }
  body.menu-open { overflow: auto !important; }
  .main-nav {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
  }
}

/* --- Product modal: фикс крестика на мобильных и не только --- */
#productModal .product-modal { position: relative; }

#productModal .close-btn {
  /*всегда поверх фото и стрелок (у стрелок сейчас z-index:10) */
  z-index: 50;
}

/* перестраховка: стрелки ниже крестика */
#productModal .modal-left .slider-btn { z-index: 30; }

/* чтобы высокая картинка не «давила» на шапку модалки на узких экранах */
@media (max-width: 768px) {
  #productModal .modal-left { max-height: 56vh; }
}

/* === STACKED FIXED TOP-BAR + HEADER (ПК и мобайл) === */
:root { --tb: 0px; --hh: 96px; } /* JS перезапишет реальными высотами */

/* Топ-бар всегда сверху */
.top-bar{
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 3200;
}

/* Хедер сразу под топ-баром */
header{
  position: fixed !important;
  top: var(--tb) !important;
  left: 0; right: 0;
  z-index: 3000;
}

/* Отступ контента = топ-бар + хедер */
body{
  padding-top: calc(var(--tb) + var(--hh)) !important;
}

/* Мобильное меню — выезжает строго под хедером */
@media (max-width: 992px){
  .main-nav{
    position: fixed !important;
    top: calc(var(--tb) + var(--hh)) !important;
    left: 0; right: 0;
    max-height: calc(100vh - var(--tb) - var(--hh));
    overflow-y: auto;
    background: #000;
    border-top: 1px solid #222;
    transform: translateY(-120%);
    opacity: 0;
  }
  .main-nav.open{ transform: translateY(0); opacity: 1; }
}

/* На десктопе .main-nav остаётся обычной внутри фикс-хедера */
@media (min-width: 993px){
  .main-nav{
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
  }
}

@media (max-width: 992px) {
  header { position: sticky; top: 0; z-index: 1000; }

  /* смещаем бургер к правому краю хедера */
  .menu-toggle{
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3500;
    margin: 0;          /* убираем левые отступы на мобиле */
  }
  /* немного места справа от логотипа, чтобы бургер не перекрывался */
  .header-left { padding-right: 56px; }
}

/* Мобильное бургер-меню — открывается на весь экран */
@media (max-width: 992px) {
  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh; /* на весь экран */
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center; /* по вертикали */
    align-items: center;     /* по горизонтали */
    gap: 20px;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .main-nav.open {
    left: 0;
  }

  .main-nav .nav-group {
    flex-direction: column;
    align-items: center;
  }

  .main-nav a {
    font-size: 1.4rem;
    padding: 10px 0;
  }
}

@media (max-width: 992px) {
  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0; /* было -100% при закрытии, при открытии тоже с нуля */
    width: 100%;
    height: 100vh;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    z-index: 9999;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav .nav-group {
    flex-direction: column;
    align-items: center;
  }

  .main-nav a {
    font-size: 1.4rem;
    padding: 10px 0;
  }
}

/* ===== Бренды ===== */
.brands {
  padding: 24px 0 40px;
}

.brands-toolbar {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.brands-toolbar input {
  width: 100%;
  max-width: 520px;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: #111;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px;
}

.brand-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 14px;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-align: center;
}

.brand-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  border-color: #dcdcdc;
}

.brand-logo {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: .95rem;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}

/* === BRANDS GRID (страница "Бренды") === */
.brands { padding: 20px; }
.brands-toolbar { margin: 10px 0 20px; display:flex; justify-content:center; }
.brands-toolbar input { max-width: 420px; width:100%; padding:10px 12px; border:1px solid #ccc; border-radius:8px; }

.brands-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap:16px;
}

.brand-card {
  background:#fff;
  border:1px solid #eee;
  border-radius:12px;
  padding:14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.brand-card:hover {
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}
.brand-card .brand-logo img {
  width:100%;
  height:80px;
  object-fit:contain;
  margin-bottom:10px;
}
.brand-card .brand-name { font-weight:600; text-align:center; }

/* Активная карточка (выбранный бренд) */
.brand-card.active {
  border: 2px solid #000000; /* яркая рамка */
  border-radius: 8px; /* скругление углов */
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); /* лёгкая подсветка */
}

/* === Фильтры: единая линия и одинаковая высота === */
.filter-bar.horizontal {
  display: flex;
  align-items: center;       /* центр по вертикали */
  gap: 15px;
  padding-right: 16%;
}

/* Унифицированный вид для всех трёх: поиск + 2 select */
.filter-bar.horizontal input[type="text"],
.filter-bar.horizontal select {
  height: 44px;              /* общая высота */
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  line-height: normal;
  box-sizing: border-box;
}

/* Ширины (вариант 1: два select фикс, поиск шире) */
.filter-bar.horizontal select {
  width: 220px;
  flex: 0 0 220px;
}
.filter-bar.horizontal input[type="text"] {
  width: 320px;              /* сделай 280–360 по вкусу */
}

/* Никаких сдвигов вверх/вниз */
#sortSelect,
#availabilityFilter {
  position: static !important;
  margin-top: 0 !important;
}

/* Минимальная ширина для "Наличие", чтобы не схлопывался */
#availabilityFilter { min-width: 180px; }

/* === Глобальная блокировка скролла при открытых модалках === */
html.scroll-locked { overflow: hidden; }

body.scroll-locked {
  position: fixed;      /* фиксируем тело, чтобы фон не прокручивался */
  width: 100%;
  top: var(--scroll-lock-top, 0);
}

/* Чтобы внутри модалки можно было скроллить содержимое */
.modal .modal-content,
.modal .product-modal,
.modal .checkout-modal {
  max-height: calc(100vh - 40px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* На фоне во время модалки не отдаём «инерцию» скролла */
html.scroll-locked,
body.scroll-locked,
.modal {
  overscroll-behavior: contain;
}

/* ===== Категории: мобильная адаптация ===== */
@media (max-width: 768px) {
  /* удобная сетка в 2–3 колонки */
  .category-tiles-grid{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
    grid-auto-rows: 130px;
    gap: 12px;
    padding: 0 16px 24px;
  }

  /* сама карточка и картинка */
  .category-tile{ position:relative; border-radius:12px; overflow:hidden; }
  .category-tile img{ width:100%; height:100%; object-fit:cover; display:block; }

  /* подпись: как на ПК, но без «уезжания» */
  .category-tiles-grid .category-tile span{
    left: 0;                   /* вместо -10px */
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    border-radius: 0 0 12px 12px;
    transform: none;
    box-sizing: border-box;
  }
}

/* ==== MOBILE NAV: единые правила, без зазора слева ==== */
@media (max-width: 992px) {
  .main-nav{
    /* убираем «щель» — обнуляем горизонтальные отступы */
    margin: 0 !important;

    /* полноэкранная панель */
    position: fixed !important;
    inset: 0;              /* top/right/bottom/left: 0 */
    height: 100dvh;        /* корректная высота на мобилках */
    background: #000;
    z-index: 4000;

    /* содержимое */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;

    /* один способ анимации — сдвиг слева */
    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .main-nav.open{ transform: translateX(0); }
}

/* ==== MOBILE NAV: компактные блоки по центру ==== */
@media (max-width: 992px) {
  /* Сам контейнер меню */
  .main-nav {
    margin: 0 !important;
    position: fixed !important;
    inset: 0;
    height: 100dvh;
    background: #000;
    z-index: 4000;

    display: flex;
    flex-direction: column;
    align-items: center;  /* Центрируем по горизонтали */
    justify-content: center; /* Центрируем по вертикали */
    padding: 20px 0;
    transform: translateX(-100%);
    transition: transform .3s ease;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  /* Контейнер ссылок */
  .main-nav .center-nav {
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем все элементы */
    gap: 17px;
    width: auto; /* ширина по содержимому */
  }

  /* Ссылки */
  .main-nav .center-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    min-width: 180px;      /* фиксированная минимальная ширина кнопки */
    padding: 10px 14px;    /* компактнее по высоте */
    border-radius: 12px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    font-size: 15px;
    line-height: 1.2;
    color: #fff;
  }
}

/* ==== MOBILE NAV: маленькие экраны, меню под шапкой + скролл ==== */
@media (max-width: 480px), (max-height: 640px) {
  .main-nav {
    /* вместо полноэкранного overlay — стартуем ниже топ-бара и хедера */
    position: fixed !important;
    left: 0; right: 0;
    top: calc(var(--tb) + var(--hh));               /* перемещаем под шапку */
    height: calc(100dvh - var(--tb) - var(--hh));   /* занимаем оставшуюся высоту */

    margin: 0 !important;
    background: #000;
    z-index: 4000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;    /* чтобы первый пункт не прилипал к шапке */
    padding: 12px 0 max(20px, env(safe-area-inset-bottom));

    overflow-y: auto;               /* меню скроллится, фон — нет */
    -webkit-overflow-scrolling: touch;

    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .main-nav.open { transform: translateX(0); }

  .main-nav .center-nav {
    gap: 12px;                      /* можно увеличить/уменьшить по вкусу */
    width: auto;
    align-items: center;
  }
  .main-nav .center-nav a {
    min-width: 160px;               /* компактнее на маленьких дисплеях */
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.2;
    margin: 0 !important;
    text-align: center;
    display: flex;
    justify-content: center;
    border-radius: 12px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
  }
}

/* Убираем 1px линию между шапкой и бургер-меню */
@media (max-width: 992px) {
  body.menu-open header {
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    /* если нужно — верни внутренний отступ, чтобы контент в хедере не «складывался» */
    padding-bottom: 20px !important;
  }
  body.menu-open .main-nav {
    border-top: 0 !important;
    top: calc(var(--tb) + var(--hh)) !important;
    height: calc(100dvh - var(--tb) - var(--hh)) !important;
  }
}

/* Центруем сами элементы внутри ячеек грида */
.product-list{
  justify-items: center;   /* <— вот этого не хватало */
}

/* Перестраховка: карточка занимает всю ширину своей ячейки на узких экранах */
@media (max-width: 992px){
  .product-card{
    width: 100%;
    box-sizing: border-box;
    margin: 0;             /* чтобы не было «прилипания» слева */
  }
}

/* === MOBILE FILTERS: одинаковый размер и по центру === */
@media (max-width: 768px){
  .product-controls{
    margin: 20px 0 16px;
    padding: 0 12px;
  }

  .filter-bar.horizontal{
    /* одна колонка, центрируем контейнер */
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 420px;     /* ширина блока фильтров */
    margin: 0 auto;       /* по центру экрана */
    padding-right: 0 !important;  /* убираем правый отступ */
    justify-items: stretch;
  }

  .filter-bar.horizontal > *{
    /* чтобы ничего не «торчало» слева/справа */
    margin: 0 !important;
    min-width: 0;
  }

  /* одинаковый вид для всех трёх: поиск + сортировка + наличие */
  .filter-bar.horizontal input[type="text"],
  .filter-bar.horizontal select{
    width: 100% !important;
    height: 48px;               /* одинаковая высота */
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    line-height: normal;
    box-sizing: border-box;
  }
}

/* чуть шире — оставляем центр и одинаковые размеры */
@media (min-width: 769px) and (max-width: 992px){
  .filter-bar.horizontal{
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding-right: 0 !important;
  }
  .filter-bar.horizontal input[type="text"],
  .filter-bar.horizontal select{
    width: 100% !important;
    height: 48px;
    border-radius: 12px;
  }
}

/* Mobile: фавориты/корзина по центру шапки и белые */
@media (max-width: 992px) {
  #mobileIconsSlot{
    position: absolute;          /* теперь относительно header */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 14px;
    z-index: 3500;               /* поверх содержимого хедера */
    pointer-events: auto;
  }

  /* белые, как на ПК */
  #mobileIconsSlot a,
  #mobileIconsSlot i {
    color: #fff !important;
  }

  /* бейджи не съезжают */
  #mobileIconsSlot .icon-with-badge { position: relative; }
  #mobileIconsSlot .badge { display: inline-block; top: -6px; right: -8px; }
}

/* Только моб/планшеты */
@media (max-width: 992px){
  #mobileIconsSlot{ gap:36px; margin-left: 15px; } /* небольшой сдвиг вправо */              /* расстояние между иконками */
  #mobileIconsSlot i{ font-size:18px; }         /* размер иконки */
  #mobileIconsSlot .icon-with-badge{
    width:40px; height:40px; display:grid; place-items:center; /* зона клика крупнее */
  }
  #mobileIconsSlot .badge{
    min-width:18px; height:18px; font-size:12px; top:-6px; right:-8px; /* бейдж под размер */
  }
}

@media (max-width: 992px){
  /* убираем любое подчёркивание/линию */
  #mobileIconsSlot a,
  #mobileIconsSlot .icon-with-badge{
    text-decoration: none !important;
    border: 0 !important;
  }

  /* у иконки не должно быть базовой линии текста */
  #mobileIconsSlot i{
    display: block;
    line-height: 1;
  }

  /* если вдруг применился «подчёркиватель» из меню — глушим */
  #mobileIconsSlot .icon-with-badge::after{
    content: none !important;
  }

  /* по желанию: убираем фон при наведении */
  #mobileIconsSlot a:hover{
    background: transparent;
  }
}

/* === Cart / Favorites row: stable 3-column layout === */
#cartItems .cart-item,
#favoritesItems .cart-item {
  display: grid;                      /* вместо flex */
  grid-template-columns: 84px 1fr auto; /* изображение | контент | кнопка */
  align-items: center;
  column-gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

#cartItems img, #favoritesItems img {
  width: 84px; height: 84px; object-fit: cover; border-radius: 10px;
}

/* Контентная колонка должна уметь сжиматься, иначе кнопка будет «выталкиваться» */
#cartItems .cart-item-info,
#favoritesItems .cart-item-info {
  flex: unset;        /* на всякий случай */
  min-width: 0;       /* ключ к корректному сжатию */
}

/* Переносы длинных названий — чтобы никогда не разъезжалась вширь */
#cartItems .cart-item-info h4,
#favoritesItems .cart-item-info h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere; /* переносим любые длинные слова/артикулы */
  word-break: break-word;
}

/* Счётчик количества влево, чтобы не «раздувал» центр */
#cartItems .quantity-counter { justify-content: flex-start; }

/* Кнопка всегда компактная и не переносится на две строки */
.remove-cart-btn,
.remove-fav-btn {
  white-space: nowrap;
  margin-left: 12px;   /* небольшой отступ от текста */
}

/* Чуть компактнее на очень узких экранах */
@media (max-width: 420px) {
  #cartItems .cart-item, #favoritesItems .cart-item {
    grid-template-columns: 72px 1fr auto;
    column-gap: 10px;
  }
  #cartItems img, #favoritesItems img { width: 72px; height: 72px; }
}

/* === FIX: модалки на мобилках — убираем горизонтальный скролл === */

/* 1) padding не должен раздувать 100vw */
@media (max-width: 992px) {
  .modal .modal-content,
  .modal .product-modal,
  .modal-content.enhanced-modal,
  #checkoutModal .modal-content,
  #thankYouModal .product-modal {
    box-sizing: border-box;           /* <— ключевое */
    max-width: 100vw;                 /* перестраховка */
  }

  /* 2) внутри модалки скроллим только по вертикали */
  .modal-body,
  .product-modal-body,
  .checkout-modal-body,
  #cartItems,
  #favoritesItems {
    overflow-x: hidden;               /* <— отрезаем горизонталь */
  }

  /* 3) флекс-дети могут сжиматься по ширине, чтобы текст не «выпирал» */
  .modal-left,
  .modal-right {
    min-width: 0;                     /* <— критично для flex */
  }

  /* 4) текст в описании гарантированно переносится */
  #modalDescription,
  .modal-right {
    overflow-wrap: anywhere;          /* современные браузеры */
    word-break: break-word;           /* фолбэк */
    white-space: normal;
  }
}

/* ===== CHECKOUT: mobile bottom-sheet ===== */
@media (max-width: 992px) {
  /* Контейнер модалки во всю ширину */
  #checkoutModal .modal-content,
  .checkout-modal.new-layout {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 16px !important;
    box-sizing: border-box;
  }

  /* Скроллим только тело модалки, без горизонтали */
  #checkoutModal .modal-body,
  .checkout-modal-body {
    display: block !important;                     /* одна колонка */
    max-height: calc(100dvh - 120px);              /* видимая высота */
    overflow-y: auto;                              
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Блок товаров и форма — идут друг за другом */
  .checkout-products,
  .checkout-form,
  #checkoutModal .section {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    padding: 12px;
    min-width: 0; /* ключ к отсутствию горизонтального скролла */
  }

  /* Список товаров — единый вертикальный скролл без полосы */
  .checkout-products-list {
    max-height: none !important;
    overflow: visible !important;     /* прокрутка общая в .modal-body */
  }

  /* Карточки позиций компактнее на узких экранах */
  .checkout-products-list .item,
  #checkoutModal .summary-item {
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
  }

  /* Сетка формы — в одну колонку */
  .checkout-form .form-row.two,
  #checkoutModal .form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Поля ввода — удобные для тача и без зума на iOS */
  .checkout-form input,
  .checkout-form select,
  .checkout-form textarea,
  #checkoutModal input,
  #checkoutModal select,
  #checkoutModal textarea {
    height: 48px;                /* тач-таргет */
    font-size: 16px;             /* iOS не зумит */
    line-height: 1.2;
  }
  #checkoutModal textarea,
  .checkout-form textarea {
    min-height: 96px;            /* чтобы видно несколько строк */
    height: auto;
    resize: vertical;
  }

  /* Крестик — не прыгает и всегда доступен */
  #checkoutModal .modal-close,
  .checkout-modal .close-btn,
  #checkoutModal .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px; height: 40px;
    border-radius: 10px;
    z-index: 5;
  }

  /* Липкий нижний бар с кнопкой отправки */
  #checkoutModal #submitOrderBtn,
  .checkout-form button[type="submit"] {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: 100%;
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #000;
    color: #fff;
    border: 0;
    font-weight: 700;
    z-index: 2; /* поверх контента */
  }

  /* Мягкая подложка под липкую кнопку — читабельный финал списка */
  .checkout-form::after,
  .checkout-products::after {
    content: "";
    display: block;
    height: calc(16px + env(safe-area-inset-bottom));
  }

  /* Подстраховка против горизонтального скролла от длинного текста */
  .checkout-products,
  .checkout-form,
  .checkout-modal-body,
  #checkoutModal .modal-body {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Скрываем «рисунок» скроллбара в чекауте, скролл оставляем */
#checkoutModal .modal-body::-webkit-scrollbar,
.checkout-modal-body::-webkit-scrollbar { width: 0; height: 0; }
#checkoutModal .modal-body,
.checkout-modal-body { scrollbar-width: none; -ms-overflow-style: none; }

/* === CHECKOUT (mobile & desktop): список сверху скролл, "Итого" снизу === */

/* Родитель не скроллится, только список */
#checkoutModal .checkout-products{
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible !important;
  max-height: none !important;
}

/* Скролл только у списка товаров */
#checkoutModal .checkout-products-list{
  flex: 1;
  max-height: clamp(220px, 50vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  scrollbar-width: none;          /* Firefox — без полосы */
}
#checkoutModal .checkout-products-list::-webkit-scrollbar{ /* WebKit — без полосы */
  width: 0; height: 0;
}

/* "Итого" отделяем и прижимаем к низу блока заказов */
#checkoutModal .checkout-total{
  position: sticky;               /* остается внизу блока заказов, пока крутится список */
  bottom: 0;
  background: linear-gradient(transparent, #f7f7f8 40%);
  padding-top: 12px;
  border-top: 1px solid #e7e7e7;
  z-index: 1;                     /* поверх тени списка */
}

/* Строка итога — в одну линию */
#checkoutModal .checkout-total .total-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
}

/* Мобильная раскладка одной колонкой — как договаривались */
@media (max-width: 900px){
  #checkoutModal .modal-body,
  .checkout-modal-body{
    grid-template-columns: 1fr !important;
  }
}

/* Кнопка бургер-меню */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff; /* белые линии */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* При открытии меню можно сделать анимацию "крестика" */
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Fix: выравниваем контент карточки товара в корзине --- */
.cart-item {
  justify-content: space-between;        /* картинка слева, кнопка "Удалить" справа */
  column-gap: 16px;
}

.cart-item-info {
  flex: 1;
  display: flex;                         /* центрируем всё внутри (заголовок, цена, счетчик) */
  flex-direction: column;
  align-items: center;
  text-align: center;
  row-gap: 6px;
}

/* сам счетчик по центру и с равными отступами */
.quantity-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

/* кнопкам счетчика задаем одинаковый размер,
   чтобы визуально они не "плясали" на разных экранах */
.quantity-counter button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: #000;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

/* сам счётчик — фиксированная ширина и центрирование (у тебя часть уже есть) */
.quantity-counter .count {
  min-width: 32px;                       /* было 24 — чуть шире выглядит аккуратнее */
  text-align: center;                    /* уже есть, подтверждаем */
}

/* мобильные: ничего не "падает", всё остаётся по центру */
@media (max-width: 600px) {
  .cart-item {
    align-items: center;
  }
  .cart-item img {
    margin-right: 12px;
  }
  .remove-cart-btn {
    align-self: center;
  }
}

/* Privacy/benefits: мобильные размеры и типографика под общий стиль секций */
.benefits h1 {
  font-size: clamp(24px, 6.2vw, 40px);  /* побольше, но не вылезает за экран */
  line-height: 1.2;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* Текст раздела — близко к визуальному весу соседних секций */
.benefits p,
.benefits li {
  font-size: clamp(14px, 3.9vw, 18px);
  line-height: 1.55;
}

/* Возвращаем “высоту” секции на узких экранах, чтобы не выглядела меньше */
@media (max-width: 480px) {
  .benefits {
    padding: 48px 20px; /* ближе к базовому 60px 20px из общего стиля */
  }
}

/* Чуть лучше читаемость на очень узких экранах */
@media (max-width: 360px) {
  .benefits {
    padding: 52px 16px;
  }
}

/* === Mobile: компактные карточки брендов, 2 колонки === */
@media (max-width: 480px) {
  /* Ровно 2 колонки */
  .brands-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px 20px !important;
  }

  /* Уменьшаем карточку */
  .brand-card {
    padding: 10px !important;
    border-radius: 10px !important;
    gap: 8px !important;
  }

  /* Логотип ниже и компактней */
  .brand-card .brand-logo {
    aspect-ratio: 1 / 1;
  }
  .brand-card .brand-logo img {
    height: 56px !important;      /* было ~80px */
    max-height: 56px !important;
  }

  /* Название меньше, чтобы всё помещалось красиво */
  .brand-name {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
  }

  /* Поле поиска брендов растягиваем на ширину экрана */
  .brands-toolbar input {
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 0.95rem !important;
  }
}

/* === На небольших планшетах: 3 колонки (опционально) === */
@media (min-width: 481px) and (max-width: 768px) {
  .brands-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
  }
  .brand-card .brand-logo img { height: 64px !important; }
  .brand-name { font-size: 0.9rem !important; }
}

#cartItems h4,
#favoritesItems h4 {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkout-field {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.checkout-field label {
  font-weight: 600;
  margin-bottom: 5px;
}

.checkout-field select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}



/* ====   ( + ) ================================== */

/*   (   ) */
.top-bar{
  padding: 4px 14px !important;     /*      */
  font-size: 14px !important;
  line-height: 1.2 !important;
}

/*  / */
header, .header, .site-header {
  padding-top: 8px !important;
  padding-bottom: 8px !important;   /* :    */
}

/*  */
.header .logo img, .site-header .logo img, .logo img {
  height: 36px !important;          /*  ~4856,   */
  width: auto;
  display: block;
}

/*  :  */
.nav a, .menu a, .main-menu a, nav ul li a {
  padding: 10px 12px !important;    /*    */
  line-height: 1.1 !important;
  font-size: 15px !important;       /*   16,   */
}

/*  (//) */
.header .icon, .nav .icon, .menu .icon, .social-icons a {
  font-size: 18px !important;       /*  ,     */
}

/*  -        */
.nav a::after, .menu a::after, .main-menu a::after {
  bottom: -8px !important;
}

/* ==== :   ===================================== */
@media (max-width: 768px) {

  .top-bar{
    padding: 3px 12px !important;
    font-size: 13px !important;
  }

  header, .header, .site-header {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .header .logo img, .site-header .logo img, .logo img {
    height: 28px !important;
  }

  .nav a, .menu a, .main-menu a, nav ul li a {
    padding: 8px 10px !important;
    font-size: 14px !important;
  }

  .header .icon, .nav .icon, .menu .icon, .social-icons a {
    font-size: 16px !important;
  }
}


@media (max-width: 480px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .top-bar .social-icons {
    margin-left: 0;
    align-self: flex-end; /*     */
  }
}


/* ===== :   ,     ===== */
@media (max-width: 768px) {
  /*    ,       */
  .top-bar {
    position: relative;
    padding: 8px 60px 8px 12px; /* 60px       */
    line-height: 1.3;
    height: auto;
  }

  /*    */
  .top-bar .contact-info {
    display: flex;
    flex-direction: column;
    gap: 6px;                   /*      */
    align-items: flex-start;
  }

  /* :     */
  .top-bar .social-icons {
    position: absolute;
    top: 8px;                   /* <    /     */
    right: 12px;
    display: flex;
    gap: 10px;
    margin: 0; padding: 0;
  }

  /*     */
  .top-bar .social-icons a i,
  .top-bar .social-icons a svg,
  .top-bar .social-icons a img {
    width: 26px;
    height: 26px;
    font-size: 26px;
    line-height: 1;
  }
}




