.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.hero-slider-viewport {
    overflow: hidden;
}

.hero-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.hero-slide {
    min-width: 100%;
    flex: 0 0 100%;
    position: relative;
    display: block;
    color: #fff;
    text-decoration: none;
}

.hero-slide img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.hero-slider-prev {
    left: 12px;
}

.hero-slider-next {
    right: 12px;
}

.hero-slider-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.hero-dot.active {
    opacity: 1;
}

.hero-slider-progress {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    height: 4px;
}

.hero-progress-bar {
    height: 100%;
    width: 0;
}
.hero-slider {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.hero-slider-viewport {
    overflow: hidden;
    width: 100%;
}

.hero-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.hero-slide {
    min-width: 100%;
    flex: 0 0 100%;
    position: relative;
    display: block;
    text-decoration: none;
    color: #fff;
}

.hero-slide img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.promo-slide-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px;
    background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.15), transparent);
}

.promo-slide-content h3 {
    margin: 0 0 8px;
    font-size: 26px;
}

.promo-slide-content p {
    margin: 0;
    font-size: 15px;
}

.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
}

.hero-slider-prev {
    left: 12px;
}

.hero-slider-next {
    right: 12px;
}

.hero-slider-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-slider-dots button {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    padding: 0;
}

.hero-slider-dots button.active {
    background: #fff;
}
.carousel-container {
    position: relative;
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: calc((100% - 40px) / 3);
    box-sizing: border-box;
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.product-image {
    display: block;
    width: 100%;
    height: 180px;
    background: #f7f7f7;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.product-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
    min-height: 48px;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-desc {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.btn-cart {
    flex: 0 0 auto;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    padding: 0;
}

.carousel-dot.active {
    background: rgba(0,0,0,0.7);
}

@media (max-width: 1200px) {
    .carousel-item {
        flex: 0 0 calc((100% - 20px) / 2);
        min-width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .product-image {
        height: 220px;
    }
}
/* ===== MOBILE FIX INDEX.CSS ===== */

@media (max-width: 768px) {

    /* Слайдер */
    .hero-slider {
        border-radius: 16px;
    }

    .hero-slide img {
        height: 220px !important;
    }

    .promo-slide-content {
        padding: 16px;
    }

    .promo-slide-content h3 {
        font-size: 18px;
    }

    .promo-slide-content p {
        font-size: 13px;
    }

    .hero-slider-arrow {
        width: 36px;
        height: 36px;
    }

    /* Карусель */
    .carousel-track {
        gap: 12px;
    }

    .carousel-item {
        flex: 0 0 100% !important;
        min-width: 100% !important;
    }

    .product-image {
        height: 200px;
    }

    .product-title {
        font-size: 16px;
        min-height: auto;
    }

    .product-desc {
        font-size: 13px;
        min-height: auto;
    }

    .product-price {
        font-size: 18px;
    }

    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .btn-cart {
        width: 100%;
    }
}

/* маленькие телефоны */
@media (max-width: 480px) {

    .hero-slide img {
        height: 180px !important;
    }

    .promo-slide-content h3 {
        font-size: 16px;
    }

    .promo-slide-content p {
        font-size: 12px;
    }

    .product-image {
        height: 180px;
    }

    .product-title {
        font-size: 15px;
    }

    .product-price {
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 75%;
        height: 100vh;
        background: #fff;
        padding: 80px 20px 20px;
        transition: 0.3s;
        z-index: 1000;
        display: block !important;
    }

    .main-nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .nav-link {
        font-size: 16px;
        width: 100%;
    }
}
/* ===== MENU TOGGLE ===== */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .header-container {
        position: relative;
        min-height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        border: 2px solid var(--accent-color);
        border-radius: 10px;
        background: #fff;
        color: var(--accent-color);
        font-size: 18px;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 2px 2px 0 var(--accent-color);
        transition: 0.2s;
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .header-contacts {
        display: none !important;
    }

    .cart-icon {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .main-nav {
        display: block !important;
        position: fixed;
        top: 0;
        left: -100%;
        width: 78%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        padding: 80px 20px 20px;
        transition: left 0.3s ease;
        z-index: 1001;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
        margin: 0 !important;
    }

    .main-nav.active {
        left: 0;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 12px 10px;
        text-align: left;
        font-size: 16px;
    }
}