/* =========================================
   1. ШРИФТЫ
   ========================================= */
@font-face {
  font-family: "MarckScript-Regular";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: local("MarckScript-Regular"),
    url("./font/MarckScript-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Parisienne-Regular";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: local("Parisienne-Regular"),
    url("./font/Parisienne-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Caveat-VariableFont";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: local("Caveat-VariableFont"),
    url("./font/Caveat-VariableFont_wght.woff2") format("woff2");
}
@font-face {
  font-family: "GreatVibes-Regular";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: local("GreatVibes-Regular"),
    url("./font/GreatVibes-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat-VariableFont_wght";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: local("Montserrat-VariableFont_wght"),
    url("./font/Montserrat-VariableFont_wght.woff2") format("woff2");
}

/* =========================================
   2. БАЗОВЫЕ НАСТРОЙКИ
   ========================================= */
:root {
  --header-height: 80px;
  --footer-height: 80px;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  background-color: #d4f7fe;
  font-family: Roboto, Geneva, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  display: block;
}

img:not(#Chil):not(.slides img):not(.logo):not(.footer-logo) {
  max-width: 70%;
  height: auto;
  border-radius: 8px;
}

main {
  width: 100%;
  margin: 0;
  padding-top: var(--header-height);
}

/* =========================================
   3. ШАПКА И НАВИГАЦИЯ (ПК)
   ========================================= */
header.top {
  height: var(--header-height);
  background: linear-gradient(180deg, #e8faff 0%, #d4f7fe 100%);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(168, 143, 84, 0.25);
  z-index: 999;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 350px;
  padding: 0 2rem;
  max-width: 1200px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  position: relative;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: #00bcd4;
  font-weight: 600;
  font-size: 18px; 
  letter-spacing: 0.5px; 
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #31708e;
}

.nav-menu.left,
.nav-menu.right {
  margin: 0 !important;
}

nav > a {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.logo {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  margin: 0 !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease;
}

nav > a:hover .logo {
  transform: scale(1.1);
  opacity: 0.9;
}

@media (min-width: 769px) {
  .menu-toggle,
  .mobile-panel,
  .mobile-overlay {
    display: none !important;
  }
}

/* =========================================
   4. ГЛАВНЫЙ ЭКРАН (ПК)
   ========================================= */
.main-horizontal {
  display: flex;
  flex-direction: row;
  height: calc(100vh - var(--header-height));
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.chil-col {
  flex: 0 0 30%;
  max-width: 30%;
  height: 100%;
  display: flex;
  align-items: stretch;
}

#Chil {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
}

.content-col {
  flex: 1 1 70%;
  max-width: 70%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2vh 4vw;
  text-align: center;
}

.content-col h1 {
  display: flex;
  flex-direction: column; /* Выстраиваем 3 строки друг под другом */
  align-items: center; /* Центрируем их */
  justify-content: center;
  margin: 0;
  font-family: "MarckScript-Regular", cursive;
  font-size: clamp(1.2rem, 4vh, 3.2rem);
  text-align: center;
  line-height: 1.1;
  flex-shrink: 0;
  color: #31708e;
}

#слоган {
  font-family: "Parisienne-Regular", cursive;
  font-size: clamp(2.2rem, 7vh, 5rem);
  display: block; /* Теперь оно официально занимает отдельную строку */
  margin: 1.5vh 0; /* Даем "воздуха" сверху и снизу */
  line-height: 1; /* Чтобы золотое свечение не наезжало на другие строки */
  color: #a88f54;
  text-shadow: 0 2px 4px rgba(168, 143, 84, 0.3);
}

.below-h1-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2vh;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 2vh 0;
}

.text-block {
  max-width: 700px;
  width: 100%;
  flex-shrink: 0;
}

.content-col p,
.about-text,
.about-text p {
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.2rem);
  line-height: 1.5;
  font-weight: 550;
  color: #31708e;
}

.content-col p {
  margin: 1vh 0;
}

.about-text {
  text-align: left;
}

.about-text p {
  margin: 0 0 20px 0;
}

.about-text a {
  color: #00bcd4;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.about-text a:hover {
  color: #31708e;
  text-decoration: underline;
}

.hero-cta {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 24px;
  background-color: #00bcd4;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3); /* Добавили базовую тень */
  transition: all 0.3s ease; /* Сделали плавную скорость, как у всех */
}

.hero-cta-btn:hover {
  background-color: #31708e;
  transform: translateY(-3px); /* Поднимаем на 3px, а не на 1px */
  box-shadow: 0 8px 20px rgba(49, 112, 142, 0.4); /* Красивая тень при наведении */
}

.slider {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.slides {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2vw;
  height: 100%;
  max-height: 400px;
}

/* === МАГИЯ КРОССФЕЙДА: Обертка для картинок === */
.slide-wrapper {
  position: relative;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); /* Тень теперь на обертке */
  overflow: hidden; /* Картинка не вылезет за рамки */
  background: #fdfbf7;
}

.slide-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.old-slide {
  z-index: 1;
  /* МАГИЯ: Убрали прозрачность! Старое фото просто ждет внизу как плотная подложка */
}

.new-slide {
  z-index: 2; /* Новое фото ложится поверх старого */
  /* Увеличили время до 1.2s для максимальной плавности */
  animation: crossfadeZoom 1.2s ease-in-out forwards;
}

@keyframes crossfadeZoom {
  0% {
    transform: scale(1.05); /* Чуть-чуть приближено */
    opacity: 0; /* Начинает проявляться из прозрачности */
  }
  100% {
    transform: scale(1);
    opacity: 1; /* Становится полностью плотным, перекрывая старое фото */
  }
}

@media (max-height: 720px) and (min-width: 769px) {
  .title-line-1 {
    display: block;
    margin-bottom: 0.5vh;
  }
  #слоган {
    margin: 1vh 0; /* Убрали боковой сдвиг, оставили только отступы вверх/вниз */
    font-size: clamp(2rem, 6vh, 3.5rem);
  }
  .content-col h1 {
    margin-bottom: 1vh;
  }
  .text-block p br {
    display: none;
  }
  .content-col p {
    margin: 0.5vh 0;
  }
  .below-h1-row {
    gap: 1.5vh;
    margin: 1vh 0;
  }
}

/* =========================================
   5. РАЗДЕЛ "ОБО МНЕ" (ПК)
   ========================================= */
.about-me {
  background: #f5f1e6;
  padding: 5vh 5vw;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.about-title {
  font-family: "GreatVibes-Regular", cursive;
  /* МАГИЯ: Уравняли размер со всеми остальными главными заголовками сайта */
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0 0 3vh;
  color: #31708e;
  text-align: center; /* Добавил центрирование для идеальной симметрии */
}

.about-inner {
  display: block;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.about-inner::after {
  content: "";
  display: table;
  clear: both;
}

.about-photo {
  float: right;
  width: 350px;
  max-width: 40vw;
  margin: 0 0 2vh 4vw;
}

.about-photo img {
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* =========================================
   6. МОБИЛЬНАЯ ВЕРСИЯ (ДО 768px)
   ========================================= */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  nav {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    padding: 0 5vw;
    height: 100%;
  }
  .logo {
    height: 40px;
    margin: 0 !important;
  }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
  }
  .menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #00bcd4;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
  .mobile-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 250px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 190px;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    z-index: 1000;
  }
  .mobile-panel.active {
    right: 0;
  }
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
  }
  .mobile-overlay.active {
    visibility: visible;
  }
  .mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 60px;
    text-align: center;
    width: 100%;
  }
  .mobile-menu a {
    font-size: 1.6rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    display: inline-block;
    background: transparent;
    transition: color 0.25s ease,
      transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
      text-shadow 0.25s ease;
  }
  .mobile-menu a:hover {
    color: #00bcd4 !important;
    transform: scale(1.15) !important;
    text-shadow: 0 8px 15px rgba(0, 0, 0, 0.4) !important;
  }
  .mobile-menu a:active {
    transform: scale(0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    color: #258c9c;
  }

  .main-horizontal {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 60%);
    grid-template-rows: minmax(45vh, auto) auto auto;
    height: auto;
  }
  .content-col {
    display: contents;
  }
  .chil-col {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    display: flex;
    align-items: stretch;
    min-width: 0;
    position: relative;
    z-index: 10;
    pointer-events: none;
  }
  #Chil {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left bottom;
  }
  .content-col h1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin: 0;
    padding: 10px 5px 10px 0;
    text-align: left;
    min-width: 0;
    position: relative;
    z-index: 1;
    font-size: clamp(1.3rem, 4.5vw, 1.8rem);
    line-height: 1.4;
  }
  #слоган {
    font-size: clamp(2.4rem, 8vw, 3.5rem);
    line-height: 1.2;
    margin: 50px 0;
    word-break: break-all;
    overflow-wrap: break-word;
  }
  .below-h1-row {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    padding: 20px 5vw;
  }
  .hero-cta {
    grid-column: 1 / 3;
    grid-row: 3 / 4;
    padding-bottom: 40px;
    margin-top: 0;
  }
  .slides .slide-wrapper {
    width: 85vw;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 400px;
  }

  .about-me {
    padding: 40px 5vw;
  }
  .about-inner {
    display: block;
  }
  .about-photo {
    float: right;
    width: 45%;
    margin: 5px 0 15px 15px;
  }
  .about-photo img {
    max-height: 350px;
  }
  .about-text {
    display: block;
    text-align: left;
  }
}

/* =========================================
   КОНТАКТЫ
   ========================================= */
.kontakt {
  padding: 3vh 5vw; /* Гибкие отступы сверху и снизу (в % от высоты экрана) */
  background: #f5f1e6;
  /* МАГИЯ 1: Вычитаем и шапку, и футер, чтобы страница была ровно с экран */
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* МАГИЯ 2: Всегда центрируем по вертикали */
}

.kontakt h1 {
  font-family: "GreatVibes-Regular", cursive;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  margin: 0 0 3vh; /* Гибкий отступ */
  color: #31708e;
}

.kontakt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; /* Сделали 20px вместо 30px */
  max-width: 1300px; /* Увеличили ширину с 1200px до 1300px */
  width: 100%;
  margin: 0 auto 3vh;
}

.kontakt-card {
  background: #fff;
  padding: 3vh 24px; /* Гибкие внутренние отступы */
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  color: #31708e;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  line-height: 1.6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kontakt-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.kontakt-card h3 {
  margin: 0 0 20px;
  font-size: 1.3rem;
  color: #00bcd4;
  text-align: center;
  border-bottom: 2px dashed #e8faff;
  padding-bottom: 10px;
}

.kontakt-card p {
  margin: 0 0 12px; /* Чуть уменьшили нижний отступ (было 15px) */
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left; /* Жестко фиксируем по левому краю для красоты чтения */
  -webkit-hyphens: auto; /* Добавляем автоматические переносы слов */
  hyphens: auto;
}

.kontakt-card p:last-child {
  margin-bottom: 0;
}

.kontakt-phone {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #a88f54; /* Золотистый акцент */
  text-decoration: none;
  margin-top: 5px;
  transition: color 0.3s;
}

.kontakt-phone:hover {
  color: #927a44;
}

.kontakt-socials {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Уменьшили пустоту */
  margin-top: 15px; /* Чуть подтянули вверх */
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 290px;
  margin: 0 auto; /* Убрали лишний внешний отступ */
  padding: 10px 10px 10px 20px; /* Чуть сплюснули по вертикали */
  min-height: 46px; /* Защита размера для клика */
  box-sizing: border-box;
  border-radius: 15px;
  text-decoration: none;
  font-weight: 600;
  color: #31708e;
  background: #e8faff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* ОСТАЛОСЬ БЕЗ ИЗМЕНЕНИЙ */
.social-btn img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.phone-btn {
  margin-bottom: 0px; 
}

/* ОСТАЛОСЬ БЕЗ ИЗМЕНЕНИЙ */
.phone-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: #00bcd4; 
  transition: fill 0.3s ease; 
}

/* Изменение цвета иконки при наведении на кнопку */
.social-btn:hover .phone-icon {
  
  fill: #fff; 
}

.social-btn:hover {
  background: #00bcd4;
  color: #fff;
  transform: translateY(-3px); /* Поднимаем вверх, а не сдвигаем вбок */
  box-shadow: 0 8px 20px rgba(0, 188, 212, 0.4); /* Добавляем фирменную тень */
}

.kontakt-small-text {
  font-size: 0.85rem !important;
  opacity: 0.7;
  margin-top: 20px !important;
  text-align: center;
}

.kontakt-footer-note {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  color: #31708e;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.6;
}

.kontakt-wish {
  margin-top: 2vh; /* Было 30px */
}

.kontakt-wish span {
  display: block;
  margin-top: 10px;
  font-family: "Caveat-VariableFont", cursive; /* Рукописный шрифт */
  font-size: 2.5rem;
  color: #a88f54;
  transform: rotate(-2deg); /* Легкий наклон для реалистичности подписи */
}

/* === Магия для невысоких экранов (ноутбуков) === */
@media (max-height: 800px) and (min-width: 1025px) {
  .kontakt {
    padding: 2vh 5vw;
  }
  .kontakt h1 {
    margin-bottom: 2vh;
  }
  .kontakt-grid {
    margin-bottom: 2vh;
    gap: 20px; /* Чуть уменьшаем расстояние между карточками */
  }
  .kontakt-card {
    padding: 2vh 20px;
  }
  .kontakt-wish {
    margin-top: 1vh;
  }
}

/* Адаптивность для контактов */
@media (max-width: 1024px) {
  .kontakt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Делаем третью карточку красивой по центру на планшетах */
  .kontakt-card:last-child {
    grid-column: 1 / -1; /* Заставляем её занять весь нижний ряд */
    justify-self: center; /* Центрируем саму карточку */
    width: 100%;
    max-width: 450px; /* Ограничиваем ширину, чтобы она не была огромной */
  }
}

@media (max-width: 768px) {
  .kontakt-grid {
    grid-template-columns: 1fr;
  }
  /* Возвращаем стандартный вид для мобильных телефонов */
  .kontakt-card:last-child {
    max-width: 100%; 
  }
}
/* =========================================
   ПОРТФОЛИО
   ========================================= */
.Portfolio {
  padding: 15px 5vw 80px;
  background: #f0fff0;
}

.Portfolio h1 {
  font-family: "GreatVibes-Regular", cursive;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  color: #31708e;
}

.portfolio-subtitle {
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.2rem);
  line-height: 1.5;
  font-weight: 550;
  color: #31708e;
  text-align: center;
  margin: 0 auto 20px;
  max-width: 800px;
  padding: 0 5vw;
}

.portfolio-subtitle a {
  color: #00bcd4;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.portfolio-subtitle a:hover {
  color: #31708e;
  text-decoration: underline;
}

.portfolio-slider {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-slider-wrapper {
  position: relative;
  width: 100%;
}

.portfolio-track {
  display: flex;
  gap: 2vw;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.portfolio-track::-webkit-scrollbar {
  display: none;
}

.portfolio-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  flex: 0 0 calc((100% - 4vw) / 3);
  scroll-snap-align: start;
  /* МАГИЯ: Синхронизируем скорость и базовую тень с каталогом */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  /* МАГИЯ: Делаем тень при наведении точно такой же сочной, как в каталоге */
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.portfolio-card:hover img {
  transform: scale(1.05);
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  max-width: 100% !important;
  object-fit: cover;
  display: block;
  /* МАГИЯ: Ускоряем зум картинки до стандарта каталога (было 0.8s) */
  transition: transform 0.5s ease;
}

.portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 20px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.portfolio-info h3 {
  margin: 0 0 5px 0;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.portfolio-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.5rem;
  color: #31708e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.portfolio-arrow:hover {
  background: #fff;
}
.portfolio-arrow.left {
  left: -20px;
}
.portfolio-arrow.right {
  right: -20px;
}

.portfolio-dots {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.portfolio-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s ease;
}
.portfolio-dot.active {
  background: #00bcd4;
}

.portfolio-date {
  margin: 0;
  font-size: 0.85rem;
  color: #dddddd;
}

.portfolio-see-all-btn {
  padding: 10px 24px;
  display: flex !important;
  width: fit-content;
  align-items: center;
  justify-content: center;
  background-color: #00bcd4;
  color: #fff;
  border-radius: 24px;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
  transition: all 0.3s ease;
  margin: 50px auto 0;
}

.portfolio-see-all-btn:hover {
  background-color: #31708e;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(49, 112, 142, 0.4);
}

.portfolio-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 40px 5vw;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-list .portfolio-card {
  flex: none;
  width: 100%;
}

@media (max-width: 1024px) {
  .portfolio-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-track {
    overflow-x: auto;
  }
  .portfolio-card {
    flex: 0 0 calc((100% - 2vw) / 2);
  }
  .portfolio-arrow.left {
    left: 15px;
  }
  .portfolio-arrow.right {
    right: 15px;
  }
}

@media (max-width: 600px) {
  .portfolio-list {
    grid-template-columns: 1fr;
  }
  .portfolio-card {
    flex: 0 0 100%;
  }
  .portfolio-dots {
    display: flex;
  }
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px auto 20px;
  flex-wrap: wrap;
  width: 100%;
}

.page-btn {
  background: #fff;
  border: 1px solid #00bcd4;
  color: #31708e;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-btn:hover:not(:disabled) {
  background: #e8faff;
  transform: translateY(-2px);
}

.page-btn.active {
  background: #00bcd4;
  color: #fff;
  border-color: #00bcd4;
  cursor: default;
  box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
}

.page-btn:disabled {
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination-dots {
  color: #31708e;
  font-weight: 600;
  letter-spacing: 2px;
  margin: 0 4px;
}

/* =========================================
   ОТЗЫВЫ
   ========================================= */
.Otziv {
  padding: 20px 5vw 80px;
  background: #d4f7fe;
  text-align: center;
}

.Otziv h1 {
  font-family: "GreatVibes-Regular", cursive;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  color: #31708e;
}

.otziv-average {
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #31708e;
  margin-bottom: 30px;
}

.otziv-subtitle {
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.2rem);
  line-height: 1.5;
  font-weight: 550;
  color: #31708e;
  margin: 30px auto;
  max-width: 800px;
}

.otziv-slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.otziv-track {
  display: flex;
  gap: 2vw;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 20px;
}
.otziv-track::-webkit-scrollbar {
  display: none;
}

.otziv-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 0 0 calc((100% - 4vw) / 3);
  scroll-snap-align: start;
  min-height: 250px;
}

.otziv-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.otziv-card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #31708e;
}

.otziv-date {
  font-size: 0.85rem;
  color: #777;
  margin: 4px 0 12px;
}

.otziv-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.5rem;
  color: #31708e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.otziv-arrow:hover {
  background: #fff;
}
.otziv-arrow.left {
  left: -20px;
}
.otziv-arrow.right {
  right: -20px;
}

.otziv-dots {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.otziv-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s ease;
}
.otziv-dot.active {
  background: #00bcd4;
}

.otziv-see-all-btn {
  padding: 10px 24px;
  display: flex !important;
  width: fit-content;
  align-items: center;
  justify-content: center;
  background-color: #00bcd4;
  color: #fff;
  border-radius: 24px;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
  transition: all 0.3s ease;
  margin: 40px auto;
}

.otziv-see-all-btn:hover {
  background-color: #31708e;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(49, 112, 142, 0.4);
}

.otziv-add-btn {
  padding: 12px 32px;
  background-color: #a88f54;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 143, 84, 0.4);
  transition: all 0.3s ease;
  margin: 0 auto;
}

.otziv-add-btn:hover {
  background-color: #927a44;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(168, 143, 84, 0.6);
}

.otziv-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 40px 5vw;
  max-width: 1200px;
  margin: 0 auto;
}

.otziv-list .otziv-card {
  flex: none;
  width: 100%;
}

/* === Стили блока рейтинга и фильтров (для отдельной страницы) === */
.otziv-summary {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0 auto 30px;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #31708e;
}

.otziv-filter-toggle {
  background: #fff;
  border: 1px solid #00bcd4;
  color: #31708e;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
}

.otziv-filter-toggle:hover {
  background: #e8faff;
}

/* === ПАНЕЛЬ ФИЛЬТРОВ И АНИМАЦИЯ === */
.otziv-filter-panel {
  display: none; /* Скрыта по умолчанию */
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  background: #ffffff;
  padding: 15px 25px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); /* Мягкая тень */
  margin: 0 auto 40px;
  max-width: 600px;
  color: #31708e;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-weight: 550;
}

/* Класс, который добавляет скрипт при нажатии кнопки "Фильтр" */
.otziv-filter-panel.show {
  display: flex;
  animation: slideDownFade 0.3s ease forwards;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.otziv-filter-sort {
  background: #e8faff;
  border: 1px solid #00bcd4;
  color: #31708e;
  padding: 6px 16px;
  border-radius: 15px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.otziv-filter-sort:hover,
.otziv-filter-sort.active {
  background: #00bcd4;
  color: #fff;
}

.otziv-filter-sep {
  color: #ccc;
  user-select: none;
}

/* === КОМПАКТНЫЕ МИНИАТЮРЫ СБОКУ В КАРТОЧКЕ === */
.otziv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 12px;
}

.otziv-card-meta {
  flex: 1;
}

.otziv-card-meta h2 {
  margin: 0 0 5px !important;
}

.otziv-card-meta .otziv-date {
  margin: 0 0 5px !important;
}

.otziv-card-meta .otziv-rating {
  margin: 0 !important;
}

.otziv-card-thumb {
  flex: 0 0 70px; /* Фиксируем размер миниатюры */
  height: 70px;
}

.otziv-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin: 0 !important;
}

.otziv-card-text {
  margin: 0;
  line-height: 1.4;
  color: #31708e;
}

@media (max-width: 1024px) {
  .otziv-track {
    overflow-x: auto;
  }
  .otziv-card {
    flex: 0 0 calc((100% - 2vw) / 2);
  }
  .otziv-arrow.left {
    left: 10px;
  }
  .otziv-arrow.right {
    right: 10px;
  }
  .otziv-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .otziv-card {
    flex: 0 0 100%;
  }
  .otziv-dots {
    display: flex;
  }
  .otziv-list {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   КАТАЛОГ
   ========================================= */
.catalog {
  padding: 40px 5vw 90px;
  background: #f7f3ea;
  min-height: calc(
    100vh - var(--header-height)
  ); /* Чтобы фон всегда доходил до футера */
}

/* Стили для заголовка каталога */
.catalog h1 {
  font-family: "GreatVibes-Regular", cursive;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  color: #31708e;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px; /* Чуть увеличили отступы для «воздуха» */
  max-width: 1200px; /* МАГИЯ 2: Сетка больше не растянется на 2 метра в ширину */
  margin: 0 auto; /* Центрируем сетку на больших экранах */
}

.catalog-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  /* Удалили жесткую высоту height: 280px; */
  aspect-ratio: 4 / 5; /* МАГИЯ 3: Карточки теперь всегда идеальной вертикальной формы */
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.catalog-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important; /* Жестко перебиваем глобальное height: auto */
  max-width: 100% !important; /* Отменяем ограничение в 70% */
  object-fit: cover;
  object-position: center top; /* МАГИЯ: привязываем фокус к верхнему краю. А нодо ли? */
  transition: transform 0.5s ease;
}

.catalog-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 50%
      /* Градиент теперь плавно идет снизу вверх, не затемняя всю картинку */
  );
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 1;
}

.catalog-overlay h2 {
  color: white;
  font-family: "Montserrat-VariableFont_wght", sans-serif; /* Добавили наш красивый шрифт */
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Легкая тень для читаемости */
}

.catalog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
.catalog-card:hover .catalog-cover {
  transform: scale(1.05);
}

.catalog-items-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
/* === КАРТОЧКИ ТОВАРОВ В ОКНЕ КАТАЛОГА === */
.catalog-item {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Легкая базовая тень */
}

/* МАГИЯ 1: Оживление при наведении */
.catalog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.catalog-item img {
  width: 100%;
  max-width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 12px;
}

.catalog-item-title {
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #31708e;
  margin-bottom: 6px;
  line-height: 1.3;
}

.catalog-item .portfolio-date {
  font-size: 0.8rem;
  color: #31708e; /* Заменили серый на фирменный синий */
  margin: 0 0 12px 0;
  font-weight: 500;
}

/* Блок статистики (Просмотры и лайки) */
.catalog-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-top: auto; /* Всегда прижимаем статистику к низу карточки */
  border-top: 1px solid #c2eaf2; /* Современная сплошная линия вместо точек */
  padding-top: 10px;
  color: #31708e;
}

.catalog-views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Современные SVG-иконки */
.catalog-views svg,
.catalog-like-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.catalog-like-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: #31708e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease, transform 0.2s ease;
}

/* Эффект при наведении на лайк */
.catalog-like-btn:hover {
  color: #ff4757; /* Сочный красный */
  transform: scale(1.15);
}

/* Если уже лайкнули */
.catalog-like-btn.liked {
  color: #ff4757;
  cursor: default;
  transform: scale(1);
}

@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog-items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .catalog-grid,
  .catalog-items-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   ФУТЕР
   ========================================= */
.footer {
  background: #31708e;
  height: var(--footer-height);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
}

.footer-text {
  grid-column: 1;
  text-align: left;
  color: #00bcd4; /* Сделали светлым для идеального контраста */
  line-height: 1.4;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 0.9rem;
}

.footer-logo {
  grid-column: 2;
  justify-self: center;
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

/* Выравнивание внутри футера */
.footer-left {
  grid-column: 1;
  text-align: left;
}

.footer-right {
  grid-column: 3;
  text-align: right;
}

/* Красивая ссылка на политику */
.policy-link {
  color: #00bcd4;
  text-decoration: underline;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.policy-link:hover {
  color: #fff;
}

/* Мелкий текст про куки */
.cookie-note {
  font-size: 0.75rem;
  opacity: 0.8;
  line-height: 1.3;
  display: inline-block;
  margin-top: 4px;
}

/* === АДАПТИВНОСТЬ ФУТЕРА ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 600px) {
  .footer {
    height: auto;
    min-height: var(--footer-height);
    padding: 25px 15px; /* Даем больше воздуха сверху и снизу */
    grid-template-columns: 1fr; /* МАГИЯ 1: Перестраиваем 3 колонки в 1 */
    gap: 15px; /* Расстояние между блоками */
  }
  
  .footer-logo {
    grid-column: 1;
    order: -1; /* МАГИЯ 2: Поднимаем логотип в самый-самый верх */
    max-height: 45px;
    margin: 0 auto; /* Ровно по центру */
  }
  
  .footer-text,
  .footer-policy {
    grid-column: 1;
    text-align: center; /* Выравниваем весь текст строго по центру */
  }
  
  /* МАГИЯ 3: Жестко задаем единый опрятный размер для АБСОЛЮТНО ВСЕГО текста */
  .footer-text,
  .footer-policy a,
  .footer-policy span {
    font-size: 0.75rem !important; 
    line-height: 1.4 !important;
    white-space: normal;
  }
  
  .footer-policy span {
    margin-top: 6px;
    display: block; /* Чтобы текст про cookie красиво ушел на новую строку под ссылкой */
  }
}

/* =========================================
   МОДАЛЬНЫЕ ОКНА
   ========================================= */
.modal,
.catalog-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content,
.catalog-modal-content {
  background: #fff;
  max-width: 800px;
  width: 90vw;
  max-height: 90vh;
  padding: 24px;
  border-radius: 18px;
  overflow-y: auto;
  position: relative;
}
.catalog-modal-content {
  max-width: 1000px;
  background: #e8faff; /* Нежно-бирюзовый фон для гармонии */
}
/* === ПЛАВАЮЩИЙ КРЕСТИК ЗАКРЫТИЯ === */
.modal-close,
.catalog-modal-close {
  position: sticky; /* МАГИЯ: заставляет элемент "прилипать" при скролле */
  top: 0; /* Расстояние от верха, на котором он остановится */
  float: right; /* Прижимаем вправо */
  font-size: 28px;
  cursor: pointer;
  z-index: 100;
  margin-bottom: -35px; /* Убираем пустую зону, чтобы не сдвигать заголовок вниз */
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff; /* Делаем белый кругляшок */
  border-radius: 50%; /* Идеальный круг */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Мягкая тень, чтобы выделялся на фоне товаров */
  color: #31708e; /* Наш фирменный цвет */
  transition: all 0.3s ease;
}

.modal-close:hover,
.catalog-modal-close:hover {
  background: #ff4757; /* При наведении вспыхивает красным */
  color: #ffffff;
  transform: scale(1.1);
}

/* МАГИЯ: применяем только к окнам, у которых НЕТ класса .prod-modal-content (то есть только к отзывам) */
.modal-content:not(.prod-modal-content) img {
  max-width: 100% !important;
  width: auto; 
  max-height: 70vh; /* Ограничиваем высоту, чтобы вертикальные фото не улетали за край экрана */
  border-radius: 12px;
  margin: 0 auto 20px auto; /* Центрируем фото */
  display: block;
}

.modal-content h2 {
  text-align: center;
  color: #31708e;
  margin-top: 10px;
  margin-bottom: 20px;
}

.modal-content p {
  text-align: center;
  color: #31708e;
}

/* === Кнопка "Показать еще" в каталоге === */
.catalog-load-more {
  display: none; /* Скрыта по умолчанию, покажет скрипт */
  margin: 30px auto 10px;
  padding: 10px 30px;
  background-color: #00bcd4;
  color: #fff;
  border: none;
  border-radius: 24px;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.catalog-load-more:hover {
  background-color: #31708e;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(49, 112, 142, 0.4);
}

/* === Заголовок внутри окна каталога === */
#catalogModalTitle {
  font-family: "GreatVibes-Regular", cursive;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: #31708e;
  text-align: center;
  margin-top: 5px;
  margin-bottom: 25px;
}

/* === ОКНО ТОВАРА (ГАЛЕРЕЯ + ОПИСАНИЕ) === */
.prod-modal-content {
  max-width: 1000px !important;
  padding: 30px 40px !important;
  background: #ffffff !important;
}

.prod-title {
  font-family: "GreatVibes-Regular", cursive;
  font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
  color: #31708e !important;
  text-align: center;
  margin-top: 0 !important;
  margin-bottom: 30px !important;
  line-height: 1.1;
}

/* Сетка: слева фото, справа текст */
.prod-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.prod-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

/* --- Возвращаем идеальный прямоугольник 4:5 --- */
.prod-main-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #fdfbf7;
  border-radius: 16px;
  overflow: hidden; /* Жестко отсекаем то, что не влезло в 4:5 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* Оставляем привязку для нашей лупы */
}

/* --- Заставляем фото заполнить блок без белых полос --- */
.prod-main-media img,
.prod-main-media video {
  width: 100% !important;
  max-width: 100% !important; /* ВОТ ОНА, ГЛАВНАЯ ПОТЕРЯШКА! Отменяем 70% */
  height: 100% !important;
  max-height: 100% !important; /* На всякий случай защищаем и высоту */
  object-fit: cover !important; 
  margin: 0 !important;
  border-radius: 0 !important; 
}

.prod-main-media video {
  object-fit: contain !important;
}

.prod-thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px; /* Чуть увеличили отступ под ползунок */
  scrollbar-width: thin; /* Тонкий скролл для Firefox */
  scrollbar-color: #00bcd4 #fdfbf7; /* Цвета скролла для Firefox */
}

/* Наводим красоту ползунку для Chrome, Safari, Edge */
.prod-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.prod-thumbnails::-webkit-scrollbar-track {
  background: #fdfbf7;
  border-radius: 10px;
}

.prod-thumbnails::-webkit-scrollbar-thumb {
  background-color: #00bcd4;
  border-radius: 10px;
}

/* Стили миниатюр */
.prod-thumb {
  width: 70px !important;
  height: 70px !important;
  object-fit: cover !important;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  margin: 0 !important;
  flex-shrink: 0;
}

.prod-thumb.active,
.prod-thumb:hover {
  opacity: 1;
  border-color: #00bcd4;
  transform: scale(1.05);
}

.video-thumb {
  background: #31708e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.prod-info {
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #31708e;
  text-align: left !important;
}

/* Адаптивность для мобильных телефонов */
@media (max-width: 768px) {
  .prod-layout {
    grid-template-columns: 1fr; /* Перестраиваем в одну колонку */
    gap: 25px;
  }
  .prod-modal-content {
    padding: 24px 20px !important;
  }
}

#reviewForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
#reviewForm label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.95rem;
}
#reviewForm input[type="text"],
#reviewForm textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font: inherit;
  box-sizing: border-box;
}
#reviewForm input[type="file"] {
  font-size: 0.9rem;
}
#reviewForm button[type="submit"] {
  align-self: flex-start;
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  background: #a88f54;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease;
}
#reviewForm button[type="submit"]:hover {
  background: #baa061;
}
/* === ЗВЕЗДЫ В ФОРМЕ ОТЗЫВА === */
.rating-stars {
  display: inline-flex;
  gap: 4px;
  cursor: pointer;
}
.rating-stars .star {
  font-size: 32px !important; /* Сделали крупнее для удобства пальцев на мобилке */
  color: #ccc !important; /* Серый цвет по умолчанию */
  transition: all 0.2s ease;
  user-select: none; /* Чтобы звезды случайно не выделялись как текст */
}
.rating-stars .star.active {
  color: #f5a623 !important; /* Наш красивый желто-оранжевый */
  transform: scale(1.1); /* Легкое увеличение при клике */
}
/* === ЕДИНЫЙ ЗОЛОТОЙ ЦВЕТ ДЛЯ ВСЕХ ЗВЕЗД === */
.otziv-rating,
.otziv-summary-stars,
.otziv-filter-stars span.active {
  color: #f5a623 !important; /* Наш золотисто-оранжевый */
}
@media (min-width: 350px) and (max-width: 356px) {
  .title-line-1, .title-line-3 {
    font-size: 93%; /* Чуть ужимаем размер, чтобы текст влез в одну строку */
  }
}
/* === ПАНЕЛЬ ФИЛЬТРОВ В КАТАЛОГЕ === */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px; /* Отступ вниз до самих сумок */
  padding: 0 10px;
}

.filter-btn {
  background: #e8faff;
  border: 1px solid #00bcd4;
  color: #31708e;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Montserrat-VariableFont_wght", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #00bcd4;
  color: #fff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #31708e;
  color: #fff;
  border-color: #31708e;
  box-shadow: 0 4px 10px rgba(49, 112, 142, 0.3);
  cursor: default; /* Активную кнопку не нужно нажимать */
}
/* --- ПОЛНОЭКРАННЫЙ ПРОСМОТР ФОТО --- */
.fullscreen-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none; /* Скрыто по умолчанию */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
}

.fullscreen-viewer img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain; /* МАГИЯ: показывает фото целиком, без обрезки */
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Меняем курсор на лупу при наведении на главное фото */
.prod-main-media img {
  cursor: zoom-in;
}

/* --- ДОБАВЛЯЕМ ИКОНКУ ЛУПЫ ДЛЯ ГЛАВНОГО ФОТО --- */
.prod-main-media {
  position: relative; 
}

.prod-main-media::after {
  content: '';
  position: absolute;
  bottom: 15px; 
  right: 15px;  
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.1); 
  backdrop-filter: blur(2px); 
  -webkit-backdrop-filter: blur(2px); 
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2331708e"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/><path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>');
  background-size: 20px;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15); 
  pointer-events: none; 
}

/* 3. Убираем лупу, если вместо фото загружено видео (там и так есть кнопка Play) */
.prod-main-media:has(video)::after {
  display: none;
}
.price-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #00bcd4;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  font-family: serif;
  font-style: italic;
  margin-left: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 188, 212, 0.4);
  transition: all 0.3s ease;
  vertical-align: middle;
}

.price-info-icon:hover {
  background-color: #31708e;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(49, 112, 142, 0.4);
}
