/* === Глобальные переменные и сброс === */
:root {
  --color-bg: #1f1f1f;
  --color-bg-light: #2a2a2a;
  --color-text: #a8a4a4;
  --color-muted: #aaaaaa;
  --color-accent: #181818;
  --color-accent-hover: #357abd;
  --color-danger: #e74c3c;
  --color-button-menu: #525252;
  --radius: 4px;
}


/* Сброс отступов и рамок */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Плавный скролл по якорям */
html {
  scroll-behavior: smooth;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  height: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 0 auto;
}

/* Кнопка «Наверх» */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: none;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.back-to-top.show {
  display: flex;
}




/* === Шапка === */
.site-header {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--color-bg-light);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.logo-img {
  max-height: 70px;  /* подберите высоту логотипа */
}


.header-tagline {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: var(--color-muted);
  white-space: nowrap;
}

/* === Навигация === */


.category-nav {/* Навигация по категориям */
  flex: 1 1 auto;
  text-align: center;
  padding: 1rem 0;
  background: #7f7e7e;
  border-bottom: 1px solid #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);

}

.site-nav ul,
.category-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.category-nav ul {
  display: inline-flex;
  
}

.site-nav a,
.category-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  color:#d0d0d0;
  padding: 5px 5px;
}

.site-nav a {
  background-color: var(--color-button-menu) ;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 10px;

}

.site-nav a:hover {
  background-color: #171616;
}
.category-nav a:hover {
  color: var(--color-accent);
}
.category-nav a {
  font-weight: 600;
  color:#d0d0d0;
  font-size:medium;
}
.nav-toggle {    /* Кнопка-гамбургер — по умолчанию скрыта */
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--color-text);
  position: relative;
  transition: transform 0.3s ease;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger::before { top: -8px; }
.hamburger::after  { top: 8px; }



/* === Интро === */
.intro {
  padding: 2rem;
  text-align: center;
  background-color: var(--color-bg-light);
}
.intro h1 {
  font-size: 1.5rem;
  color: #7d8697;
  margin-bottom: 0.5rem;
}
.intro p {
  font-size: 1rem;
  color: var(--color-muted);
}
/* === Карточки товаров === */
.gallery__grid {     /* Сетка карточек: 6/4/2 */
  display: grid;
  gap: 1rem;
  padding: 2rem;
  grid-template-columns: repeat(6, 1fr);
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #2a2a2a;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s;
}
.product-card:hover {
  transform: translateY(-5px);
}
/* Карточка товара: картинка + контент Homepage 
.product-card {
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
}*/
.card-image {
  aspect-ratio: 1/1;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  padding: 0.2rem;
  text-align: center;
}
.card-content h2 {
  font-size: 0.9rem;
  margin: 0.1rem 0;
}
.card-content p {
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
  color: var(--color-muted);
}
.card-content button {
  width: 100%;
  padding: 0.5rem 0;
  border: none;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: auto;
}
.card-content button:hover {
  background: var(--color-accent-hover);
}

/* === Кнопки общего назначения === */
.btn, .btn-order, 
#nextBtn, 
#backBtn, 
#buyBtn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;

}
.btn:hover, .btn-order:hover, 
#nextBtn:hover, 
#backBtn:hover, 
#buyBtn:hover {
  background: var(--color-accent-hover);
}


.discount-info {
  font-style: italic;
  font-size: 0.7rem;
  color: rgb(131, 91, 12);
}

.cart-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.btn-discount {
  background: linear-gradient(90deg, #ffb700, #ffe47a);
  color: #222;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  padding: 10px 24px;
  box-shadow: 0 2px 6px rgba(255,183,0,0.15);
  transition: opacity 0.2s;
  cursor: pointer;
  width: 7rem;
}

.btn-discount:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  color: #938181;
}


/* === Секция "Оформление заказа" === */
.order-section {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--color-bg-light);
  border-radius: var(--radius);
  text-align: center;
}
.order-section.hidden {/* Скрытая секция заказа */
  display: none;
}
.order-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.order-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}
.order-image img {
  max-width: 200px;
  border-radius: var(--radius);
}

.order-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-form label {
  font-size: 0.9rem;
}

.order-form input,
.order-form select,
.order-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background-color: #fff;
  color: #000;
  box-sizing: border-box;
}

.order-form label.required::after {/* Звёздочки и валидация */
  content: " *";
  color: var(--color-danger);
}

.validation-message {
  color: var(--color-danger);
  font-size: 0.85rem;
  display: none;
  margin-top: 0.25rem;
}
input.invalid,  /* Ошибка валидации */
select.invalid,
textarea.invalid {
  border: 1px solid var(--color-danger);
  background-color: #fee;
}

/* === Подвал === */
.site-footer {
  padding: 1.5rem 2rem;
  background: #111;
  color: #ccc;
  text-align: center;
  flex-shrink: 0;
}
.site-footer a {
  color: #aaa;
  text-decoration: underline;
}
/* === Корзина === */
.cart-panel {
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  height: 100%;
  background: var(--color-bg-light);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.cart-panel.visible {
  transform: translateX(0);
}
/*
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
*/

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
}

.cart-item-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
}

.cart-item-info {
  flex: 1;
  font-size: 0.9rem;
  color: var(--color-text);
}

.cart-item-remove {
  font-size: 1.5rem;
  background: var(--color-danger);
  color: white;
  border: none;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.cart-item-remove:hover {
  background: #c0392b;
}

.cart-totals {
  /*width: 100%;*/
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--color-muted);
}

.cart-totals p {
  margin: 0.25rem 0;
}

/* === TOAST-уведомление === */
.toast {
  position: fixed;
  top: 5rem;
  right: 2rem;
  background: rgba(65, 84, 53, 0.553);
  color: #94a48c;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  opacity: 0;
  animation: fadeInOut 3s forwards;
  z-index: 2000;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}


/* === Панель подтверждения === */
.confirm-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 90vw;
  height: 90%;
  background: var(--color-bg-light);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 1100;
  padding: 2rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.confirm-panel.visible {
  transform: translateX(0);
}

.confirm-panel h2 {
  display: flex;
  margin: auto;
  color: var(--color-text);
}



.confirm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.confirm-header .back-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  color: var(--color-accent-hover);
}
.confirm-header .back-btn:hover {
  color: var(--color-accent);
}

.confirm-panel .field-group {
  margin-bottom: 1rem;
}
.confirm-panel .field-group label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-muted);
}
.confirm-panel .field-group .value {
  background: #3a3a3a;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-family: monospace;
  line-height: 1.4;
  color: var(--color-text);
}

.confirm-panel .button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}
.confirm-panel button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
}

.confirm-panel .back-btn {
  background: none;
  color: var(--color-accent);
}
.confirm-panel .pay-btn {
  background: var(--color-accent);
  color: white;
}

.confirm-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* === iframe-контейнер блока заказа === */
.iframe-container {
  max-width: 800px;
  margin: 0 auto;
}
.iframe-container iframe {
  width: 100%;
  height: 800px;
  border: none;
}

/* === Технические характеристики товара (список) === */
.specs {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}
.specs li {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.specs p {
  white-space: pre-line;
  line-height: 1.5;
  margin-left: 0.5rem;
}


/* === Выезжающая форма заказа в корзине === */
.order-form-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 87%;
  background: var(--color-bg-light);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 999;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.order-form-wrapper.visible {
  transform: translateY(0%);
}

.order-form-wrapper h2 {
  display: flex;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  margin: auto;
  color: var(--color-text);
}
.order-form-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 480px;
  margin: 0 auto;
}
.order-form-wrapper input,
.order-form-wrapper select,
.order-form-wrapper textarea {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  width: 100%;
  box-sizing: border-box;
}
.order-form-wrapper .submit-btn {
  width: auto;
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.order-form-wrapper .submit-btn:hover {
  background: var(--color-accent-hover);
}
.order-form-wrapper .form-back {
  display: flex;
  align-self: flex-start;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 1rem;
  color: var(--color-accent);
}
.order-form-wrapper .form-back:hover {
  color: var(--color-accent-hover);
}


/* === Header и иконка корзины === */
header.site-header {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--color-bg-light);
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header.site-header .logo {
  flex: 0 0 auto;
  order: 1;
}
header.site-header .site-nav {
  order: 2;
  margin-left: auto;
  margin-right: 1rem;
  display: flex;
  gap: 1rem;
}
header.site-header .cart-icon {
  order: 3;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 0.5rem;
  position: relative;
  margin-bottom: 4rem;
}

header.site-header .nav-toggle {
  order: 4;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
  font-weight: bold;
}
.cart-count.hidden {
  display: none;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ccc;
}

#cartClose {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

#cartContent {
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
}

.add-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #2f2e2e;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.add-cart-btn:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}
  
/* Фиксированная ширина и базовый стиль для select */
#sizeSelect {
  width: 110px;
  max-width: 100%;
  font-size: 0.9rem;
height: 1.3rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background: #fff;
  color:#4e4d4d;
}

/* Тень и скругления — универсальные элементы */
.shadowed-box {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-bg-light);
  color: var(--color-text);
}

/* Анимация для выезжающих блоков */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.3s ease-out forwards;
}


/* Кнопка отправки */
.order-form button[type="submit"] {
  padding: 0.75rem;
  background: #0073e6;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.order-form button[type="submit"]:hover {
  background: #005bb5;
}


/* Скрытые блоки */
.order-form-container,
.order-summary {
  width: 100%;
}
.order-summary {
  display: none;
}


/* === Детальная страница товара === */
.product-detail {
  display: flex;
  align-items: flex-start;   /* выравниваем оба блока по верху */
  gap: 2rem;                 /* промежуток между колонками */
  margin-top: 20px;          /* отступ от шапки */
  padding: 0 1rem;           /* горизонтальные поля */
}


/* Галерея слева */
.product-gallery {
  flex: 0 0 500px;           /* фиксируем ширину */
  margin-left: 40px;         /* ваш левый отступ */
}

/* Квадратный контейнер под главное изображение */
.gallery-main-container {
  width: 100%;
  aspect-ratio: 1 / 1;       /* идеально квадрат */
  overflow: hidden;          /* обрезаем избыток */
  border-radius: 8px;
}

/* Главное изображение вписывается в контейнер без прыжков */
.gallery-main-container img.gallery-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  
}
/* Миниатюры под основным изображением */
.gallery-thumbs {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 20px;
}
.gallery-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}
.gallery-thumbs img:hover,
.gallery-thumbs img.active {
  transform: scale(1.1);   /* эффект наведения/активной */
  border-color: #0073e6;
}

/* Информационный блок справа */
.product-info {
  display: flex;
  flex-direction: column; 
  max-width: 50%;          
}

 #qtyInput{
  width: 110px;
  
 }

.product-info_btn-row .add-cart-btn {
  height: 30px;
  margin-left: 1rem;
  
}
.product-info_anzahl-label {
  margin-top: 0.5rem;
}

/* Адаптация product-detail для уменьшения ширины */
.product-detail {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 20px;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Контейнер с изображением */
.product-gallery {
  flex: 0 0 420px;
  min-width: 220px;
  max-width: 100%;
  margin-left: 0;
}

.gallery-main-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-main-container img.gallery-main {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumbs {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-thumbs img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

/* Блок инфо справа */
.product-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.product-price {
  font-size: 1.32rem;
  font-weight: bold;
  color: #4a90e2;
  margin: 0.4rem 0 0.5rem 0;
}

/*---------------------------------------*/
/* === АДАПТИВНОСТЬ ДЛЯ ВСЕХ СТРАНИЦ === */

/* Планшеты — до 1024px */
@media (max-width: 1024px) {
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-header {
    padding: 0.75rem 1.5rem;
  }

  .logo-img {
    max-height: 50px;
  }

  .header-tagline {
    font-size: 1rem;
  }

  .site-nav ul {
    gap: 1rem;
    
  }

  .btn, .btn-order, #nextBtn, #backBtn, #buyBtn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 980px) {
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-header {
    padding: 0.75rem 1.5rem;
  }

  .logo-img {
    max-height: 50px;
  }

  .header-tagline {
    display: flex;
    font-size: 1rem;
  }

  .site-nav ul {
    gap: 0.7rem;
    
  }

  .btn, .btn-order, #nextBtn, #backBtn, #buyBtn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}
/*-------------*/
@media (max-width: 900px) {
  .site-header {
    padding: 0.5rem 1rem;
  }

  .header-tagline {
    font-size: 0.9rem;
    max-width: 100%;
  }

  .site-nav ul a {
    display: flex;
  }
}
/*-------------*/
@media (max-width: 830px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
  }

  .header-tagline {
    font-size: 0.75rem;
    max-width: 100%;
  }
  
}


/* Tablet — до 768px */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    position: relative;
  }

  .logo {
    order: 2;
  }

  .logo-img {
    margin-bottom: 8px;
    max-height: 40px;
  }

  .header-tagline {
    order: 3;
    font-size: 0.75rem;
    margin-top: 2.5rem;
    text-align: center;
  }

  .cart-icon {
    order: 1;
    position: absolute !important;
    top: 0.5rem;
    right: 1rem;
    z-index: 1001;
  }

  .nav-toggle {
    display: block;
    order: 1;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    z-index: 1001;
  }

  .site-nav {
    display: none !important;
    margin-top: 0.5rem;
    position: absolute;
    top: 70%;
    left: 1rem;
    background: rgba(30, 28, 28, 0.98);
    border-radius: 6px;
    /*padding: 0.75rem 1.25rem;*/
    z-index: 999;
    animation: slideFadeIn 0.8s ease forwards;
    width: max-content;
    min-width: 100px; /* ограничение по минимальной ширине */ 
  }

  .site-nav.open {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 1rem;
   
  }

  .intro h1 {
    font-size: 1.1rem;
  }

  /* Анимация появления */
  @keyframes slideFadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
    
  }

 @media (max-width: 600px) {
  .gallery__grid {
    grid-template-columns: repeat( 2, 1fr);
  }
 }


/* Смартфоны — до 480px */
@media (max-width: 480px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    position: relative;
  }

  .logo {
    order: 2;
  }

  .logo-img {
    max-height: 40px;
  }

  .header-tagline {
    order: 3;
    font-size: 0.75rem;
    margin-top: 2.5rem;
    text-align: center;
  }

  .cart-icon {
    order: 1;
    position: absolute !important;
    top: 0.5rem;
    right: 1rem;
    z-index: 1001;
  }

  .nav-toggle {
    display: block;
    order: 1;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    z-index: 1001;
  }

  .site-nav {
    display: none !important;
    margin-top: 0.5rem;
    position: absolute;
    top: 70%;
    left: 1rem;
    background: rgba(30, 28, 28, 0.98);
    border-radius: 6px;
    /*padding: 0.75rem 1.25rem;*/
    z-index: 999;
    animation: slideFadeIn 0.8s ease forwards;
    width: max-content;
    min-width: 100px; /* ограничение по минимальной ширине */ 
  }

  .site-nav.open {
    display: block !important;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 1rem;
  }
}

 /* Гамбургер анимация */
  .hamburger {
  position: relative;
  display: block;
  width: 25px;
  height: 3px;
  background: var(--color-text);
  transition: background 0.3s ease;
  }
  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--color-text);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
  }

  .hamburger::before {
    top: -8px;
  }
  .hamburger::after {
    top: 8px;
  }

  /* АКТИВНОЕ СОСТОЯНИЕ: крестик */
  .hamburger.active {
    background: transparent;
  }
  .hamburger.active::before {
    transform: rotate(45deg);
    top: 0;
  }
  .hamburger.active::after {
    transform: rotate(-45deg);
    top: 0;
  }

}

@media (max-width: 1024px) {
  .product-detail {
    gap: 1rem;
  }
  .product-gallery {
    flex: 0 0 320px;
  }
  .gallery-main-container {
    border-radius: 6px;
  }
  .gallery-thumbs img {
    width: 48px;
    height: 48px;
  }
  .product-info {
    margin-bottom: 20px;
  }

}

@media (max-width: 768px) {
  .product-detail {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 0 0.5rem;
  }
  .product-gallery {
    flex: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .gallery-main-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  .gallery-thumbs {
    justify-content: center;
  }
  .product-info {
    width: 100%;
    padding: 0 0.5rem;
    margin-bottom: 20px;
  }
}
  @media (max-width: 768px) {
    .product-info {
      align-items: center;
      text-align: center;
      padding: 0.3rem 0.5rem 0 0.5rem;
      
    }
    .product-info > * {
      margin-left: auto;
      margin-right: auto;
    }
    .product-price {
      font-size: 1.28rem;
      font-weight: bold;
      color: #4a90e2;
      margin: 0.35rem 0 0.6rem 0;
    }
    .product-info h1 {
      margin-bottom: 0.1rem;
    }
  }
    @media (max-width: 768px) {
    .product-detail {
      flex-direction: column;
      align-items: center; /* Центрирует все дочерние блоки, и .product-info тоже */
      gap: 0.7rem; /* уменьшаем расстояние между .product-gallery и .product-info */
      padding: 0 0.5rem;
    }
    .product-gallery {
      margin-bottom: 0.1rem; /* чтобы изображение и инфо были ближе */
    }
    .product-info {
      width: 100%;
      max-width: 370px;  /* чтобы на мобилке не было на всю ширину и всё по центру */
      display: flex;
      flex-direction: column;
      align-items: center; /* полностью центрируем */
      text-align: center;
      margin: 0 auto; /* точно по центру */
      padding: 0.3rem 0 0 0;
      margin-bottom: 20px;
    }
    .product-info > * {
      margin-left: auto;
      margin-right: auto;
    }
    .product-price.desktop-only { display: block; }
    .product-price.mobile-only { display: none; }
  }
  .specs{
    text-align: left;
    max-width: 100%;
    width: 100%;
  } 





@media (max-width: 480px) {
  .gallery-main-container {
    max-width: 95vw;
  }
  .gallery-thumbs img {
    width: 36px;
    height: 36px;
  }
  .product-info {
    padding: 0;
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
}


/*---------------------------------------*/
.product-price.mobile-only { display: block; }
.product-price.desktop-only { display: none; }





/*Katalogseite*/

.dev-message {
      
      background: #2a2a2a;
      padding: 2.5rem 1.5rem;
      border-radius: 12px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.2);
      max-width: 400px;
      margin: auto;

    }
    .dev-message h1 {
      margin-bottom: 1.2rem;
      color: #4a90e2;
    }
    .dev-message p {
      font-size: 1.15rem;
      color: #ccc;
      margin-bottom: 0.5rem;
    }
    .dev-message .smile {
      font-size: 2.3rem;
      color: #4a90e2;
      margin-bottom: 0.2rem;
      display: block;
    }

    .header-row {
      display: flex;
      align-items: baseline;
    }

    /* Spinner */
    .overlay-loading {
    position: fixed;
    left: 0; top: 0; 
    width: 100vw; height: 100vh;
    background: rgba(40,40,50,0.28);
    z-index: 9999;
    display: flex;
    align-items: center; justify-content: center;
    transition: opacity .18s;
    box-sizing: border-box;
    overscroll-behavior: contain;
  }
    .overlay-loading > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .spinner {
    width: 52px; height: 52px;
    border: 7px solid #e7e7e7;
    border-top: 7px solid #4175d1;
    border-radius: 50%;
    animation: spin 1.1s linear infinite;
    margin: 0 auto;
  }
  @keyframes spin { 100% { transform: rotate(360deg); } }
  .loading-blur { filter: blur(1.2px) grayscale(0.4); pointer-events: none; }
  .spinner-inline {
    width: 22px; height: 22px; border-width: 3px;
    display: inline-block; vertical-align: middle; margin-left: 7px;
  }

  /* info block für Btn_bezahlen*/

    .overlay-info-block {
    position: fixed;
    top: 0; left: 0; width: 100vw;
    background: rgba(35, 39, 47, 0.94);
    color: #fff;
    z-index: 11000;
    box-shadow: 0 2px 16px #0004;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideDownInfo .38s cubic-bezier(.63,.12,.36,1.11);
    padding: 32px 22px 18px 22px;
  }
  @keyframes slideDownInfo {
    0% { transform: translateY(-120%); opacity: 0; }
    65% { transform: translateY(8%); opacity: 1;}
    100% { transform: translateY(0); opacity: 1;}
  }
  .overlay-info-block .info-title {
    font-size: 1.36rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
  }
  .overlay-info-block .info-text {
    font-size: 1.08rem;
    text-align: center;
    max-width: 410px;
    margin-bottom: 22px;
    line-height: 1.5;
  }
  .overlay-info-block .info-ok-btn {
    padding: 9px 28px;
    border: none;
    border-radius: 10px;
    background: #4175d1;
    color: #fff;
    font-size: 1.03rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .13s;
    box-shadow: 0 2px 10px #2234a722;
  }
  .overlay-info-block .info-ok-btn:hover {
    background: #274a93;
  }
  .info-blur-bg {
    filter: blur(1.5px) grayscale(0.3) brightness(0.90);
    pointer-events: none !important;
    user-select: none;
  }

  /* uber uns*/
  .about-container{
    padding: 1rem 2rem;

  }
  .about-title_text {
    font-size: 1.1rem;
    margin-left: 40px;
    text-align: center;
  }
  .about-container h2 {
    font-style: italic;
  }
  .about-container h3 {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.8rem;
  }
  .about-item_content {
    margin: 0 auto;
    max-width: 700px;
    width: 100%;
    border: 2px solid #212020;
    border-radius: 14px;
    background: #3a3939;
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 12px rgba(60,60,60,0.5);
  }
  .about-item_content p {
    font-size: 1.2rem;
    font-style: normal;
    
  }

  .about-item_img {
    display: flex;
    width: 100%;
    height: 200px;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    gap: 2rem;
  }
  .about-item_img img {
    display: block;
    max-width: 200px;
    max-height: 100%;
    border-radius: 8px;


  }

  @media (max-width: 700px) {
  .about-item_content {
    max-width: 98vw;     /* почти на всю ширину экрана */
    padding: 1rem 0.7rem;
    font-size: 1.05rem;  /* чуть меньше шрифт, если текст кажется крупным */
    margin: 1.2rem auto;
  }
  .about-item_content p {
    font-size: 1.05rem;  /* подстрой под читаемость */
  }
  .about-item_img {
    flex-direction: column;
    height: auto;
    gap: 1rem;
    margin: 1rem 0 0 0;
  }
  .about-item_img img {
    max-width: 96vw;   /* делаем каждое фото на всю ширину, если надо — 80vw */
    height: auto;
    margin: 0 auto;
  }
  .about-container {
    padding: 0.5rem 0.4rem;
  }
  .about-title_text {
    margin-left: 0;
    font-size: 1rem;
  }
}

