/* Общие переменные и стили */
:root {
  --bg: #1e1e2e;
  --menu: #2a2935;
  --tile: #595269;
  --text: #ffffff;
  --accent: #a48c8c;
  --circle-bg: #70696c;
  --circle-active: #a48c8c;
  --price-color: #d7b4b4; /* Добавь вот это для цвета цены по умолчанию */

  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --yellow-main: #3b82f6 ;/* вместо #ffd700 */

  --yellow-dark: #1e3a8a;
    --item-height: 45px;   /* Сделали строки чуть ниже */
    --radius: 120px;        /* Увеличили радиус для пологого изгиба */  


}
html, body {
  width: 100%;
  overflow-x: hidden; /* Защита от боковой прокрутки */
  margin: 0;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  /* margin: 0; — можно убрать, так как он уже есть в блоке выше */
  
  padding-top: 80px;     /* Запас под хедер */
  padding-bottom: 100px;  /* Запас под навбар */
  
  /* Добавь это, если хочешь плавный скролл по всей странице */
  scroll-behavior: smooth; 
}


/* Header */
header {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px); 
  max-width: 850px;
  
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px; /* Если в nav padding другой, визуально контент может чуть не совпадать */
  box-sizing: border-box; /* Важно, чтобы padding не раздувал ширину больше 850px */
  
  border-radius: var(--radius-lg);
  background: rgba(42, 41, 53, 0.7);
  
  /* Добавь префикс для Safari, чтобы блюр везде работал */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  
  /* Эти свойства лучше перенести на текст внутри хедера */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  
  font-size: clamp(10px, 2vw, 20px);
}




header::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: 10px;
  background: radial-gradient(circle at center, rgba(164,140,140,0.2), transparent 80%);
  filter: blur(15px);
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.sort-container {
  max-width: 850px;
  margin: 0 auto;
}  

nav {
  /* Фиксация внизу экрана */
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  /* Размеры */
  width: calc(100% - 20px);
  max-width: 850px;
  height: 65px; /* Строгая высота предотвращает прыжки */
  border-radius: 20px;
  
  /* Дизайн фона */
  background: rgba(42, 41, 53, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  /* Сетка элементов */
  display: flex;
  justify-content: space-around;
  align-items: flex-end; /* Выравнивание текста по нижней линии */
  padding: 0 10px 8px 10px;
  box-sizing: border-box;
  margin: 0;
}

/* Ссылки */
nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #ccc;
  font-size: 11px;
  transition: color 0.3s;
}

nav a:hover {
  color: #fff;
}

/* Обычные иконки с ободком */
nav a:not(.sell-button) .nav-icon {
  width: 36px;
  height: 36px;
  border: 1px solid #70696c;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

/* Центральная кнопка: контейнер */
nav a.sell-button {
  position: relative;
  height: 65px;
  justify-content: flex-end; /* Текст вниз */
}

/* Центральная кнопка: летающая иконка */
nav a.sell-button .nav-icon {
  position: absolute;
  top: -10px; /* Регулировка высоты "полета" */
  left: 50%;
  transform: translateX(-50%);
  
  width: 52px;
  height: 52px;
  background: var(--yellow-main, #ffd700);
  color: #2a2935;
  border-radius: 14px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, box-shadow 0.3s;
}

/* Текст под центральной кнопкой */
nav a.sell-button span:not(.nav-icon) {
  white-space: nowrap;
  margin-bottom: 0px;
}

/* Размер шрифта иконок Material */
nav .material-icons {
  font-size: 24px;
  line-height: 1;
}

/* Ховер для центральной кнопки */
nav a.sell-button:hover .nav-icon {
  background: var(--yellow-dark, #ffcc00);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
}





.location,
.contacts {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(10px, 2vw, 20px);
}

.section-header {
  max-width: 850px;
  margin: 30px auto 10px;
  padding: 8px 15px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  color: var(--text);
  background-color: var(--menu);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.section-header,
.map-container,
.address-list {
  margin: 20px 10px auto;
  box-sizing: border-box;
}

/* Header */



.logo {
  font-size: 24px;
  font-weight: bold;
}
.logo-block img {
  max-width: 100%;
  height: auto;
}


.location, .contacts a {
  display: flex;
  align-items: center;
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.contacts a:hover {
  color: var(--text);
}

/* Основная сетка */
.main-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 20px;
}

.left-controls {
  background-color: var(--menu);
  padding: 15px;
  border-radius: 10px;
}

.section-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #aaa;
}

.option {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
}

.circle {
  width: 30px;
  height: 30px;
  background-color: var(--tile);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  transition: background-color 0.3s;
}

.circle.active {
  background-color: var(--circle-active);
}

/* Карусель */


.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-controls {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-btn {
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
}










.btn {
  text-decoration: none;
  background-color: var(--accent);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--circle-bg);
}

/* Нижняя навигация */





.sold {
    background-color: #595269;  /* красный цвет */
  position: absolute;
  top: 8px;
  left: 5px;                 /* слегка выступает за левый край */
  padding: 3px 8px;           /* уменьшил ширину и высоту */
  border-radius: 8px;
  font-size: 12px;            /* уменьшаем шрифт, чтобы стало уже */
  color: #fff;
  font-weight: bold;
  z-index: 5;
}

/* Проверь, что родительские блоки относительно позиционированы */




  .material-icons {
  vertical-align: middle;
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  margin-right: 5px; /* вот это добавь, отодвинет иконку от левого края */
}







.circle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle .material-icons {
  margin: 0; /* убираем любые лишние отступы */
  padding: 0;
  line-height: 1; 
  font-size: 20px; /* если надо — можешь увеличить/уменьшить */
}






.contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.contact-icons {
  display: flex;
  gap: 10px; /* отступ между иконками */
  margin-bottom: 5px; /* расстояние до номера телефона */
}

.contacts .material-icons {
  font-size: 24px; /* размер иконок */
  color: #ccc;
  transition: color 0.3s;
}

.contacts .material-icons:hover {
  color: #ffffff;
}

.phone-number {
  font-size: 14px;
  color: #ffffff;
}







.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 10px;
  pointer-events: none; /* не мешают нажимать на картинку */
}

.carousel-btn {
  background: rgba(0,0,0,0.0);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 8px;
  pointer-events: auto; /* кнопки нажимаются */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.carousel-btn:hover {
  background: rgba(0,0,0,0.0);
}

.carousel-btn .material-icons {
  font-size: 30px;
  line-height: 1;
}


.sort-container {
  margin: 8px 20px; /* Уменьши верхний и нижний отступ */
  display: flex;
  align-items: center;
  color: #ffffff;
}


.sort-container select {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--menu);
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
}







.blur-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #a48c8c, transparent 70%);
  filter: blur(120px);
  transform: translate(-50%, -50%);
  z-index: -10; /* на самом фоне */
  opacity: 0.6; /* можешь уменьшить или увеличить прозрачность */
}




@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}
.sold {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #595269;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: bold;
}
/* Контейнер, который ставит их в ряд */
.status-wrapper {
    position: absolute;
    top: 11px;
    left: 5px;
    z-index: 5;
    display: flex;
    gap: 2px;
    pointer-events: none;
}

/* Общий стиль плашки */
.status-label {
  padding: 3px 8px;
  border-radius: var(--radius-full, 20px); /* Стиль "таблетка" */
  font-size: 11px;
  color: #fff;
  font-weight: bold;
  white-space: nowrap;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  animation: float 4s ease-in-out infinite;
}

/* Цвета плашек */
.available   { background-color: #4CAF50; }
.under-order { background-color: #1e3a8a; }
.novoe       { background-color: #5E2A8C; }
.bu          { background-color: #1E3A8A; }

/* 🔧 Верхняя шапка с прозрачностью и блюром */


/* 🎯 Уменьшаем плашку «В наличии» */
.status-label.available {
  font-size: 12px;  /* поменьше шрифт */
  padding: 3px 8px; /* меньше отступы внутри */
}
.status-label.under-order {
  font-size: 12px;  /* поменьше шрифт */
  padding: 3px 8px; /* меньше отступы внутри */
}
.status-label.novoe {
  font-size: 12px;  /* поменьше шрифт */
  padding: 3px 8px; /* меньше отступы внутри */
}
.status-label.bu {
  font-size: 12px;  /* поменьше шрифт */
  padding: 3px 8px; /* меньше отступы внутри */
}
/* 🔧 Нижнее меню аналогично верхней шапке */

.carousel-double-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
 
  overflow: hidden;
}

.carousel {
  position: relative;
  overflow: hidden;
  height: 150px;
  background: transparent; /* Вот что меняем */
  border-radius: 0px;
}


.carousel-inner {
  display: flex;
  width: 200%; /* строго 200%, т.к. 2 набора из 4-х изображений */
  height: 100%;
}

.carousel-inner img {
  width: auto;             
  height: 100%;            
  object-fit: cover;       
  object-position: center; 
  flex-shrink: 0;

  /* Вот что добавляем: */
  border-radius: 10px;  /* скруглить края изображений */
  margin: 0 5px;        /* добавить отступы слева и справа между фото */
}



/* чётко прописанная анимация */
@keyframes smoothSlide {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.smooth-animate {
  animation: smoothSlide 20s linear infinite;
}





.left-controls{
  border-radius: var(--radius-md);
}










.left-controls {
  background-color: var(--menu);
  padding: clamp(19px, 2vw, 15px); /* отступ не меньше 10px */
  border-radius: var(--radius-md);
  font-size: clamp(19px, 1.8vw, 14px); /* текст не меньше 12px */
}

.section-title {
  font-size: clamp(19px, 1.9vw, 15px); /* минимальный размер заголовка 12px */
}

.option {
  margin-bottom: clamp(6px, 1.5vw, 10px);
}

.circle {
  width: clamp(22px, 3vw, 30px);
  height: clamp(22px, 3vw, 30px);
}

.circle .material-icons {
  font-size: clamp(16px, 2vw, 20px);
}

.label {
  font-size: clamp(13px, 1.8vw, 14px);
}





.left-controls {

  max-height: calc(100% - 1px); /* Ограничивает высоту блока, слегка урезая снизу */
  padding: 10px;
  overflow: hidden;
  box-sizing: border-box;
}


.left-controls {
  width: clamp(120px, 30vw, 200px);
  min-width: unset;
  max-height: calc(100% - 110px);
  padding: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Уменьшение всего контента равномерно без переноса */









.theme-option, .category-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 10px;
  cursor: pointer;
  color: #ccc;
  margin-bottom: 10px;
}

.theme-option.active {
  background-color: #595269;
  color: #ffffff;
}
.category-option.active{

  color: #3b82f6;
}





.info-slide {
  flex: 0 0 auto;
  border-radius: 10px;
  width: 100%;
  object-fit: cover;
}

.info-slide {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background-color: rgba(89, 82, 105, 0.7);
  color: #fff;
}
















.left-controls {
  width: clamp(120px, 30vw, 200px);
}














.phone-number {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}







.top-section-wrapper {
  display: flex;
  gap: 10px; /* расстояние между левым и правым блоками */
  padding: 10px;
  box-sizing: border-box;
}

.left-panel, .right-panel {
  flex: 1; /* панели займут равное доступное пространство */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Чтобы внутренние блоки внутри панелей занимали всё пространство */
.left-panel, .right-panel {
  background-color: var(--menu);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 15px; /* регулируй по вкусу */
}


/* 1. ГЛАВНЫЙ КОНТЕЙНЕР (КОРПУС) */
.left-panel {
  width: 280px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: none;
  background-color: var(--menu); /* Основной фон панели */
  border-radius: var(--radius-md);
  perspective: 1200px; /* Глубина 3D */
  
  /* Внутренние тени сверху и снизу создают эффект изгиба цилиндра */
  box-shadow: inset 0 25px 35px -15px rgba(0,0,0,0.3), 
              inset 0 -25px 35px -15px rgba(0,0,0,0.3);
}

/* 2. ЭФФЕКТ РАСТВОРЕНИЯ (ШТОРКИ) */
.left-panel::before,
.left-panel::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 35%; /* Насколько сильно пункты будут уходить в прозрачность */
  z-index: 10;
  pointer-events: none;
}

.left-panel::before {
  top: 0;
  background: linear-gradient(to bottom, var(--menu) 0%, transparent 100%);
}

.left-panel::after {
  bottom: 0;
  background: linear-gradient(to top, var(--menu) 0%, transparent 100%);
}

/* 3. БАРАБАН С КОНТЕНТОМ */
.left-panel-content {
  position: relative;
  width: 100%;
  height: var(--item-height);
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 4. ПУНКТЫ СПИСКА */
.category-option {
  position: absolute;
  width: 100%;
  height: var(--item-height);
  left: 0; top: 0;
  display: flex;
  align-items: center;
  padding: 0 25px;
  box-sizing: border-box;
  backface-visibility: hidden;
  font-size: 15px;
  color: inherit;
}

.category-option .icon {
  margin-right: 12px;
  width: 24px;
  height: 24px;
}

/* 5. ТОЛЬКО ДВЕ ЛИНИИ В ЦЕНТРЕ (БЕЗ ПРЯМОУГОЛЬНИКА) */
.center-mark {
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%); 
  width: 90%;
  height: var(--item-height); 
  /* Прозрачный центр, только границы */
  border-top: 1px solid rgba(0, 56, 122, 0.4);
  border-bottom: 1px solid rgba(0, 56, 122, 0.4);
  background: transparent; /* Убрали закрашенный квадрат */
  pointer-events: none;
  z-index: 11;
}

/* 6. ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ */
.is-autoplaying {
  transition: transform 20s linear !important; 
}


.right-panel {
  gap: 10px; /* отступы между каруселями справа */
}










.info-slide {
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Подгонка для info-slide чтобы он красиво смотрелся */
.info-slide {
  padding: 8px;
  box-sizing: border-box;
  font-size: 14px;
}

.info-slide .material-icons {
  font-size: 24px;
}


.right-panel {
  padding: 0; 
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* теперь прижимает верхнюю и нижнюю карусели */
  gap: 10px; /* промежуток между ними */
  box-sizing: border-box;
  height: 290px; /* задай конкретную общую высоту блока, чтобы избежать проблем с высотой */
}






 
.info-slide {
  height: 100%; 
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.info-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  box-sizing: border-box;
}


.right-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10; /* обязательно убери gap между блоками */
  padding: 0; /* убери внутренние отступы, если они есть */
}


.carousel-block {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0;
  height: 140px;
  background: var(--tile);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.carousel-track {
  position: relative; /* Обязательно для абсолютных слайдов внутри */
  height: 100%;
  width: 100%;
  /* Убрали flex и overflow, так как это теперь не лента */
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  z-index: 1;
}

.carousel-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 2; /* Активный слайд всегда сверху */
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}




.info-carousel {
  flex-shrink: 0;
  margin-top: auto; /* вот эта магия прижмёт чётко вниз! */
}

.right-panel {
  background-color: transparent !important; /* убираем фон полностью */
}






.top-section-wrapper {
  max-width: 850px; /* можешь указать любое значение, подходящее под твой дизайн */
  margin: 0 auto; /* центрирует по горизонтали */

}




.map-container {
  max-width: 850px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: var(--radius-md); /* используем твои радиусы */
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.map-container iframe {
  width: 100%;
  height: 300px; /* регулируй по вкусу */
  border-radius: inherit;
}


.address-list {
  max-width: 850px;
  margin: 15px auto;
  padding: 10px 15px;
  background-color: var(--menu);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.address-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.address-item:last-child {
  margin-bottom: 0;
}

.address-icon {
  color: var(--accent);
  margin-right: 10px;
  font-size: 28px;
}

.address-text {
  color: var(--text);
  font-size: 14px;
}


.sell-container {
  max-width: 850px;
  margin: 20px auto;
  padding: 15px;
  background: var(--menu);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  color: var(--text);
}

.sell-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sell-step {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-icon {
  font-size: 36px;
  color: var(--accent);
}

.step-text {
  font-size: 15px;
}





.sell-buttons {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: nowrap;
}

.sell-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  box-sizing: border-box;
  font-size: calc(1.5vw + 6px); /* немного толще и крупнее шрифт */
  transition: transform 0.3s, box-shadow 0.3s;
}

.sell-btn .material-icons {
  font-size: calc(1.5vw + 4px); /* чуть больше иконки */
}

/* Цвета кнопок */
.whatsapp {
  background-color: #25D366; /* фирменный зелёный WhatsApp */
}

.telegram {
  background-color: #0088cc; /* фирменный голубой Telegram */
}

/* Hover эффект */
.sell-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.sell-page-wrapper {
  max-width: 850px;
  margin: 20px auto;
  padding: 10px;
  box-sizing: border-box;
}

.sell-image-full {
  max-height: 60vh;
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  object-fit: contain;
}

.city-modal-wrapper {
  position: relative;
  margin: 40px auto;
  width: calc(100% - 40px);
  max-width: 500px;
  background: var(--menu);
  border-radius: 30px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  max-height: calc(100% - 80px);
  box-sizing: border-box;
}

.city-modal-title {
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}

.city-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
}

.city-region {
  margin-bottom: 20px;
}

.city-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 12px;
  justify-content: flex-start;
}

.city-option {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  background-color: var(--tile);
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  white-space: nowrap;
}


.city-option:hover {
  background-color: var(--accent);
  color: #fff;
}

.city-option.active {
  background-color: var(--yellow-main);
  color: #2a2935;
  font-weight: bold;
}

.city-footer-msg {
  margin-top: 25px;
  font-size: 13px;
  color: #aaa;
  text-align: center;
  line-height: 1.4;
}

.city-footer-msg a {
  color: var(--accent);
  text-decoration: underline;
  transition: 0.2s;
}

.city-footer-msg a:hover {
  color: var(--text);
}

.side-menu {
  position: fixed;
  right: 0;
  bottom: 100px; /* отступ от нижней навпанели */
  background: #1e1e1e;
  color: white;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  padding: 1rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  width: auto;
  min-width: 240px;
  max-width: max-content;
  max-height: calc(100vh - 160px); /* учти высоту меню + запас */
}
.side-menu.open {
  transform: translateX(0);
}
.menu-content a {
  display: block;
  padding: 10px 0;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}
.menu-content a:last-child {
  border-bottom: none;
}


.terms-container {
  max-width: 800px;
  margin: 30px auto;
  background-color: var(--menu);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

.terms-container h1 {
  text-align: center;
  font-size: 24px;
  color: var(--yellow-main);
  margin-bottom: 20px;
}

.terms-container h2 {
  margin-top: 20px;
  font-size: 18px;
  color: var(--accent);
}

.terms-container p,
.terms-container li {
  margin-bottom: 12px;
}

.terms-container ul {
  padding-left: 20px;
}

/* Убираем синий подсвет при нажатии */
select:focus,
select:active,
button:focus,
button:active,
input:focus,
input:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

* {
  -webkit-tap-highlight-color: transparent !important;
}

select,
button {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.sort-container select::-webkit-focus-ring {
  display: none;
}



/* --- 1. КАРТОЧКА (PRODUCT) --- */
/* --- 1. БАЗОВЫЕ КЛАССЫ (Кнопки, Лайки, Точки) --- */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-width: 850px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 12px;
  grid-auto-rows: 1fr; 
  align-items: stretch;  
}

.product {  
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
}

.btn {
  text-decoration: none;
  background-color: var(--accent);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.product-buttons,
.btn-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: auto; 
}

.product .btn {
  width: 100%;
  padding: 6px 10px;
  font-size: 10px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 8px;
}

.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.product .title,
.product .desc,
.product .price,
.product .location {
  padding-left: 10px;
  padding-right: 10px;
}

.product .title {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 4px;
  margin-top: -5px; /* Подтянуто к фото */
}
/* Состояние описания в обычной ленте */
.product .desc {
  font-size: 13px;
  color: #cccccc;
  margin-bottom: 6px;
  padding: 0 10px;
  /* Строго в одну строку с точками */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.desc::-webkit-scrollbar {
  width: 6px;
}
.desc::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}
.desc::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.product .price {
  font-size: 15px;
  color: #ffd700;
  font-weight: bold;
  margin-bottom: 7px;
}

/* --- 2. КАРУСЕЛЬ (ТОЛЬКО ЛЕНТА) --- */
.xxv-carousel {
  position: relative;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0;
  padding: 0;
  background: var(--tile);
  border-radius: 0;
  scrollbar-width: none;
  /* Эффект прозрачного низа */
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.xxv-carousel::-webkit-scrollbar {
  display: none;
}

.xxv-carousel-item {
  flex: 0 0 100%;
  aspect-ratio: 3 / 4;
  scroll-snap-align: center;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.xxv-carousel-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* --- 3. КНОПКИ --- */
.btn:hover {
  background-color: var(--circle-bg);
}

.product .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-container .btn:first-child,
.product-buttons .btn:first-child {
  border-radius: 0px 8px 0px 0px;
}

.btn-container .btn:last-child,
.product-buttons .btn:last-child {
  border-radius: 8px 0px 0px 0px;
}

/* --- 4. ЛАЙКИ И ТОЧКИ --- */
.fav-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  z-index: 5;
  cursor: pointer;
}

.fav-btn img.like-icon {
  width: 100%;
  height: 100%;
  opacity: 0.53;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.fav-btn.active img.like-icon {
  opacity: 1;
}

.fav-btn:active img.like-icon {
  animation: fav-pop 0.3s ease;
}

@keyframes fav-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 6px 0;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(80, 80, 80, 0.4);
}

.carousel-dots .dot.active {
  background-color: rgba(80, 80, 80, 0.7);
}


/* Класс, который JS будет вешать на карточку при клике */
/* Затемнение фона */
.zoom-overlay-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    backdrop-filter: blur(8px);
    opacity: 0; /* <-- Используем opacity */
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.zoom-overlay-bg.active { 
    opacity: 1;
    pointer-events: auto;
}

/* КАРТОЧКА В ЗУМЕ: Базовые стили */
.product.active-zoom {
    position: fixed;
    top: 50%; 
    left: 50%;
    z-index: 99999;
    width: 85%;
    max-width: 340px;
    height: 90vh;
    background: #2a2935;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0,0,0,1);
    /* Здесь transform и opacity задаются через @keyframes */
}

/* Анимация ОТКРЫТИЯ: Снизу вверх */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translate(-50%, 100vh); /* Начинаем за экраном снизу */
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%); /* Приезжаем ровно в центр */
    }
}

.product.active-zoom {
    animation: slideInFromBottom 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}


/* Анимация ЗАКРЫТИЯ: Сверху вниз (обратное движение) */
@keyframes slideOutToBottom {
    from {
        opacity: 1;
        transform: translate(-50%, -50%); /* Из центра */
    }
    to {
        opacity: 0;
        transform: translate(-50%, 100vh); /* Уезжаем вниз за экран */
    }
}

/* Применяем анимацию закрытия через JS-класс closing-zoom */
.product.closing-zoom {
    animation: slideOutToBottom 0.3s ease-in forwards;
}



@keyframes slideOutFromCenter {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20%); /* Уходит чуть вниз и гаснет */
    }
}


/* ФОТО 1:1 */
.product.active-zoom .xxv-carousel {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    width: 100%;
    -webkit-mask-image: none;
    mask-image: none;
}

/* ЗАГОЛОВОК */
.product.active-zoom .title {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 15px 20px 5px 20px;
    margin: 0;
    font-size: 18px;
    color: #fff;
}

/* ОПИСАНИЕ (СКРОЛЛ) */
.product.active-zoom .desc {
    flex: 1 1 auto;
    overflow-y: auto;
    height: auto;
    display: block;
    -webkit-line-clamp: unset;
    padding: 10px 20px;
    margin: 0;
    white-space: pre-wrap;
    color: #ccc;
    line-height: 1.6;
    background: rgba(0,0,0,0.1);
}

/* ЦЕНА */
.product.active-zoom .price {
    flex: 0 0 auto;
    padding: 15px 20px;
    margin: 0;
    font-size: 19px;
    color: #ffd700;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* КНОПКИ */
.product.active-zoom .btn-container {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.product.active-zoom .btn { padding: 20px 10px; border-radius: 0; }
.product.active-zoom .btn-container .btn:first-child { border-radius: 0 0 0 20px; }
.product.active-zoom .btn-container .btn:last-child { border-radius: 0 0 20px 0; }

/* КРЕСТИК ЗАКРЫТИЯ */
.zoom-close-btn {
    position: absolute;
    top: 10px; right: 10px;
    width: 35px; height: 35px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 100000;
    border: none;
    transition: background 0.3s;
}
.zoom-close-btn:hover { background: rgba(255,255,255,0.2); }




#loader-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px) brightness(0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader {
  transform: rotateZ(45deg);
  perspective: 1000px;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  color: #fff;
  position: relative;
}

.loader:before,
.loader:after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: inherit;
  height: inherit;
  border-radius: 50%;
  transform: rotateX(70deg);
  animation: 1s spin linear infinite;
}

.loader:after {
  color: #FFD700;
  transform: rotateY(70deg);
  animation-delay: .4s;
}

@keyframes spin {
  0%, 100% {
    box-shadow: .2em 0px 0 0px currentcolor;
  }
  12% {
    box-shadow: .2em .2em 0 0 currentcolor;
  }
  25% {
    box-shadow: 0 .2em 0 0px currentcolor;
  }
  37% {
    box-shadow: -.2em .2em 0 0 currentcolor;
  }
  50% {
    box-shadow: -.2em 0 0 0 currentcolor;
  }
  62% {
    box-shadow: -.2em -.2em 0 0 currentcolor;
  }
  75% {
    box-shadow: 0px -.2em 0 0 currentcolor;
  }
  87% {
    box-shadow: .2em -.2em 0 0 currentcolor;
  }
}







/* РОДИТЕЛЬ */
.availability-toggle {
  display: block;   /* Меняем flex на block для простоты центровки */
  width: 100%;
  margin: 16px 0;
  padding: 0;
}

/* ВНУТРЕННИЙ БЛОК */
.availability-toggle-inner {
  display: flex;    /* Кнопки внутри всё еще во флексе */
  
  /* РАЗМЕРЫ КАК У ХЕДЕРА */
  width: calc(100% - 20px); 
  max-width: 850px;
  
  /* ЦЕНТРОВКА: это заставит его отлипнуть от левого края */
  margin: 0 auto; 
  
  background: var(--tile);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 4px #0003;
  box-sizing: border-box;
}



.availability-btn {
  flex: 1;
  border: none;
  padding: 10px 0;
  background: transparent;
  color: var(--text);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: center;
}

.availability-btn:not(:last-child) {
  border-right: 1px solid var(--circle-bg);
}

.availability-btn.active {
  background: rgba(50, 50, 50, 0.4); /* полупрозрачный тёмный */
  backdrop-filter: blur(10px);        /* блюр! */
  -webkit-backdrop-filter: blur(6px); /* для Safari */
  color: #fff;
}



.skeleton-card {
  background-color: var(--tile);
  border-radius: var(--radius-md);
  padding: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  min-height: 240px;
  animation: pulse 1.2s infinite ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-thumb, .skeleton-line {
  background-color: #4d4a5b;
  border-radius: 6px;
}

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 3/4;
}

.skeleton-line {
  height: 12px;
  width: 80%;
}

.skeleton-line.short {
  width: 50%;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.info-icon:active {
  transform: scale(1.15);
  box-shadow: 0 0 10px #fbd3ff88;
}


.sort-info-row {
  display: flex; /* Чтобы контент внутри (текст/сортировка) был в ряд */
  justify-content: space-between;
  align-items: center;

  /* РАЗМЕРЫ КАК У ВСЕХ */
  width: calc(100% - 20px); 
  max-width: 850px;
  
  /* ЖЕЛЕЗОБЕТОННАЯ ЦЕНТРОВКА */
  margin: 20px auto 10px; 
  
  /* Если он всё еще липнет влево, добавь это: */
  float: none; 
  position: relative; 
  
  box-sizing: border-box;
}
.info-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.info-icon {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 3px;
  box-sizing: border-box;

  background-color: #2a2935;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.info-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 2px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #0090FF, #00E5FF);
  z-index: -1;
  pointer-events: none; /* ← Вот оно! */
  mask: 
    radial-gradient(farthest-side, transparent 70%, black 71%);
  -webkit-mask: 
    radial-gradient(farthest-side, transparent 70%, black 71%);
}

.info-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}




.sort-container select {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  appearance: none;
  background-color: var(--menu);
  background-image: url("../../images/siteicon/sort.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  border: 1px solid var(--tile);
  box-shadow: 0 0 6px #0005;
  cursor: pointer;
  color: transparent;         /* скрыть текст */
  text-indent: -9999px;       /* прячем опции визуально */
  overflow: hidden;
  padding: 0;
}



.xxv-carousel-item img {
  /* Задаем фон-заглушку */
  background-color: #eee;
  background-image: linear-gradient(
    90deg, 
    #eeeeee 0px, 
    #f5f5f5 40px, 
    #eeeeee 80px
  );
  background-size: 200% 100%;
  animation: shine-loading 1.5s infinite linear;
  
  /* Картинка плавно проявится поверх фона */
  transition: opacity 0.3s ease;
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes shine-loading {
  0% { background-position: -100px; }
  100% { background-position: 100px; }
}