/* main.css — основные стили для всех страниц, десктопная версия (mobile-first, но здесь упор на десктоп) */

/* ---------- Переменные и глобальные настройки ---------- */
:root {
    --yellow: #fed602;           /* Акцентный желтый (лого, кнопки) */
    --turquoise: #00bfb2;        /* Дополнительный бирюзовый (акции, услуги) */
    --dark: #2a2a2a;             /* Основной цвет текста */
    --gray: #757575;              /* Второстепенный текст */
    --light-gray: #f8f9fa;        /* Фоновый светло-серый */
    --white: #ffffff;
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.05);    /* Легкая тень */
    --shadow-md: 0 10px 25px rgba(0,0,0,0.07);
    --shadow-lg: 0 20px 35px rgba(0,0,0,0.1);
    --glass-bg: rgba(255,255,255,0.7);           /* Полупрозрачный фон для "стеклянного" эффекта */
    --glass-border: 1px solid rgba(255,255,255,0.2);
    --border-radius: 12px;        /* Основной радиус скругления */
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--yellow);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Контейнер для выравнивания контента */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------- Шапка (header) ---------- */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);          /* Стеклянный эффект */
    background: var(--glass-bg);
    border-bottom: var(--glass-border);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;                          /* Фиксированная высота шапки */
}

.header__logo-img {
    height: 50px;
}

/* Выбор города (стилизованный селект) */
.header__city {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header__city-select {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    outline: none;
}

/* Поисковая строка */
.header__search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.header__search-form {
    display: flex;
    background: var(--light-gray);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.05), inset -3px -3px 6px rgba(255,255,255,0.7);
}

.header__search-input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.header__search-btn {
    background: transparent;
    border: none;
    padding: 0 15px;
    cursor: pointer;
}

/* Контактный телефон */
.header__phone-link {
    font-weight: 700;
    font-size: 18px;
    color: var(--dark);
}

/* Иконки (избранное, корзина) */
.header__icons {
    display: flex;
    gap: 15px;
}

.header__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--dark);
    transition: stroke 0.2s;
}

.header__icon:hover svg {
    stroke: var(--yellow);
}

/* Бургер-меню (скрыто на десктопе) */
.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.header__burger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--dark);
    transition: 0.3s;
}

/* Навигационное меню (категории) */
.header__nav {
    background: var(--light-gray);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.header__menu {
    display: flex;
    list-style: none;
    justify-content: space-between;
    padding: 10px 0;
}

.header__menu li a {
    padding: 8px 12px;
    border-radius: 20px;
    transition: background 0.2s, color 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.header__menu li a:hover {
    background: var(--yellow);
    color: var(--dark);
}

.active {                                 /* Активный пункт меню */
    background: var(--yellow);
}

/* ---------- Подвал (footer) ---------- */
.footer {
    background: var(--light-gray);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 4fr 2fr;
    gap: 30px;
}

.footer__logo-img {
    height: 40px;
    margin-bottom: 15px;
}

.footer__copy {
    font-size: 12px;
    color: var(--gray);
}

.footer__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.footer__nav-col h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-family: 'FuturaFuturisC', sans-serif;
}

.footer__nav-col ul {
    list-style: none;
}

.footer__nav-col li {
    margin-bottom: 8px;
}

.footer__nav-col a {
    color: var(--gray);
    font-size: 14px;
    text-decoration: none;
}

.footer__nav-col a:hover {
    color: var(--yellow);
}

.footer__contacts {
    text-align: right;
}

.footer__phone a {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.footer__email a {
    color: var(--gray);
    font-size: 14px;
}

.footer__social {
    margin-top: 15px;
}

.footer__social a {
    display: inline-block;
}

.footer__social svg {
    width: 24px;
    height: 24px;
    fill: var(--gray);
    transition: fill 0.2s;
}

.footer__social svg:hover {
    fill: var(--yellow);
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    border: none;
    font-size: 14px;
}

.btn--primary {
    background: var(--yellow);
    color: var(--dark);
    box-shadow: 0 5px 15px rgba(254,214,2,0.3);
}

.btn--primary:hover {
    background: #e6c101;           /* Чуть темнее при наведении */
    box-shadow: 0 8px 20px rgba(254,214,2,0.4);
}

.btn--secondary {
    background: var(--white);
    border: 1px solid var(--dark);
}

.btn--large {
    padding: 14px 30px;
    font-size: 16px;
}

/* ---------- Заголовки секций ---------- */
.section-title {
    font-family: 'FuturaFuturisC', sans-serif;
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--yellow);
    margin-top: 10px;
}

/* ---------- Карточка товара (общая) ---------- */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    height: 100%;                     /* Для равной высоты в сетке */
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card__image {
    position: relative;
    aspect-ratio: 1 / 1;              /* Квадратное поле под фото */
    overflow: hidden;
    background: var(--light-gray);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__quick-view {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    background-image: url('/images/icons/quick-view.svg'); /* иконка */
    background-size: 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.product-card:hover .product-card__quick-view {
    opacity: 1;
}

.product-card__info {
    padding: 15px;
}

.product-card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    height: 2.6em;                    /* Ограничение в 2 строки */
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card__price {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.product-card__location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray);
}

.product-card__location svg {
    width: 14px;
    height: 14px;
    fill: var(--yellow);
}

/* ---------- Слайдеры (главная страница) ---------- */
.hero__slider {
    width: 100%;
    height: 400px;
}

.hero__slide {
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
}

.hero__slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);       /* Затемнение для читаемости текста */
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding: 40px;
}

.hero__title {
    font-size: 36px;
    margin-bottom: 20px;
    font-family: 'FuturaFuturisC', sans-serif;
}

.hero__subtitle {
    font-size: 18px;
    margin-bottom: 30px;
}

/* ---------- Популярные категории ---------- */
.categories__grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-card__icon {
    width: 60px;
    margin: 0 auto 10px;
}

.category-card__icon img {
    width: 100%;
    filter: grayscale(100%);
    transition: filter 0.2s;
}

.category-card:hover .category-card__icon img {
    filter: grayscale(0%);
}

.category-card__name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

/* ---------- Услуги ---------- */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.service-card__icon {
    width: 80px;
    margin: 0 auto 20px;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.service-card p {
    color: var(--gray);
    font-size: 14px;
}

/* ---------- Преимущества ---------- */
.advantages__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.advantage-item {
    text-align: center;
}

.advantage-item img {
    width: 80px;
    margin: 0 auto 20px;
}

.advantage-item h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.advantage-item p {
    color: var(--gray);
    font-size: 14px;
}

/* ---------- Отзывы ---------- */
.review-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.review-card__author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.review-card__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review-card__rating {
    color: var(--yellow);
    font-size: 18px;
    margin-bottom: 10px;
}

.review-card__text {
    color: var(--dark);
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Филиалы ---------- */
.branches__map {
    height: 300px;
    background: var(--light-gray);
    margin-bottom: 20px;
}

.branches__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.branch-item {
    background: var(--light-gray);
    padding: 15px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumb {
    padding: 20px 0;
    background: var(--light-gray);
    margin-bottom: 30px;
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--dark);
    font-weight: 500;
}

/* ---------- Страница каталога ---------- */
.catalog__container {
    display: flex;
    gap: 30px;
}

.catalog__sidebar {
    flex: 0 0 260px;                   /* Фиксированная ширина фильтра */
}

.filter-block {
    margin-bottom: 30px;
}

.filter-block h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.filter-range {
    display: flex;
    gap: 10px;
}

.filter-input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-form label {
    display: block;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 14px;
}

.catalog__content {
    flex: 1;
}

.catalog__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.catalog__sort select {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: var(--white);
    cursor: pointer;
}

.catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Пагинация */
.catalog__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination__page,
.pagination__prev,
.pagination__next {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--light-gray);
    color: var(--dark);
    transition: background 0.2s;
}

.pagination__page.active,
.pagination__page:hover,
.pagination__prev:hover,
.pagination__next:hover {
    background: var(--yellow);
}

/* ---------- Карточка товара (детальная) ---------- */
.product__container {
    display: flex;
    gap: 40px;
}

.product__gallery {
    flex: 1;
}

.product__main-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 15px;
}

.product__main-image img {
    width: 100%;
    height: auto;
}

.product__thumbs {
    display: flex;
    gap: 10px;
}

.product__thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.product__thumbs img:hover,
.product__thumbs img.active {
    opacity: 1;
}

.product__info {
    flex: 1;
}

.product__title {
    font-size: 28px;
    margin-bottom: 20px;
    font-family: 'FuturaFuturisC', sans-serif;
}

.product__price {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

.product__condition,
.product__code {
    margin-bottom: 10px;
    font-size: 14px;
}

.product__location {
    background: var(--light-gray);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.product__map-link {
    color: var(--yellow);
    text-decoration: underline;
    margin-left: 10px;
}

.product__actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.product__favorite {
    background: none;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
}

.product__favorite svg {
    width: 100%;
    height: 100%;
    stroke: var(--dark);
    fill: none;
}

.product__favorite:hover svg {
    stroke: var(--yellow);
}

.product__benefits {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    color: var(--gray);
    font-size: 14px;
}

/* Табы на странице товара */
.tabs__nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tabs__btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: border-color 0.2s;
}

.tabs__btn.active {
    border-bottom-color: var(--yellow);
}

.tabs__pane {
    display: none;
}

.tabs__pane.active {
    display: block;
}

.tabs__pane ul {
    list-style: disc;
    padding-left: 20px;
}

/* ---------- Информационная страница ---------- */
.info__container {
    display: flex;
    gap: 40px;
}

.info__sidebar {
    flex: 0 0 200px;
}

.info__menu {
    list-style: none;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 15px;
}

.info__menu li {
    margin-bottom: 10px;
}

.info__menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background 0.2s;
}

.info__menu a.active,
.info__menu a:hover {
    background: var(--yellow);
}

.info__content {
    flex: 1;
}

.info__content h1 {
    margin-bottom: 20px;
    font-family: 'FuturaFuturisC', sans-serif;
}

.info__content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.info__content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

/* ---------- Контакты ---------- */
.contacts__map {
    margin-bottom: 30px;
}

.contacts__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.contacts__form {
    max-width: 600px;
}

.contacts__form h2 {
    margin-bottom: 20px;
    font-family: 'FuturaFuturisC', sans-serif;
}

.contacts__form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contacts__form input,
.contacts__form textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
}

.contacts__form textarea {
    border-radius: 20px;
    resize: vertical;
}