* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
}

main {
  flex-grow: 1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: rgba(1, 1, 1, 0.9);
  color: #fff;
  padding: 16px 0;

  position: sticky;
  top: 0;
  z-index: 1000;

  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);

  flex-shrink: 0;

  /* box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); */
  /* border-bottom: 3px solid rgba(255, 255, 255, 0.20); */
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  /* display: flex; */
  font-size: 30px;
  font-weight: bold;
  /* align-items: center;
  justify-content: center; */
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  transition: 0.2s;
}

.nav a:hover {
  transform: scale(0.98);
  color: #a5a5a5;

}

.catbtnadnsearch {

  display: flex;
  align-items: center;
  gap: 20px;
  flex-grow: 1;
  justify-content: center;


}

.catalog-btn {
  max-width: 120px;
  width: 100%;
  padding: 10px 14px;
  background-color: #9c27b0;
  border-radius: 999px;
  border: 1px solid gray;
  transition: 0.2s;
  position: relative;
  cursor: pointer;
  color: #ffffff;
  font-size: 14px;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

}

.catalog-btn:hover {
  transform: scale(1.02);
  background-color: #ce37e9;
}

.hero {
  padding: 60px 0;
  background: #e9eefc;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 18px;
  color: #555;
}

.products {
  padding: 50px 0;
}

.products h2,
.cart h2 {
  margin-bottom: 20px;
  font-size: 28px;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* align-self: start; */
  height: 100%;
  width: 100%;
  position: relative;
  /* Это понадобится нам для второго вопроса! */
  /* ДОБАВЛЯЕМ: Плавность для тени и сдвига (0.3 секунды) */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  /* Легкий сдвиг вверх на 4 пикселя */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  /* Тень становится шире и чуть мягче */
}

.card img {

  border-radius: 8px;
  margin-bottom: 12px;

}


.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: #666;
  margin-bottom: 16px;
}

.card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price {
  font-weight: bold;
  font-size: 18px;
}

.card__link {
  color: inherit;
  /* Чтобы ссылка не стала стандартно синей */
  text-decoration: none;
  /* Убираем подчеркивание */
}

/* Создаем "невидимое одеяло", которое тянется от ссылки на всю карточку */
.card__link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* z-index не ставим, он автоматически накроет текст и картинку */
}

/* .buy-btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.buy-btn:hover {
  opacity: 0.9;
} */

.cart {
  padding: 30px 0 80px;
}


.cart-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@media (max-width: 900px) {
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .header__inner {
    flex-direction: column;
    gap: 12px;
  }

  .products__grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 28px;
  }
}






.cart-items {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7f7f7;
  padding: 12px 14px;
  border-radius: 8px;
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item__name {
  font-weight: bold;
}

.cart-item__meta {
  font-size: 14px;
  color: #666;
}

.empty-cart {
  color: #777;
}

.cart-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qty-btn,
.remove-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
}

.qty-btn {
  background: #111;
  color: #fff;
}

.remove-btn {
  background: #ddd;
  color: #222;
}

.qty-value {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
}

.order-form {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

.order-form h3 {
  margin-bottom: 16px;
  font-size: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.form-group label {
  font-weight: bold;
}

.form-group input {
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

.form-group select {
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

.form-group input:focus {
  border-color: #111;
}

.submit-btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.submit-btn:hover {
  opacity: 0.9;
}

.order-message {
  margin-top: 14px;
  font-size: 15px;
  min-height: 20px;
}

.orders-page {
  padding: 50px 0 80px;
}

.orders-page h1 {
  margin-bottom: 24px;
  font-size: 32px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.order-card__header {
  padding: 18px 20px;
  background: #111;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.order-card__header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-card__header h2 {
  font-size: 22px;
}

.order-card__date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.order-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card__body p {
  margin-bottom: auto;
}

.order-card__items {
  margin-top: 16px;
  margin-bottom: 16px;
}

.order-card__items h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.order-card__items ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-card__items li {
  line-height: 1.5;
}

.order-card__total {
  font-size: 18px;
}

.order-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
}

.order-status--new {
  background: #ffe9a8;
  color: #6b5300;
}


.order-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}


.delete-order-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: #dc3545;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.delete-order-btn:hover {
  opacity: 0.92;
}

@media (max-width: 640px) {
  .order-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .delete-order-btn {
    width: 100%;
  }
}





.status-dropdown {
  position: relative;
  display: inline-block;
  width: 180px;
}

.status-dropdown__toggle {
  width: auto;
  min-width: 140px;
  max-width: 180px;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.status-dropdown__toggle:hover {
  transform: translateY(-1px);
}

.status-dropdown__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.status-dropdown__text {
  line-height: 1;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
}

.status-dot--new {
  background: #c59b00;
}

.status-dot--paid {
  background: #2f8f46;
}

.status-dot--shipped {
  background: #2f6fd6;
}

.status-dot--done {
  background: #7b4dd8;
}

.status-dropdown__toggle--new {
  background: #ffe9a8;
  color: #6b5300;
}

.status-dropdown__toggle--paid {
  background: #cdeccf;
  color: #1f5d2b;
}

.status-dropdown__toggle--shipped {
  background: #cfe3ff;
  color: #1f4f91;
}

.status-dropdown__toggle--done {
  background: #e2d6ff;
  color: #5a3696;
}

.status-dropdown__arrow {
  font-size: 12px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.status-dropdown.is-open .status-dropdown__arrow {
  transform: rotate(180deg);
}

.status-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 8px;
  z-index: 20;

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.status-dropdown.is-open .status-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-dropdown__option {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.status-dropdown__option--new {
  background: #fff4c7;
  color: #6b5300;
}

.status-dropdown__option--paid {
  background: #ddf5df;
  color: #1f5d2b;
}

.status-dropdown__option--shipped {
  background: #dfebff;
  color: #1f4f91;
}

.status-dropdown__option--done {
  background: #ece3ff;
  color: #5a3696;
}

.status-dropdown__option:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.order-details-table {
  width: auto;
  /* Таблица займет ровно столько места, сколько нужно контенту, а не 100% */
  margin-left: 0;
  /* Гарантируем, что она прижата к левому краю */
  border-collapse: collapse;
  /* Убираем стандартные двойные отступы между ячейками */
}

.order-details-table th {
  text-align: left;
  font-weight: 600;
  color: #114abe;
  padding: 4px 16px 4px 0;
  white-space: nowrap;
  width: 0px;
}

.order-details-table td {
  text-align: left;
  padding-bottom: 8px;
  color: #000000;
  padding: 5px;
}

.order-details-table tr {
  vertical-align: top;
}


.header__inner {
  gap: 20px;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  /* min-width:min-content; */
  max-width: 450px;
  /* чтобы не растягивался до бесконечности */
}

.search__input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  /* вот это делает его “пилюлей” */
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
  transition: 0.2s;
}

.search {
  position: relative;
}

.search__btn {
  position: absolute;
  right: 13px;
  top: 54%;
  transform: translateY(-50%);

  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.search__input {
  padding-right: 40px;
}

.search__input:focus {
  border-color: #fdfffd;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .header__inner {
    flex-wrap: wrap;
  }

  .search {
    order: 3;
    width: 100%;
  }
}








.search__input::placeholder {
  color: #aaa;
}

.search__input:hover {
  transform: scale(1.02);
}

.search__input:focus {
  transform: scale(1.02);
}

.search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: none;
  z-index: 1000;
}

.search__results.active {
  display: block;
}

.search__result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: #222;
  border-bottom: 1px solid #f1f1f1;
}

.search__result-item:last-child {
  border-bottom: none;
}

.search__result-item:hover {
  background: #f8f8f8;
}

.search__result-title {
  font-size: 14px;
}

.search__result-price {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: #666;
}

.search__empty {
  padding: 14px;
  font-size: 14px;
  color: #777;
}

.search__result-img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 8px;
}

.search__result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}


.search__result-sku {
  font-size: 12px;
  color: #888;
}

.form-group:last-of-type {
  margin-bottom: 25px;
}


/* Слой затемнения */
.serchoverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 10;
  /* Должен быть выше контента, но ниже целевого элемента */
  opacity: 0;
  pointer-events: none;
  /* Чтобы не мешал кликать, пока невидим */
  transition: opacity 0.3s ease;
}

/* Когда на body активен режим фокуса */
body.is-focused .serchoverlay {
  opacity: 1;
  pointer-events: auto;
}






/* Базовый сброс и контейнер */
.product-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Отступ между верхним блоком и описанием */
}

/* Верхняя часть: сетка из двух равных колонок */
/* .product-top { */
/* display: grid; */
/* grid-template-columns: 60% 1fr; */
/* grid-template-rows: 200px; */
/* gap: 20px; */
/* Расстояние между фото и ценой */
/* align-items: flex-start;
  width: 100%; */
/* } */

.product-grid {
  display: grid;
  grid-template-columns: 60% 1fr;
  /* Левая колонка 60%, правая - всё остальное */
  gap: 20px;
  align-items: start;
  width: 100%;
}

.col-left,
.col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Стили для галереи (рамки добавлены для сходства с макетом) */
/* .product-gallery {
    border: 8px solid #ffffff;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: red;
    text-align: center;
} */

/* Правая колонка: флекс для вертикального расположения блоков */
.product-info {
  /* flex-direction: column; */
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 20px;
  /* max-width: 600px; */
  align-self: start;
  /* Блок перестанет растягиваться по вертикали */
  height: auto;
  /* grid-column: 2;
  grid-row: 1; */
  width: 100%;
}


.product-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-code {
  font-size: 14px;
  color: #7d7d7d;
  margin-bottom: 16px;
}

.product-status {
  color: #2e7d32;
  /* Тёмно-зеленый для лучшей читаемости */
  font-size: 16px;
  margin-bottom: 8px;
}

.product-price {
  font-size: 36px;
  font-weight: 800;
  margin: 20px 0;
  display: flex;
  align-items: baseline;
}

.currency {
  font-size: 24px;
  margin-left: 4px;
  font-weight: 400;
}

/* Контейнер для кнопок */
.product-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.btn-primary {
  background-color: #9c27b0;
  color: white;
  font-size: 16px;
  transition: 0.2s;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid #9c27b0;
  color: #9c27b0;
  font-size: 14px;
  transition: 0.2s;
}

.btn-bakcshop {
  background-color: transparent;
  border: 1px solid #9c27b0;
  color: #9c27b0;
  font-size: 14px;
  transition: 0.2s;
}


.btn:hover {
  opacity: 0.9;
}


.btn-primary:hover {
  transform: scale(0.98);
  background-color: #ce37e9;
}

.btn-secondary:hover {
  transform: scale(0.98);
  /* background-color: #ce37e9; */
}

.btn-bakcshop:hover {
  transform: scale(0.98);
  /* background-color: #ce37e9; */
}



/* Нижний блок */
.product-description {
  /* display: flex; */
  /* flex-direction: column; */
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 20px;
  /* max-width: 600px; */
  align-self: start;
  /* Блок перестанет растягиваться по вертикали */
  height: auto;

  width: 100%;

  /* grid-column: 1;
  grid-row: 4; */
}

.product-description h2 {
  margin: 0 0 15px 0;
}


.delivandpay-contener {
  /* flex: 1; */
  /* display: flex; */
  /* flex-direction: column; */
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 20px;
  /* max-width: 600px; */
  align-self: start;
  /* Блок перестанет растягиваться по вертикали */
  height: auto;
  width: 100%;

  /* grid-column: 2;
  grid-row: 2; */
}

.delivandpay-contener h2 {
  margin: 0 0 15px 0;
}



.logo__link {
  text-decoration: none;
  /* Убираем подчеркивание у текста */
  color: inherit;
  /* Наследуем цвет текста от родителя */
  display: inline-block;
  /* Или block, чтобы задать размеры */
  transition: opacity 0.3s ease;
}

.logo__link:hover {
  opacity: 0.8;
  /* Визуальный отклик при наведении */
}



.custom-gallery {
  /* Занимает ровно 70% и не сжимается */
  display: flex;
  /* Включаем flex внутри самой галереи */
  gap: 12px;
  /* Расстояние между колонкой миниатюр и фото */
  /* grid-column: 1;
  grid-row: 1 / 4; */
}

/* Блок главного фото */
.cg-main {
  position: relative;
  width: 100%;

  /* Фиксируем габариты, чтобы блок не дышал от разных фото */
  height: 420px;
  /* Можно и min-height: 400px, но жесткий height надежнее для зума */
  /* Современная альтернатива для адаптива: aspect-ratio: 4 / 3; или 1 / 1; */

  /* Ваш дизайн */
  border: 8px solid #ffffff;
  background: #ffffff;
  /* Фон, который будет видно по бокам узких фото */
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  /* Легкая тень для красоты, по желанию */

  /* Ваша логика: строгое центрирование контента внутри */
  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  /* Важно: обрезает всё, что выходит за рамки при зуме */
}

/* Контейнер для эффекта лупы */
.cg-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

#cg-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.1s ease-out;
  /* Плавность для зума */
  transform-origin: center center;
}

/* Кнопки вперед/назад */
.cg-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s;
  z-index: 10;

  color: #333;
}

/* Стилизация при наведении на САМУ КНОПКУ (остается) */
.cg-nav:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cg-prev {
  left: 10px;
}

.cg-next {
  right: 10px;
}

/* Лента миниатюр (с поддержкой свайпа пальцем) */
.cg-thumbnails {
  display: flex;
  flex-direction: column;
  /* Выстраиваем в столбик */
  order: -1;
  /* Перебрасываем ВЛЕВО от главного фото */

  width: 80px;
  /* Ширина колонки миниатюр */
  flex-shrink: 0;
  /* Чтобы миниатюры не сплющились */

  max-height: 600px;
  /* Ограничь высоту под размер большого фото */
  overflow-y: auto;
  /* Вертикальный скролл */
  overflow-x: hidden;

  scrollbar-width: none;
  /* Скрываем скроллбар */
}

.cg-thumbnails::-webkit-scrollbar {
  display: none;
  /* Прячем скроллбар в Chrome/Safari */
}

.cg-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s;
  scroll-snap-align: start;
  /* Магнитится к началу */
  flex-shrink: 0;
  /* Чтобы не сжимались */
  border: 2px solid transparent;
}

.cg-thumb:hover {
  opacity: 0.8;
}

.cg-thumb.active {
  opacity: 1;
  border-color: #333;
  /* Обводка активного фото */
}


/* Скрываем кнопки по умолчанию только на десктопах */
@media (hover: hover) and (pointer: fine) {
  .cg-nav {
    opacity: 0;
    /* Делаем полностью прозрачными */
    visibility: hidden;
    /* Исключаем из навигации клавиатурой, когда скрыты */
  }

  /* Показываем кнопки, когда курсор наведен на область `.cg-main` */
  .cg-main:hover .cg-nav {
    opacity: 1;
    /* Делаем видимыми */
    visibility: visible;
  }
}

/* На мобильных устройствах (где нет наведения курсора), кнопки должны быть видны всегда */
@media (hover: none),
(pointer: coarse) {
  .cg-nav {
    opacity: 1;
    visibility: visible;
  }
}


@media (max-width: 768px) {

  .custom-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;

  }

  .cg-thumbnails {
    flex-direction: row;
    order: 0;
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    justify-content: center;
    /* Переключаем на 1 колонку */
  }

  .col-left,
  .col-right {
    display: contents;
  }

  /* Просто расставляем их по этажам (строкам) сверху вниз */
  .custom-gallery {
    grid-column: 1;
    grid-row: 1;
  }

  .product-info {
    grid-column: 1;
    grid-row: 2;
  }

  .product-description {
    grid-column: 1;
    grid-row: 3;
  }

  .delivandpay-contener {
    grid-column: 1;
    grid-row: 4;
  }
}








.catalog-page {

  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  gap: 20px;

}



.custom-sort-control {
  position: relative;
  display: inline-flex;
  background-color: #dadae8;
  /* Светло-серо-фиолетовый фон как на скриншоте */
  border-radius: 12px;
  padding: 4px;
  align-items: center;
  font-family: sans-serif;
  /* Замени на шрифт твоего сайта */
  align-self: flex-end;
}

/* Прячем стандартные инпуты, но оставляем их доступными для браузера/форм */
.custom-sort-control input[type="radio"] {
  display: none;
}

/* Стили для текста (лейблов) */
.custom-sort-control label {
  position: relative;
  z-index: 2;
  /* Текст должен быть поверх белой плашки */
  padding: 6px 16px;
  cursor: pointer;
  color: #000000;
  /* Цвет неактивного текста */
  font-size: 14px;
  transition: color 0.3s ease;
  user-select: none;
}

/* Цвет текста при выборе */
.custom-sort-control input[type="radio"]:checked+label {
  color: #000000;
}

/* Белая плашка (индикатор) */
.custom-sort-control .indicator {
  position: absolute;
  z-index: 1;
  top: 4px;
  bottom: 4px;
  left: 0;
  background-color: #FFFFFF;
  border-radius: 8px;
  /* Плавная анимация перемещения и изменения ширины */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* .filter-and-goods {
  display: grid;
  grid-template-columns: 1fr 75%;
  gap: 20px;
  align-items: start;
  width: 100%;

} */

.filter-and-goods {
  display: flex;
  flex-direction: column;
  gap: 20px;

}

.filters {
  display: flex;
  flex-direction: column;
  gap: 20px;

}

.goods {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
}


@media (max-width: 768px) {

  .goods {
    grid-template-columns: 1fr 1fr;
  }

  /* .filters {
    display: contents;
  } */

  .filter-and-goods {
    grid-template-columns: 1fr;

  }

  .filters {
    grid-column: 1;
    grid-row: 1;
  }

  .goods {

    grid-column: 1;
    grid-row: 2;

  }

}





/* Изолируем стили, чтобы они не конфликтовали с основной версткой */
.site-footer {
  background: rgba(1, 1, 1, 0.9);
  /* Классический темный фон для контраста */
  color: #f1f1f1;
  padding: 60px 0 0 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-container {
  max-width: 1200px;
  /* Ширина контентной части сайта */
  margin: 0 auto;
  padding: 0 20px;

  /* Grid для автоматической адаптивности без media queries */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-heading {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-address {
  font-style: normal;
  /* Сбрасываем дефолтный курсив тега <address> */
}

.footer-address p {
  margin: 0 0 12px 0;
}

.footer-links {
  list-style: none;
  /* Убираем маркеры списка */
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-address a,
.footer-links a {
  color: #bbbbbb;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

/* Ховер-эффект: легкое высветление и минимальный сдвиг вправо */
.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-address a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Стили нижней панели */
.footer-bottom {
  background-color: #111111;
  /* Делаем полосу чуть темнее основного подвала */
  padding: 20px 0;
  border-top: 1px solid #333333;
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;

  /* Flexbox для раскидывания копирайта и иконок по краям */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  /* Позволяет элементам переноситься на мобильных */
  gap: 20px;
}

.copyright {
  margin: 0;
  color: #888888;
  font-size: 14px;
}

.payment-methods {
  display: flex;
  gap: 12px;
}

/* Заглушки для иконок оплаты */
.payment-icon {
  background-color: #333333;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #bbbbbb;
  user-select: none;
}

/* Единственный media query для выравнивания нижней панели на смартфонах */
@media (max-width: 600px) {
  .footer-bottom-container {
    justify-content: center;
    text-align: center;
  }
}





/* ==========================================================================
   ОБЩИЙ ФОН (OVERLAY) - СКРЫТ ПО УМОЛЧАНИЮ
   ========================================================================== */
.modal-overlay {
  display: none; /* ЖЕСТКО скрыто при загрузке */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(1, 1, 1, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box; 
}

/* ЭТОТ КЛАСС БУДЕТ ДОБАВЛЯТЬСЯ ЧЕРЕЗ JS ПРИ КЛИКЕ */
.modal-overlay.is-open {
  display: flex; 
  animation: fadeInOverlay 0.3s ease forwards;
}

/* ==========================================================================
   САМО МОДАЛЬНОЕ ОКНО
   ========================================================================== */
.modal-content {
  background: #f5f5f5;
  color: #222;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 40px 30px;
  border-radius: 20px; 
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  /* Убрали анимацию отсюда */
}

/* АНИМАЦИЯ ОКНА СРАБАТЫВАЕТ ТОЛЬКО ПРИ ОТКРЫТИИ ОВЕРЛЕЯ */
.modal-overlay.is-open .modal-content {
  animation: slideUpModal 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}



/* --- АНИМАЦИИ --- */
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpModal {
  from { 
    opacity: 0;
    transform: scale(0.9) translateY(20px); /* Начинаем чуть ниже и чуть меньше */
  }
  to { 
    opacity: 1;
    transform: scale(1) translateY(0); 
  }
}

/* ==========================================================================
   ЭЛЕМЕНТЫ ВНУТРИ
   ========================================================================== */

/* Крестик закрытия */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.modal-close:hover {
  color: #9c27b0;
  transform: rotate(90deg); /* Эффектный поворот при наведении */
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 700;
  font-size: 24px;
}

/* Стили полей */
.form-group-popup {
  margin-bottom: 20px;
}

.form-group-popup label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

.form-group-popup input,
.form-group-popup textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 10px; /* Скругление полей в стиле окна */
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  background-color: #fff;
  transition: all 0.2s ease;
}

/* Эффект при клике на поле */
.form-group-popup input:focus,
.form-group-popup textarea:focus {
  outline: none;
  border-color: #9c27b0;
  box-shadow: 0 0 0 4px rgba(156, 39, 176, 0.1);
}

/* Кнопка "Отправить" */
.btn-submit {
  width: 100%;
  padding: 15px;
  background-color: #9c27b0;
  color: white;
  border: none;
  border-radius: 12px; /* Скругление кнопки */
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background-color: #7b1fa2;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(156, 39, 176, 0.4);
}

/* Кнопка "Закрыть" в успехе */
.btn-close-success {
  width: auto;
  min-width: 160px;
  padding: 12px 25px;
  background-color: transparent;
  color: #9c27b0;
  border: 2px solid #9c27b0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-success:hover {
  background-color: #9c27b0;
  color: white;
}

body.no-scroll {
  overflow: hidden;
}




/* Общие сбросы для примера (если еще нет) */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* --- Основные стили Hero блока --- */
.hero-block {
  position: relative;
  /* Для позиционирования оверлея и контента */
  /* width: 100%; */
  margin: 16px;
  height: 80vh;
  /* Высота: 80% от высоты экрана (оптимально, чтобы было видно, что есть контент ниже) */
  min-height: 500px;
  /* Минимальная высота, чтобы на маленьких экранах не сплющило */

  /* Подключаем твою картинку */
  background-image: url('/cartinka/taupgranitbaner');

  /* Настройки фона */
  background-position: center center;
  /* Центрируем картинку */
  background-size: cover;
  /* Масштабируем, чтобы закрыть весь блок, не искажая пропорции */
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* Можно заменить на fixed для эффекта параллакса (если картинка большая) */

  display: flex;
  align-items: center;
  /* Центрируем контент по вертикали */
  color: #fff;
  /* Цвет текста по умолчанию в блоке - белый */
  overflow: hidden;

  border-radius: 16px;
}

/* --- Оверлей (затемнение фона) --- */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Градиент от более темного к прозрачному (темнее слева, где текст) */
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
  /* Поверх фона, но под текстом */
}

/* --- Контент поверх фона --- */
.hero-container {
  position: relative;
  z-index: 2;
  /* Поверх оверлея */
}

.hero-content {
  max-width: 650px;
  /* Ограничиваем ширину текста для удобства чтения */
}

/* --- Типографика --- */
.hero-title {
  font-size: 3rem;
  /* Крупный шрифт */
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  /* Все заглавные (по желанию) */
  letter-spacing: 1px;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  /* Легкая тень для четкости */
}

.hero-title span {
  color: #d4af37;
  /* Акцентный цвет (например, под золото/латунь, хорошо сочетается с таупом) */
  font-weight: 400;
  text-transform: none;
  /* Убираем капс для выделенной строки */
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 40px;
  font-weight: 300;
  opacity: 0.9;
  /* Легкая прозрачность */
}

/* --- Кнопки --- */
.hero-actions {
  display: flex;
  gap: 15px;
  /* Отступ между кнопками */
}

.btntu {
  display: inline-block;
  padding: 15px 30px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}


.btntu-primary {
  background-color: #d4af37;
  color: #1a1a1a;
  border: 2px solid #d4af37;
}

.btntu-primary:hover {
  background-color: transparent;
  color: #d4af37;
}


.btntu-secondary {
  background-color: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btntu-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* --- Адаптивность (Мобильная версия) --- */
@media (max-width: 768px) {
  .hero-block {
    height: auto;
    padding: 100px 0;
  }

  /* Убираем фиксированную высоту */
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  /* Кнопки друг под другом */
  .btntu {
    width: 100%;
    text-align: center;
  }

  .hero-overlay {
    /* На мобильных затемняем сильнее и равномернее */
    background: rgba(0, 0, 0, 0.6);
  }
}







/* --- Основные переменные --- */
:root {
  --primary-color: #9c27b0;
  /* Фиолетовый как на скрине */
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #e0e0e0;
}

/* Кнопка для демо */
.demo-btn {
  margin: 50px;
  padding: 10px 20px;
  cursor: pointer;
}

/* --- Обертка-затемнение (Backdrop) --- */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;

  /* Скрываем по умолчанию */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Класс для активного состояния затемнения */
.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Боковая панель корзины --- */
.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  /* Для мобильных устройств */
  height: 100%;
  background-color: var(--bg-color);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;

  /* Прячем за правую границу экрана */
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Класс для активного состояния панели (выезд) */
.cart-overlay.active .cart-drawer {
  transform: translateX(0);
}

/* --- Внутренние элементы --- */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.cart-header h2 {
  margin: 0;
  font-size: 18px;
}

.close-cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.cart-body {
  flex-grow: 1;
  /* Занимает все свободное пространство */
  overflow-y: auto;
  /* Скролл только если товаров много */
  padding: 20px;
}

/* --- Стили товара --- */
.new-cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

/* .new-cart-item img{
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 8px;
} */

.new-cart-item-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 8px;
}

.new-cart-item-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.new-cart-item-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.new-cart-item-title {
  margin: 0;
  font-size: 14px;
  font-weight: normal;
  color: #111;
}

.remove-item-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.new-cart-item-status {
  font-size: 12px;
  color: #00a046;
  /* Зеленый цвет "В наличии" */
  margin-top: 5px;
  margin-bottom: auto;
}

.new-cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.n-qty-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  color: var(--primary-color);
}

.qty-input {
  width: 30px;
  text-align: center;
  border: none;
  font-size: 14px;
}

.new-cart-item-price {
  font-weight: bold;
  font-size: 16px;
}

/* --- Подвал и кнопки --- */
.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-footer button {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cart-footer button:hover {
  opacity: 0.9;
}

.checkout-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

/* .checkout-btn a {
  background-color: var(--primary-color);
  color: white;
  border: none;
} */

.continue-btn {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}


.fotoandinfainitemcart {
  display: flex;
  flex-direction: row;
  gap: 12px;
}


.nashaproduikcia {
  display: flex;
  flex-direction: column;
  padding: 25px;
  gap: 12px;
}

.nashaproduikcia h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nhitovarconteinr {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
}

.mihoroshorabotat {
  display: flex;
  flex-direction: column;
  padding: 25px;
  gap: 12px;
}

.mihoroshorabotat h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dedalinasharabota {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 8px;
}

.dedalinasharabota p {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #000000;
  font-size: 16px;
  font-weight: bold;
}

@media (max-width: 768px) {

  .nhitovarconteinr {
    grid-template-columns: 1fr 1fr;
  }


}