/* 1. Убираем все отступы и границы по умолчанию */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 2. Наследуем шрифт для форм */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* 3. Убираем маркеры списков */
ul,
ol {
    list-style: none;
}

/* 4. Обнуляем ссылки */
a {
    text-decoration: none;
    color: inherit;
}

/* 5. Снимаем оформление у заголовков */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

/* 6. Устанавливаем базовый стиль для body */
body {
    line-height: 1.5;
    font-family: 'Roboto Condensed', sans-serif;
    color: #000;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* 7. Сброс для изображений */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 8. Убираем фокус-стили (если нужны — добавим отдельно) */
:focus {
    outline: none;
}


/*конец блока normalize reset*/

* {
    font-family: 'Roboto Condensed', sans-serif;
}


* {
    font-family: 'Roboto Condensed', sans-serif;
}


.container {
    max-width: 1160px;
    margin: 0 auto;
}

.category-bar {
    background: #fff;
    padding: 12px 0;
    margin: 12px auto 0;
    font-size: 16px;
    max-width: 100%;
}

.category-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0;
    display: flex;
    gap: 32px;
    justify-content: space-between;
    white-space: nowrap;
}

.category-inner a {
    color: #000;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.red {
    color: #C2181F !important;
}

.category-inner a:hover {
    color: #C2181F;
}

.category-inner a.active {
    color: #C2181F; /* красный цвет для "Акции %" */
    font-weight: 400;
}


/*карусель*/

.swiper {
    width: 100%;
    max-width: 1160px;
    height: 320px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 12px;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-pagination-bullet {
    background: #ccc; /* базовый цвет */
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #C2181F; /* активная точка — красная */
}

.swiper-button-prev::after,
.swiper-button-next::after {
    display: none;
}

.swiper-button-prev,
.swiper-button-next {
    background: #fff;
    color: #303030;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.swiper-slide {
    position: relative;
}

.banner-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #C2181F;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.9;
    z-index: 2;
}

.banner-button:hover {
    opacity: 1;
}


/*Часто ищут*/

.popular-searches {
    padding: 40px 0;
    background: #fff;
    width: 100%;
    margin: 0 auto;
}

.popular-title {
    font-size: 24px;
    font-weight: 400;
    color: #222;
    margin-bottom: 20px;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.popular-tags a {
    display: inline-block;
    padding: 8px 16px;
    background: #eee;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease;
}

.popular-tags a:hover {
    background: #ddd;
}


/*карусель брендов*/

.brand-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0;
    background: #fff;
    max-width: 100%;
    margin: 40px 0 auto;
}

.brand-track-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
    flex-shrink: 1;
    user-select: none;
}


.brand-track-wrapper::-webkit-scrollbar {
    display: none;
}

.brand-track {
    display: flex;
    gap: 40px;
}

.brand-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 60px;
    filter: grayscale(1);
    opacity: 0.7;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-item img {
    display: block; /* убираем нижний «зазор» у inline-изображений */
    max-height: 60px; /* <= 80px по высоте */
    max-width: 160px; /* подстраховка от слишком «длинных» логотипов */
    width: auto;
    height: auto;
    object-fit: contain;
    -webkit-user-drag: none; /* чтобы не тянулся «призрак» при перетаскивании */
}

.brand-item:hover {
    opacity: 1;
    filter: grayscale(0);
}

.brand-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.brand-arrow:hover {
    background: #f5f5f5;
}


/*подписка*/
.subscribe-section {
    background: #2d2d2d;
    padding: 24px;
    border-radius: 4px;
    color: #fff;
    font-size: 20px;
    margin-top: 40px;
}

.subscribe-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
}

.subscribe-text {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 20px;
}


.subscribe-text i {
    font-size: 20px;
    background: #fff;
    color: #000;
    padding: 6px;
    border-radius: 4px;
}

.subscribe-form {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    flex-grow: 1;
    max-width: 728px;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    max-width: 360px;
    background-color: #fff;
    color: #303030;
}

.subscribe-form button {
    background: #C2181F;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 228px;
    height: 44px;
}

.subscribe-form button:hover {
    background: #911a1a;
}

.tooltip-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tooltip-text {
    display: none;
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: #fff;
    color: #303030;
    padding: 12px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    z-index: 10;
}

.tooltip-text a {
    color: #C2181F;
    text-decoration: none;
}

.tooltip-text a:hover {
    text-decoration: underline;
}

.tooltip-text.active {
    display: block;
}


/*хиты продаж */

.bestsellers {
    padding: 40px 0 0;
}

.bestsellers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.bestsellers-header h2 {
    font-size: 24px;
    font-weight: 400;
}

.bestsellers-header a {
    font-size: 14px;
    color: #888;
    text-decoration: none;
}

.bestsellers-header a:hover {
    cursor: pointer;
    color: #C2181F;
}


.bestsellers-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.bestsellers-filters button {
    background: #eee;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.bestsellers-filters button:hover {
    opacity: 0.8;
}

.bestsellers-filters .active {
    background: #C2181F;
    color: #fff;
}

.bestsellers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}


/*Карточки*/

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.product-card {
    border: 1px solid #eee;
    padding: 50px 20px 20px;
    position: relative;
    text-align: left;
    transition: box-shadow 0.2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
}


.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 18px;
    font-size: 20px;
    color: #999;
}

.icon-heart {
    width: 20px;
    height: 20px;
    cursor: pointer;
    stroke: #303030;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease, fill 0.2s ease;
}

.icon-heart .heart-path {
    fill: none;
    transition: fill 0.2s ease;
}

.icon-heart:hover {
    stroke: #C2181F;
}

.icon-heart.active {
    stroke: #C2181F;
}

.icon-heart.active .heart-path {
    fill: #C2181F;
}

.product-card img {
    max-height: 120px;
    object-fit: contain;
    max-width: 100%;
}


.product-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 6px;
}

.product-link img {
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
}

.product-link .product-title,
.product-title {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    /* фиксируем высоту и обрезаем до 2 строк */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.3em * 2);
}

.product-link:hover .product-title {
    color: #C2181F;
}

.product-title {
    font-size: 20px;
    font-weight: 400;
}

.product-rating {
    display: flex;
    gap: 2px;
    color: #C2181F;
    font-size: 24px;
}

.product-rating .star {
    color: #C2181F;
}

.product-rating .star.empty {
    color: #ccc;
}

.product-desc {
    font-size: 16px;
    color: #303030;
    line-height: 1.4;
    /* фиксируем высоту и обрезаем до 2 строк */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.4em * 2);
}

.product-article {
    font-size: 14px;
    color: #303030;
}

.product-meta-bottom {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: start;
    font-size: 14px;
    gap: 20px;
}

.product-price {
    font-size: 24px;
    font-weight: 400;
    display: flex;
    gap: 16px;
}

.product-stock {
    color: green;
    font-size: 13px;
}

.product-button {
    margin-top: auto;
    background: #C2181F;
    color: #fff;
    border: none;
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 1;
    width: 100%;
}

.product-button:hover {
    opacity: 0.85;
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-sale {
    background-color: #C2181F;
}

.badge-hit {
    background-color: #3A7A63;
}

.product-prices {
    display: flex;
    flex-direction: column;
}

.product-price-old {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
}

.product-price-save {
    font-size: 12px;
    background: #f3f3f3;
    color: #888;
    padding: 4px 8px;
    border-radius: 4px;
    width: fit-content;
}


/*статьи*/

.article-section {
    padding: 40px 0;
}

.article-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.article-header h2 {
    font-size: 24px;
    font-weight: 400;
}

.article-header a {
    font-size: 20px;
    color: #303030;
    text-decoration: none;
    padding-top: 10px;
}

.article-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.article-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    width: calc(33.333% - 13.33px);
    height: 180px;
    background: #ccc;
}

.article-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card:hover {
    opacity: 0.9;
}

.article-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    color: #fff;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 60%);
    font-size: 13px;
    font-weight: 500;
}

.article-date {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 2px;
    text-shadow: 1px 0 black,
    -1px 0 black,
    0 1px black,
    0 -1px black;
    text-stroke: 1px #000000; /* Толщина и цвет обводки (стандартное свойство) */
}

.article-title {
    line-height: 1.3;
    font-size: 16px;
    /*-webkit-text-stroke: 0.3px #000000; !* Толщина и цвет обводки *!*/
    text-shadow: 1px 0 black,
    -1px 0 black,
    0 1px black,
    0 -1px black;
    text-stroke: 2px #000000; /* Толщина и цвет обводки (стандартное свойство) */
}


.mobile-categories {
    display: none;
}

@media (max-width: 1279px) {
    .container {
        max-width: 944px;
    }

    .category-inner {
        font-size: 16px;
        gap: 20px;
    }

    .subscribe-container {
        gap: 20px;
        flex-wrap: nowrap;
    }

    .email-icon {
        width: 28px;
        height: 29px;
    }

    .subscribe-text {
        gap: 16px;
    }

    .subscribe-text span {
        font-size: 16px;
    }

    .subscribe-form {
        gap: 10px;
    }

    .subscribe-form button {
        max-width: 170px;
    }

    .subscribe-form input[type="email"] {
        padding: 6px 10px;
        font-size: 12px;
    }

}

@media (max-width: 1023px) {

    .container {
        max-width: 96%;
    }

    .category-bar {
        display: none;
    }

    .subscribe-section {
        padding: 12px;
    }

    .subscribe-container {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .subscribe-text span {
        font-size: 14px;
    }

    .subscribe-form input[type="email"] {
        max-height: 32px;
        margin-top: 6px;
    }

    .subscribe-form button {
        max-height: 30px;
        margin-top: 4px;
        vertical-align: center;
        font-size: 12px;
        padding-bottom: 26px;
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .product-price-current {
        font-size: 20px;
    }


}

@media (max-width: 767.98px) {

    .mobile-categories {
        display: block;
    }

    .mobile-categories {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: 16px 0;
        gap: 16px;
        justify-items: center;
    }

    .mobile-category-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        font-size: 14px;
    }

    .mobile-category-item:hover {
        opacity: 0.85;
        cursor: pointer;
    }

    .mobile-category-item img {
        width: 48px;
        height: 48px;
        object-fit: contain;
    }

    .popular-searches {
        padding: 10px 0;
    }

    .swiper {
        height: 220px;
    }

    .subscribe-section {
        display: none;
    }

    .brand-carousel {
        display: none;
    }

    .popular-searches {
        display: none;
    }

    .product-card {
        gap: 8px;
    }

    .product-link img {
        margin-bottom: 0;
    }

    .product-title {
        font-size: 16px;
    }

    .product-desc {
        display: none;
    }

    .product-rating {
        font-size: 16px;
    }

    .product-price-save {
        font-size: 10px;
    }

    .product-meta-bottom {
        gap: 4px;
    }

    .article-section {
        padding: 24px 0;
    }

    .article-card {
        width: calc(50% - 10px);
    }

    .article-card:nth-child(n+3) {
        display: none;
    }

}


@media (max-width: 479px) {

    .swiper {
        height: 140px;
    }

    .swiper-button-next {
        display: none;
    }

    .swiper-button-prev {
        display: none;
    }

    .banner-button {
        font-size: 12px;
        height: 30px;
        width: 70px;
        padding: 0;
    }

    .container {
        max-width: 96%;
    }

    .mobile-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }


    .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 2fr));
    }

    .product-price {
        font-size: 18px;
        font-weight: 400;
        display: flex;
        flex-direction: column-reverse;
        gap: 2px;
        margin-bottom: 4px;
    }
}


/* лёгкая тряска при ошибке */
.icon-heart.shake { animation: fav-shake 0.4s; }
@keyframes fav-shake {
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.product-prices{
  /* место под: текущую цену + старую цену + "Экономия" */
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 72px;            /* десктоп */
}

@media (max-width: 479px){
  .product-prices{ min-height: 80px; } /* на мобиле цены у тебя меньше */
}

.mobile-category-item span {
    color: #303030;
}

.mobile-category-item span:hover{
    color: #303030;
    opacity: 0.85;
}