body {
  margin: 0;                                /* убираем стандартные отступы браузера */
  font-family: 'Segoe UI', sans-serif;      /* задаём шрифт */
  background: #fafafa;                    /* светлый фон страницы */
  color: #111;                            /* основной цвет текста (почти чёрный) */
}

/* ===== HEADER (шапка сайта) ===== */
.header {
  display: flex;                            /* делаем flex-контейнер */
  justify-content: space-between;           /* распределяем элементы по краям */
  padding: 20px 40px;                       /* внутренние отступы */
  background: white;                      /* белый фон */
  border-bottom: 1px solid #eee;          /* тонкая линия снизу */
}

.logo {
  font-weight: bold;                        /* жирный текст */
  letter-spacing: 2px;                      /* расстояние между буквами */
}

nav a {
  margin-left: 20px;                        /* отступ слева между ссылками */
  text-decoration: none;                    /* убираем подчёркивание */
  color: #111;                            /* цвет ссылок */
}

/* ===== HERO (главный экран) ===== */
.hero {
    height: 70svh; /* высота блока — 70% высоты экрана */
    background: linear-gradient(to bottom, #000000aa, #000000aa), 
                url("/images/greatimage.jfif"); /* затемнение + фоновое изображение */
    background-size: cover; /* картинка растягивается на весь блок */
    background-position: center; /* ВАЖНО: центрирует изображение */
    background-repeat: no-repeat; /* убирает повтор */
    background-attachment: fixed; /* эффект "дорогого" сайта статичная картинка и окна скользят по ней*/
    color: white; /* белый текст */
    display: flex; /* flex-контейнер */
    flex-direction: column; /* элементы сверху вниз */
    justify-content: center; /* выравнивание по вертикали */
    align-items: center; /* выравнивание по горизонтали */
    text-align: center; /* чтобы текст тоже был по центру */
}

@media (hover: none), (pointer: coarse) {
    .hero {
        background-attachment: scroll;
    }
}

.hero h1 {
  font-size: 50px;                                                                  /* большой заголовок */
  margin: 0;                                                                        /* убираем отступы */
}

.hero p {
  margin: 10px 0;                                                                   /* отступ сверху и снизу */
}

.btn {
  background: white;                                                              /* белый фон */
  color: black;                                                                   /* чёрный текст */
  padding: 12px 25px;                                                               /* внутренние отступы */
  text-decoration: none;                                                            /* без подчёркивания */
  margin-top: 20px;                                                                 /* отступ сверху */ 
}

/* ===== ABOUT (о нас) ===== */
.about {
    max-width: 800px; /* максимальная ширина */
    margin: 80px auto; /* центрирование + отступы сверху/снизу */
    text-align: center; /* текст по центру */
    padding: 0 20px;
    line-height: 1.7;
}

/* ===== CATALOG (каталог товаров) ===== */
.title {
  text-align: center;                   /* заголовок по центру */
  margin-top: 40px;                     /* отступ сверху */
}

.products {
  display: grid;                                                      /* сетка */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));        /* адаптивные колонки (минимум 250px) */
  padding: 40px;                                                      /* внутренние отступы */
  gap: 30px;                                                          /* расстояние между карточками */
  position: relative;
  z-index: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

    .product:hover .img {
        transform: scale(1.05);
    }



.img { /* ===== Картинка товара ===== */
    width: 100%; /* на всю ширину */
    height: 320px; /* фиксированная высота */
    object-fit: cover; /* обрезка изображения без искажений */
    border-radius: 12px; /* скругление углов */
    display: block; /* убираем лишние отступы */
    transition: transform 0.5s ease;
}

.image-container {
    overflow: hidden;
    border-radius: 12px;
}

.desc { /* ===== Описание товара ===== */
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    min-height: 40px;
}

.buy { /* ===== Кнопка купить на озон ===== */
    display: block; /* блочный элемент */
    margin-top: auto; /* отступ сверху */
    text-decoration: none; /* без подчёркивания */
    background: black; /* чёрный фон */
    color: white; /* белый текст */
    text-align: center; /* текст по центру */
    padding: 12px; /* внутренние отступы */
    border-radius: 12px; /* скругление кнопки */
    transition: background 0.3s ease, transform 0.3s ease; /* плавная анимация */
}

.buy:hover {
    background: #333;
    transform: translateY(-3px);
}

.product { /* ===== Анимация появления карточек ===== */
    opacity: 0; /* изначально невидимы */
    transform: translateY(20px); /* смещены вниз */
    animation: fadeInUp 0.6s forwards; /* запускаем анимацию */
    position: relative;
    overflow: hidden; /* ВАЖНО */
    display: flex;
    flex-direction: column;
    background: white;
    padding: 15px;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .product h3 {
        margin: 10px 0 2px 0;
        font-size: 18px;
        transition: 0.3s;
    }

    .product:hover h3 {
        letter-spacing: 0.5px;
    }

/* ===== СЛАЙДЕР карточек товаров ===== */
.slider {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: 12px;
  
}

/* картинки */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slide.active {
  opacity: 1;
}

/* зоны */
.hover-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 33.333%;
  z-index: 5;
}

.hover-zone:nth-child(4) { left: 0; }
.hover-zone:nth-child(5) { left: 33.333%; }
.hover-zone:nth-child(6) { left: 66.666%; }

/* шкала */
.dots {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
}

.dot {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}

.dot.active {
  background: white;
}

.btn-buy {
  margin-top: 10px;
  padding: 10px;
  width: 100%;
  background: black;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-buy:hover {
  background: #333;
}


/* ===== СТРАНИЦА ТОВАРА ===== */
.product-page {
  display: flex;
  gap: 40px;
  padding: 40px;
}

.big-img {
  width: 400px;
  border-radius: 12px;
}

.info {
  max-width: 400px;
}

.back {
  display: inline-block;
  margin: 20px;
  text-decoration: none;
  color: black;
}               /*Конец слайдшоу карточек*/

@keyframes fadeInUp { /* ===== Ключевые кадры анимации ===== */
  to {
    opacity: 1;                           /* становится видимым */
    transform: translateY(0);             /* возвращается на место */
  }
}


#filters button {
  margin: 5px;
  padding: 10px 15px;
  border: none;
  background: black;
  color: white;
  border-radius: 20px;
  cursor: pointer;
}

#filters button:hover {
  background: #333;
}


#filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

#filters .buy {
  display: inline-block;  /* вместо block */
  width: auto;            /* не растягивать */
  padding: 10px 20px;
}


.categories {
  display: flex;              /* ВАЖНО: делает горизонтально */
  gap: 10px;                  /* расстояние между кнопками */
  flex-wrap: wrap;            /* перенос на новую строку если не влезают */
  justify-content: center;    /* по центру */
  margin: 20px;
}

.category {
    font-size: 12px;
    color: #999;
    margin-top: -4px;
    margin-bottom: 5px;
    font-style: italic;
}

.category-btn {
  display: inline-block;
  background: black;
  color: white;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: 0.3s;
}

.category-btn:hover {
  background: #333;
}

.category-btn.active {
  background: #555;
}

input,
select {
  width: 200px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  outline: none;
  transition: 0.2s;
  background: white;
  appearance: none; /* убирает стандартный стиль */
  cursor: pointer;
}

/* эффект как у input */
input:focus,
select:focus {
  border-color: black;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}


.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: rgba(25,25,25,.96);
    color: white;
    border-radius: 14px;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    animation: cookieShow .4s ease;
    z-index: 9999;
}

.cookie-text {
    font-size: 14px;
    line-height: 1.5;
}

    .cookie-text a {
        color: white;
        text-decoration: underline;
    }

.cookie-btn {
    background: white;
    color: black;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: .25s;
}

.cookie-btn:hover {
        background: #ececec;
}

.cookie-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
    color: inherit;
}

    .cookie-link:hover {
        opacity: .7;
    }

@keyframes cookieShow {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width:700px) {

    .cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-btn {
        width: 100%;
    }
}


/* ===== PRIVACY MODAL ===== */

.privacy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fade .2s ease;
}

.privacy-window {
    width: min(900px, 95vw);
    height: min(85vh, 900px);
    background: white;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(0,0,0,.25);
    overflow: hidden;
    animation: popup .25s ease;
}

/* Шапка окна */

.privacy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}

    .privacy-header h2 {
        margin: 0;
        font-size: 20px;
    }

/* Кнопка закрытия */

.close-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    transition: .2s;
}

    .close-btn:hover {
        transform: scale(1.15);
    }

/* Тело политики */

.privacy-body {
    overflow-y: auto;
    padding: 30px;
    line-height: 1.7;
}

    /* Заголовок документа */

    .privacy-body h1 {
        margin-top: 0;
        font-size: 32px;
        text-align: center;
    }

    /* Разделы */

    .privacy-body h2 {
        margin-top: 35px;
        margin-bottom: 15px;
        font-size: 22px;
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
    }

    /* Обычный текст */

    .privacy-body p {
        color: #444;
        margin: 12px 0;
        line-height: 1.8;
    }

    /* Списки */

    .privacy-body ul {
        padding-left: 25px;
    }

    .privacy-body li {
        margin: 8px 0;
    }

/* Подпись */

.privacy-sign {
    margin-top: 40px;
}

/* Анимации */

@keyframes fade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


@keyframes popup {

    from {
        opacity: 0;
        transform: translateY(20px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Мобильные устройства */

@media(max-width:768px) {

    .privacy-window {
        width: 95vw;
        height: 90vh;
        border-radius: 12px;
    }

    .privacy-header {
        padding: 18px;
    }

    .privacy-body {
        padding: 20px;
    }

        .privacy-body h1 {
            font-size: 24px;
        }

        .privacy-body h2 {
            font-size: 19px;
        }
}


.footer {
    width: 100%;
    padding: 25px 40px;
    background: white;
    border-top: 1px solid #eee;
    color: #777;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

    .footer p {
        margin: 0;
    }

@media(max-width:700px) {

    .footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}