/* Сброс базовых стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Общие настройки */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: #f4f4f4;
  color: #333;
}


/* Контейнер */
.container {
  
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
   gap: 20px;
}



.site-header {
  
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;   /* прозрачный фон */
  padding: 12px 20px;
  border-bottom: 1px solid #444;
  font-family: "Arial", sans-serif; /* единый шрифт */
  font-size: 16px;                  /* единый размер */
  color: #d4af37;                   /* золотой цвет текста */
}

.site-header a,
.site-header button {
  font-family: "Arial", sans-serif; /* одинаковый шрифт */
  font-size: 16px;                  /* одинаковый размер */
  color: #d4af37;                   /* золотой цвет */
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  
}

.site-header a:hover,
.site-header button:hover {
  color: #ffd700; /* ярче золото при наведении */
}


.toggle-btn {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: #2c3e50;
}

.add-btn {
  background: #007bff;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.add-btn:hover {
  background: #0056b3;
}

.cabinet-btn {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cabinet-btn:hover {
  color: #0056b3;
  text-decoration: underline;
}

.burger-btn {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: #2c3e50;
  gap: 20px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: #f8f9fa;
  border-top: 1px solid #ddd;
}

.mobile-menu a {
  padding: 12px;
  text-decoration: none;
  color: #2c3e50;
  border-bottom: 1px solid #eee;
}

.mobile-menu a:hover {
  background: #e9ecef;
}

/* Адаптив */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .burger-btn {
    display: block;
  }
}

/* 📱 Адаптив для телефона */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 0 10px;
  }

    .site-header {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .site-header a, 
  .site-header button {
    font-size: 14px;
  }

  .add-btn {
    width: 100%; /* растягиваем на всю ширину */
    text-align: center;
  }

  .cabinet-btn {
    display: block;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .site-header {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .site-header a, .site-header button {
    font-size: 14px;
  }
}


@media (max-width: 480px) {
  .add-btn, .cabinet-btn {
    padding: 12px;
    font-size: 16px;
  }
}







/* Поиск */
/* Поиск */
.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-form input {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  flex: 1; /* растягиваем поле */
}

.search-form button {
  padding: 6px 12px;
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-form button:hover {
  background: #1e40af; /* чуть темнее при наведении */
}

/* 📱 Адаптив для телефона */
@media (max-width: 768px) {
  .search-form {
    flex-direction: column;   /* поля и кнопка в столбик */
    gap: 8px;
    width: 100%;
    margin-top: 10px;         /* отступ сверху */
  }

  .search-form input[type="text"] {
    width: 100%;              /* растягиваем на всю ширину */
    font-size: 16px;          /* чуть крупнее текст */
  }

  .search-form button {
    width: 100%;              /* кнопка тоже на всю ширину */
    font-size: 16px;
    padding: 12px;
  }
}











/* Языки */
.translate .dropbtn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
}







.breadcrumbs {
  font-size: 14px;
  margin: 10px 0;
  color: #666;
}

.breadcrumbs a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: #000;
}

.breadcrumbs a.active {
  font-weight: bold;
  color: #333;
}









/* Основной контент */
/* Основний макет */
.layout {
  display: flex;
  gap: 20px;
  max-width: 1220px;
  margin: 0px auto;
  padding: 0 15px;
}


/* Сайдбар */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 6px rgba(0,0,0,0.2);
  transition: left 0.3s ease;
  padding: 20px;
  z-index: 1000;
}

.sidebar nav a {
  display: block;
  padding: 12px 0;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
}

.sidebar nav a:hover {
  color: #007bff;
}

.sidebar.active {
  left: 0;
}

.close-btn {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  float: right;
  margin-bottom: 20px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 900;
}

.overlay.active {
  display: block;
}






/* Контент справа */
.main-content {
  flex: 1;                /* займає весь залишок */
  display: flex;
  flex-direction: column; /* секції йдуть у стовпчик */
  gap: 20px;
}
.sidebar h3 {
  margin-bottom: 10px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}


.sidebar ul li {
  margin-bottom: 8px;
}

.sidebar ul li a {
  text-decoration: none;
  color: #007BFF;
  font-weight: bold;
}

.sidebar ul li a:hover {
  color: #0056b3;
}





@media (max-width: 768px) {
  .layout {
    flex-direction: column; /* колонки превращаются в строки */
  }

  .sidebar {
    flex: 1;
    width: 100%;          /* сайдбар занимает всю ширину */
    margin-bottom: 20px;  /* отступ снизу */
    box-shadow: none;     /* убираем тень для простоты */
    border-radius: 0;     /* убираем скругления */
  }
}

@media (max-width: 480px) {
  .sidebar {
    display: none; /* скрываем сайдбар на очень маленьких экранах */
  }

  .mobile-categories {
    display: block;
    margin-bottom: 15px;
  }

  .mobile-categories select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
  }
}




/* Контент з товарами */

.vip-ads {
  max-width: 1220px;
  margin: 0 auto;
  padding: 20px;
}

.vip-ads h2 {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  color: #d4af37; /* золотой заголовок */
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* три карточки в ряд */
  gap: 20px;
}

.products {
  flex: 1;
}

.product-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 300px;       /* одинаковая высота */
  object-fit: cover;   /* обрезка фото */
  display: block;
}

.product-card h3 {
  font-size: 18px;
  margin: 10px 0;
  color: #333;
}

.product-card .price {
  font-size: 1.1em;
  color: #28a745;
  margin-bottom: 10px;
}

.product-card .btn {
  display: inline-block;
  padding: 8px 15px;
  background: #007BFF;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.product-card .btn:hover {
  background: #0056b3;
}


@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* планшет: по две карточки */
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr; /* телефон: одна карточка */
  }

  .product-card img {
    height: 180px; /* фото чуть меньше на телефоне */
  }
}


/* Заголовки */
h2 {
  margin-bottom: 15px;
  color: #444;
}





/* Футер */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 15px 0;
  margin-top: 20px;
}

@media (max-width: 768px) {
  footer {
    font-size: 0.9em;   /* текст немного меньше */
    padding: 12px 0;    /* компактнее отступы */
  }
}

@media (max-width: 480px) {
  footer {
    font-size: 0.8em;   /* ещё компактнее */
    padding: 10px 0;
  }
}





/* Сетка блога */
/* Сетка блога */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Карточка блога */
.blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-card h3 {
  margin: 15px;
  font-size: 1.2em;
  color: #333;
}

.blog-card p {
  margin: 0 15px 15px;
  color: #666;
}

.blog-card a {
  display: block;
  margin: 0 15px 15px;
  text-decoration: none;
  color: #007BFF;
  font-weight: bold;
}

.blog-card a:hover {
  color: #0056b3;
}

/* 🔹 Адаптивность для телефона */
@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr; /* одна колонка */
  }

  .blog-card img {
    height: 150px; /* чуть ниже картинка */
  }

  .blog-card h3 {
    font-size: 1em; /* компактнее заголовок */
  }

  .blog-card p {
    font-size: 0.9em; /* текст меньше */
  }
}




.page-home .layout { display:flex; }
.page-about .about-page { max-width:1200px; }
.page-blog .blog-card { box-shadow:0 2px 8px rgba(0,0,0,0.1); }






/* Контейнер сторінки */
.contacts-page {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-family: "Didact Gothic", sans-serif;
}

/* Заголовок */
.contacts-page h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #007BFF;
  border-bottom: 2px solid #007BFF;
  padding-bottom: 10px;
}

/* Текст */
.contacts-page p {
  font-size: 1.1em;
  margin: 10px 0;
  color: #333;
}

.contacts-page p strong {
  color: #000;
}

/* Карта */
.contacts-page .map {
  margin-top: 25px;
  border: 2px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contacts-page iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* Адаптивність */
@media (max-width: 768px) {
  .contacts-page {
    padding: 15px;
  }
  .contacts-page h2 {
    font-size: 1.6em;
  }
  .contacts-page iframe {
    height: 300px;
  }
}











/* Контейнер блогу */
.blog-page {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.blog-page h2 {
  font-size: 2em;
  margin-bottom: 25px;
  color: #007BFF;
  border-bottom: 2px solid #007BFF;
  padding-bottom: 10px;
}

/* Сітка */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* Карточка */
.blog-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-card h3 {
  margin: 15px;
  font-size: 1.3em;
  color: #333;
}

.blog-card p {
  margin: 0 15px 15px;
  color: #666;
  font-size: 0.95em;
}

.blog-card .btn {
  display: inline-block;
  margin: 0 15px 15px;
  padding: 8px 15px;
  background: #007BFF;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.blog-card .btn:hover {
  background: #0056b3;
}

/* 🔹 Адаптивність */
@media (max-width: 480px) {
  .blog-card img {
    height: 150px;
  }
  .blog-card h3 {
    font-size: 1.1em;
  }
  .blog-card p {
    font-size: 0.9em;
  }
}










/* Контейнер */
.about-page {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-family: "Didact Gothic", sans-serif;
}

/* Заголовки */
.about-page h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #007BFF;
  border-bottom: 2px solid #007BFF;
  padding-bottom: 10px;
}

.about-section h3,
.about-team h3 {
  font-size: 1.5em;
  margin-top: 25px;
  margin-bottom: 10px;
  color: #333;
}

/* Текст */
.about-page p {
  font-size: 1.05em;
  line-height: 1.6;
  color: #555;
}

/* Команда */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.team-card {
  background: #f9f9f9;
  border-radius: 8px;
  text-align: center;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.team-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.team-card h4 {
  margin: 5px 0;
  color: #007BFF;
}

.team-card p {
  color: #666;
  font-size: 0.95em;
}

/* 🔹 Адаптивність */
@media (max-width: 768px) {
  .about-page {
    padding: 15px;
  }
  .about-page h2 {
    font-size: 1.6em;
  }
  .team-card img {
    height: 150px;
  }
}



.search-bar {
  display: flex;
  justify-content: center; /* центрує по горизонталі */
  margin: 10px auto;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  max-width: 1200px; /* щоб не розтягувалось на всю ширину */
}

.search-bar form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center; /* елементи теж по центру */
}

.search-bar input,
.search-bar select,
.search-bar button {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.search-bar button {
  background: #007BFF;
  color: #fff;
  cursor: pointer;
}

.search-bar button:hover {
  background: #0056b3;
}







/* Список оголошень */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* гибкая сетка */
  gap: 20px;
}

.ad-card {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  overflow: hidden; /* чтобы картинка не вылазила */
}

.ad-card img {
  width: 100%;
  height: 220px;       /* одинаковая высота */
  object-fit: cover;   /* обрезка фото */
  border-radius: 5px;
  display: block;
}

.ad-card h3 {
  font-size: 18px;
  margin: 10px 0;
  color: #333;
}

.ad-card .price {
  font-size: 16px;
  font-weight: bold;
  color: #28a745;
  margin-bottom: 10px;
}

.ad-card .btn {
  display: inline-block;
  background: #007bff;
  color: #fff;
  padding: 8px 16px;
  margin-bottom: 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.ad-card .btn:hover {
  background: #0056b3;
}

/* 📱 Адаптив */
@media (max-width: 1024px) {
  .ads-grid {
    grid-template-columns: repeat(2, 1fr); /* планшет: по две карточки */
  }
}

@media (max-width: 768px) {
  .ads-grid {
    grid-template-columns: 1fr; /* телефон: одна карточка */
  }

  .ad-card img {
    height: 180px; /* фото чуть меньше на телефоне */
  }

  .sidebar {
    display: none; /* ховаємо категорії */
  }

  .mobile-categories {
    display: block;
    margin-bottom: 15px;
  }

  .mobile-categories select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
  }
}









.login-page {
  max-width: 400px;
  margin: 40px auto;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-page h2 {
  text-align: center;
  margin-bottom: 20px;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.social-login button {
  padding: 10px;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
}

.social-login .facebook { background: #3b5998; }
.social-login .apple { background: #000; }
.social-login .google { background: #db4437; }

.login-page form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-page input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.login-page button[type="submit"] {
  background: #007bff;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 4px;
}









.register-page {
  max-width: 400px;
  margin: 40px auto;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.register-page h2 {
  text-align: center;
  margin-bottom: 20px;
}

.register-page form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.register-page input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.register-page button[type="submit"] {
  background: #28a745;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 4px;
}











/* Секція account */
.account {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.account h2 {
  margin-bottom: 15px;
  color: #333;
}

.account-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account .btn {
  display: inline-block;
  padding: 8px 15px;
  background: #007BFF;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.account .btn:hover {
  background: #0056b3;
}

.account .btn-secondary {
  background: #6c757d;
}

.account .btn-secondary:hover {
  background: #5a6268;
}













form.add-ad-form {
  width: 100%;              /* на всю ширину контейнера */
  max-width: 800px;         /* можна задати обмеження */
  margin: 0 auto;           /* центрування */
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

form.add-ad-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

form.add-ad-form input,
form.add-ad-form textarea,
form.add-ad-form select {
  width: 100%;              /* 🔹 на всю ширину */
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
}

form.add-ad-form textarea {
  min-height: 100px;
  resize: vertical;
}

form.add-ad-form input[type="file"] {
  padding: 5px;
}

form.add-ad-form .btn {
  display: inline-block;
  width: 100%;              /* 🔹 кнопка теж на всю ширину */
  padding: 12px;
  background: #007BFF;
  color: #fff;
  text-align: center;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

form.add-ad-form .btn:hover {
  background: #0056b3;
}








.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.gallery img {
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


.preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.preview-grid img {
  cursor: pointer;
}





@media (max-width: 480px) {
  /* Галерея товаров */
  .product-detail .gallery {
    flex-direction: column;   /* фото идут в колонку */
    align-items: center;      /* выравнивание по центру */
  }

  .product-detail .gallery img {
    flex: none;               /* убираем деление на проценты */
    width: 100%;              /* фото растягивается на всю ширину блока */
    max-width: 320px;         /* можно ограничить ширину */
    height: auto;
  }

  /* Превью загрузки фото */
  .preview-grid {
    grid-template-columns: 1fr; /* одна колонка */
  }

  .preview-grid img {
    width: 100%;
    max-width: 320px;
    height: auto;
  }
}















.auth-container {
  max-width: 420px;
  margin: 40px auto;
  padding: 25px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.auth-container input[type="text"],
.auth-container input[type="email"],
.auth-container input[type="password"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.3s;
}

.auth-container input:focus {
  border-color: #007bff;
  outline: none;
}

.auth-container button {
  width: 100%;
  padding: 12px;
  background: #007bff;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.auth-container button:hover {
  background: #0056b3;
}

/* Соц-кнопки */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.social-login a {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
}

.social-login .google {
  background: #db4437;
}

.social-login .google:hover {
  background: #c23321;
}

.social-login .facebook {
  background: #3b5998;
}

.social-login .facebook:hover {
  background: #2d4373;
}


@media (max-width: 480px) {
  .container {
    gap: 10px;
  }
}








.preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.preview-grid img {
  width: 150px;            /* одинаковый размер превью */
  height: 150px;
  object-fit: cover;       /* обрезка фото */
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.preview-grid img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .gallery img {
    width: 80px;
    height: 80px;
  }

  .preview-grid img {
    width: 120px;
    height: 120px;
  }
}












.product-detail .gallery {
  display: flex;
  flex-wrap: wrap;       /* фото переносяться на новий ряд */
  gap: 15px;             /* відступи між фото */
  margin: 20px 0;
  justify-content: flex-start;
}

.product-detail .gallery img {
  flex: 1 1 calc(25% - 15px); /* три фото в ряд */
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.product-detail .gallery img:hover {
  transform: scale(1.05); /* легкий ефект при наведенні */
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.gallery img {
  width: 100px;            /* фиксированная ширина превью */
  height: 100px;           /* фиксированная высота */
  object-fit: cover;       /* обрезка фото */
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.05);  /* лёгкий эффект при наведении */
}



@media (max-width: 480px) {
  .product-detail .gallery img {
    flex: 1 1 calc(50% - 10px);
  }
}
@media (max-width: 480px) {
  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .account h2,
  .auth-container h2 {
    font-size: 18px;
  }
  form.add-ad-form label {
    font-size: 14px;
  }
  form.add-ad-form .btn {
    font-size: 1em;
    padding: 10px;
  }
}











.product-card.vip {
  border: 2px solid rgb(235, 216, 111);
  background: #fffbe6;
}

.vip-label {
  color: #eccb5b;
  font-weight: bold;
  margin-left: 10px;
}


















.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin-right: 10px;
}

/* скрываем стандартный чекбокс */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* бегунок */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 28px;
}

/* кружок внутри */
.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

/* активное состояние */
.switch input:checked + .slider {
  background-color: gold; /* золотой фон для VIP */
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}

/* текст рядом */
.vip-text {
  font-weight: bold;
  color: #333;
  vertical-align: middle;
}







/* общий контейнер для всех превью */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 колонки */
  gap: 15px;
  margin-top: 20px;
}

.upload-box {
  position: relative;
  width: 100%;
  padding-top: 100%; /* квадрат */
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #f9f9f9;
  transition: 0.3s;
}

.upload-box:hover {
  border-color: #28a745;
  background: #eef9f0;
}

.upload-box::before {
  content: "+";
  position: absolute;
  font-size: 48px;
  color: #999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.upload-box input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0; /* скрываем стандартный input */
  cursor: pointer;
}










