/* New Items Slider Section (Slider-New) - согласно Figma */

.new-items-section {
    position: relative;
    width: 100%;
    height: 620px;
    background: #FFFFFF;
    overflow: hidden;
}

.new-items-section__wrapper {
    position: relative;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    height: 100%;
}

/* Заголовок - согласно Figma: x: 172px, y: 74px, размер 24px, SemiBold */
.new-items-section__header {
    position: absolute;
    top: 74px;
    left: 172px;
    width: 167px;
    height: 40px;
    background: #FFFFFF;
    z-index: 10;
}

.new-items-section__title {
    position: absolute;
    left: 7px;
    top: 5px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: #0C181A;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

/* Ссылка "Смотреть все" - согласно Figma: x: 1482px, y: 80px, размер 14px, Regular */
.new-items-section__view-all {
    position: absolute;
    top: 80px;
    left: 1482px;
    padding-bottom: 0;
    width: 98px;
    height: 19px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    color: #0C181A;
    text-decoration: none;
    border-bottom: 1px solid #0C181A;
    padding-bottom: 0;
    z-index: 10;
    transition: opacity 0.2s ease;
}

.new-items-section__view-all:hover {
    opacity: 0.7;
}

/* Стрелки навигации - согласно Figma: x: 1654px, y: 70px, размер 40x40px */
.new-items-section__arrows {
    position: absolute;
    top: 70px;
    left: 1654px;
    width: 86px;
    height: 40px;
    display: flex;
    gap: 6px;
    align-items: center;
    z-index: 10;
}

.new-items-section__arrow {
    width: 40px;
    height: 40px;
    border: 0.5px solid #0C181A;
    border-radius: 60px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.new-items-section__arrow:hover {
    opacity: 0.7;
    background-color: #F5F5F5;
}

.new-items-section__arrow svg {
    width: 16px;
    height: 16px;
}

/* Слайдер - согласно Figma: x: 172px, y: 12px, ширина: 2318px, высота: 368px */
.new-items-section__slider {
    position: absolute;
    top: 126px;
    left: 0;
    width: 100%;
    height: 404px;
    overflow: hidden;
}

.new-items-section__slider-container {
    position: absolute;
    top: 12px;
    left: 172px;
    display: flex;
    gap: 10px;
    width: calc(2318px + 60px); /* 2318px + padding-right 60px */
    padding-right: 60px;
    transition: transform 0.3s ease;
}

/* Карточка товара - согласно Figma: 368x368px */
.new-items-card {
    flex-shrink: 0;
    width: 368px;
    height: 368px;
    background: #FFFFFF;
    box-sizing: border-box;
}

.new-items-card__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.new-items-card__image {
    width: 352px;
    height: 250px;
    margin: 8px 8px 0 8px;
    overflow: hidden;
    background: #F5F5F5;
}

.new-items-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.new-items-card__content {
    width: 352px;
    height: 94px;
    margin: 0 8px 20px 8px;
    padding: 0;
    background: #FAFAFA;
    box-sizing: border-box;
}

.new-items-card__text {
    position: relative;
    left: 20px;
    top: 18px;
    width: 319px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.new-items-card__title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: #0C181A;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.new-items-card__price {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #0C181A;
    margin: 0;
    padding: 0;
    height: 20px;
    white-space: nowrap;
}

/* Линия внизу - согласно Figma: x: 180px, y: 532px, ширина: 1652px */
.new-items-section__line {
    position: absolute;
    top: 532px;
    left: 180px;
    width: 1652px;
    height: 1px;
    background: #DEDEDE;
    z-index: 5;
}

.new-items-section__line-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 460px;
    height: 2px;
    background: #0C181A;
    transition: left 0.3s ease, width 0.3s ease;
}

/* Responsive */
@media screen and (max-width: 1919px) {
    .new-items-section__header {
        left: clamp(20px, 8.96%, 172px);
    }
    
    .new-items-section__view-all {
        left: clamp(20px, 77.2%, 1482px);
    }
    
    .new-items-section__arrows {
        left: clamp(20px, 86.15%, 1654px);
    }
    
    .new-items-section__slider-container {
        left: clamp(20px, 8.96%, 172px);
        width: calc(100vw - clamp(20px, 8.96%, 172px) * 2);
    }
    
    .new-items-section__line {
        left: clamp(20px, 9.38%, 180px);
        width: calc(100vw - clamp(20px, 9.38%, 180px) * 2);
    }
}

@media screen and (max-width: 1199px) {
    .new-items-section {
        height: clamp(500px, 52vh, 620px);
    }
    
    .new-items-card {
        width: clamp(280px, 30vw, 368px);
        height: clamp(280px, 30vw, 368px);
    }
    
    .new-items-card__image {
        width: calc(100% - 16px);
        height: calc((100% - 16px) * 0.68);
    }
    
    .new-items-card__content {
        width: calc(100% - 16px);
        height: calc((100% - 16px) * 0.26);
    }
}

@media screen and (max-width: 959px) {
    .new-items-section__header {
        top: clamp(40px, 12%, 74px);
    }
    
    .new-items-section__view-all {
        top: clamp(46px, 13%, 80px);
    }
    
    .new-items-section__arrows {
        top: clamp(36px, 11%, 70px);
    }
    
    .new-items-section__slider {
        top: clamp(80px, 20%, 126px);
    }
}

/* Mobile (640px и меньше) */
@media screen and (max-width: 639px) {
    .new-items-section {
        height: auto;
        min-height: 500px;
        padding: 40px 20px 60px;
    }
    
    .new-items-section__wrapper {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    
    .new-items-section__header {
        position: static;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }
    
    .new-items-section__title {
        position: static;
        font-size: 20px;
        margin: 0;
    }
    
    .new-items-section__view-all {
        position: static;
        font-size: 12px;
        margin: 0;
    }
    
    .new-items-section__arrows {
        position: static;
        order: -1;
        align-self: flex-end;
        margin-bottom: -40px;
    }
    
    .new-items-section__slider {
        position: static;
        width: 100%;
        margin-top: 0;
    }
    
    .new-items-section__slider-container {
        position: static;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .new-items-section__slider-container::-webkit-scrollbar {
        display: none;
    }
    
    .new-items-card {
        width: 280px;
        min-width: 280px;
        height: 280px;
        scroll-snap-align: start;
    }
    
    .new-items-card__image {
        width: calc(100% - 16px);
        height: calc((100% - 16px) * 0.68);
    }
    
    .new-items-card__content {
        width: calc(100% - 16px);
        height: calc((100% - 16px) * 0.26);
    }
}

/* Small Mobile (480px и меньше) */
@media screen and (max-width: 479px) {
    .new-items-section {
        padding: 32px 16px 48px;
        min-height: 450px;
    }
    
    .new-items-section__wrapper {
        gap: 20px;
    }
    
    .new-items-section__title {
        font-size: 18px;
    }
    
    .new-items-section__view-all {
        font-size: 11px;
    }
    
    .new-items-card {
        width: 240px;
        min-width: 240px;
        height: 240px;
    }
}

