/* New Arrivals Section Styles - BEM Methodology */

.new-arrivals {
    width: 100%;
    padding: 100px 20px;
    background-color: #ffffff;
    direction: ltr;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    position: relative;
}

.new-arrivals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.new-arrivals.new-arrivals--visible {
    opacity: 1;
    transform: translateY(0);
}

.new-arrivals__container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.new-arrivals__title {
    font-size: 32px;
    font-weight: 600;
    color: #000000;
    text-align: center !important;
    margin: 0 auto 60px auto !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    width: 100%;
    display: block;
    position: relative;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
    will-change: opacity, transform;
}

.new-arrivals--visible .new-arrivals__title {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.new-arrivals__title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80px;
    height: 2px;
    background-color: #000000;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

.new-arrivals--visible .new-arrivals__title::after {
    transform: translateX(-50%) scaleX(1);
}

.new-arrivals__grid {
    display: flex;
    gap: 15px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #000000 #f0f0f0;
}

.new-arrivals__grid::-webkit-scrollbar {
    height: 6px;
}

.new-arrivals__grid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.new-arrivals__grid::-webkit-scrollbar-thumb {
    background: #000000;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.new-arrivals__grid::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

.new-arrivals__item {
    flex: 0 0 calc(20% - 12px);
    min-width: 250px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.new-arrivals--visible .new-arrivals__item {
    opacity: 1;
    transform: translateY(0);
}

.new-arrivals--visible .new-arrivals__item:nth-child(1) { transition-delay: 0.1s; }
.new-arrivals--visible .new-arrivals__item:nth-child(2) { transition-delay: 0.2s; }
.new-arrivals--visible .new-arrivals__item:nth-child(3) { transition-delay: 0.3s; }
.new-arrivals--visible .new-arrivals__item:nth-child(4) { transition-delay: 0.4s; }
.new-arrivals--visible .new-arrivals__item:nth-child(5) { transition-delay: 0.5s; }
.new-arrivals--visible .new-arrivals__item:nth-child(6) { transition-delay: 0.6s; }
.new-arrivals--visible .new-arrivals__item:nth-child(7) { transition-delay: 0.7s; }
.new-arrivals--visible .new-arrivals__item:nth-child(8) { transition-delay: 0.8s; }

.new-arrivals__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.new-arrivals__link:hover {
    transform: translateY(-8px);
}

.new-arrivals__image-wrapper {
    width: 100%;
    height: 422px;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    margin-bottom: 15px;
}

.new-arrivals__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.new-arrivals__image--main {
    opacity: 1;
}

.new-arrivals__image--gallery {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.new-arrivals__item:hover .new-arrivals__image--main {
    opacity: 0;
}

.new-arrivals__item:hover .new-arrivals__image--gallery {
    opacity: 1;
}

.new-arrivals__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-arrivals__badge {
    position: absolute;
    top: 15px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
    background-color: #000000;
    color: #ffffff;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.new-arrivals__badge--new {
    left: 15px;
    background-color: #000000;
    animation: newBadgePulse 2s ease-in-out infinite;
}

@keyframes newBadgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
    }
}

.new-arrivals__badge--sale {
    left: 15px;
    top: 50px;
    background-color: #ffffff;
    color: #000000;
}

.new-arrivals__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.new-arrivals__link:hover .new-arrivals__overlay {
    opacity: 1;
}

.new-arrivals__overlay-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.new-arrivals__link:hover .new-arrivals__overlay-text {
    transform: translateY(0);
}

.new-arrivals__content {
    text-align: left;
    padding: 10px 0;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.new-arrivals__link:hover .new-arrivals__content {
    transform: translateY(-5px);
    color: #808080;
}

.new-arrivals__product-title {
    font-size: 15px;
    font-weight: 400;
    color: #000000;
    margin: 0 0 8px 0;
    letter-spacing: 0.3px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.new-arrivals__link:hover .new-arrivals__product-title {
    color: #808080;
}

.new-arrivals__price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

.new-arrivals__price del {
    color: #999999;
    font-weight: 400;
    margin-right: 5px;
}

.new-arrivals__price ins {
    text-decoration: none;
    color: #000000;
}

/* Responsive Styles */

/* Large Devices (Desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .new-arrivals {
        padding: 80px 20px;
    }

    .new-arrivals__item {
        flex: 0 0 calc(25% - 12px);
    }
}

/* Medium Devices (Tablets, less than 992px) */
@media (max-width: 991.98px) {
    .new-arrivals {
        padding: 70px 20px;
    }

    .new-arrivals__title {
        font-size: 28px;
        margin-bottom: 50px !important;
    }

    .new-arrivals__item {
        flex: 0 0 calc(33.333% - 10px);
        min-width: 220px;
    }

    .new-arrivals__image-wrapper {
        height: 380px;
    }
}

/* Small Devices (Landscape Phones, less than 768px) */
@media (max-width: 767.98px) {
    .new-arrivals {
        padding: 60px 15px !important;
    }

    .new-arrivals__container {
        max-width: 100% !important;
    }

    .new-arrivals__title {
        font-size: 24px !important;
        letter-spacing: 1.5px !important;
        margin-bottom: 40px !important;
        text-align: center !important;
    }

    .new-arrivals__grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding-bottom: 0 !important;
        width: 100% !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .new-arrivals__grid::-webkit-scrollbar {
        display: none !important;
    }

    .new-arrivals__item {
        flex: none !important;
        width: 100% !important;
        min-width: auto !important;
        max-width: 100% !important;
        opacity: 0 !important;
        transform: translateY(20px) scale(0.95) !important;
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important,
                    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .new-arrivals--visible .new-arrivals__item {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
    }

    .new-arrivals--visible .new-arrivals__item:nth-child(1) { transition-delay: 0.05s !important; }
    .new-arrivals--visible .new-arrivals__item:nth-child(2) { transition-delay: 0.1s !important; }
    .new-arrivals--visible .new-arrivals__item:nth-child(3) { transition-delay: 0.15s !important; }
    .new-arrivals--visible .new-arrivals__item:nth-child(4) { transition-delay: 0.2s !important; }
    .new-arrivals--visible .new-arrivals__item:nth-child(5) { transition-delay: 0.25s !important; }
    .new-arrivals--visible .new-arrivals__item:nth-child(6) { transition-delay: 0.3s !important; }
    .new-arrivals--visible .new-arrivals__item:nth-child(7) { transition-delay: 0.35s !important; }
    .new-arrivals--visible .new-arrivals__item:nth-child(8) { transition-delay: 0.4s !important; }

    .new-arrivals__link {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        background: #ffffff !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        position: relative !important;
    }

    .new-arrivals__link::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%) !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
        z-index: 1 !important;
        pointer-events: none !important;
    }

    .new-arrivals__link:active {
        transform: scale(0.97) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }

    .new-arrivals__link:active::before {
        opacity: 1 !important;
    }

    .new-arrivals__image-wrapper {
        height: 280px !important;
        margin-bottom: 12px !important;
        border-radius: 8px 8px 0 0 !important;
        overflow: hidden !important;
        position: relative !important;
        background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
    }

    .new-arrivals__image {
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
        will-change: transform !important;
    }

    .new-arrivals__link:active .new-arrivals__image {
        transform: scale(1.08) !important;
    }

    /* Touch feedback for mobile */
    @media (hover: none) and (pointer: coarse) {
        .new-arrivals__link:active {
            transform: scale(0.95) !important;
        }
    }

    .new-arrivals__badge {
        top: 10px !important;
        left: 10px !important;
        font-size: 9px !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
    }

    .new-arrivals__badge--sale {
        top: 40px !important;
        left: 10px !important;
    }

    .new-arrivals__overlay {
        display: none !important;
    }

    .new-arrivals__content {
        padding: 0 12px 12px 12px !important;
        text-align: center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .new-arrivals__product-title {
        font-size: 13px !important;
        text-align: center !important;
        margin-bottom: 6px !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: 2 !important;
        font-weight: 500 !important;
        color: #1a1a1a !important;
    }

    .new-arrivals__price {
        font-size: 13px !important;
        justify-content: center !important;
        font-weight: 700 !important;
        color: #000000 !important;
    }

    .new-arrivals__price del {
        font-size: 11px !important;
        opacity: 0.6 !important;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .new-arrivals {
        padding: 50px 10px !important;
    }

    .new-arrivals__title {
        font-size: 20px !important;
        letter-spacing: 1px !important;
        margin-bottom: 30px !important;
        text-align: center !important;
    }

    .new-arrivals__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .new-arrivals__item {
        width: 100% !important;
        min-width: auto !important;
    }

    .new-arrivals__link {
        border-radius: 6px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    }

    .new-arrivals__image-wrapper {
        height: 240px !important;
        margin-bottom: 10px !important;
        border-radius: 6px 6px 0 0 !important;
    }

    .new-arrivals__badge {
        font-size: 8px !important;
        padding: 3px 6px !important;
        top: 8px !important;
        left: 8px !important;
        border-radius: 3px !important;
    }

    .new-arrivals__badge--sale {
        top: 35px !important;
        left: 8px !important;
    }

    .new-arrivals__content {
        padding: 0 10px 10px 10px !important;
    }

    .new-arrivals__product-title {
        font-size: 12px !important;
        margin-bottom: 5px !important;
    }

    .new-arrivals__price {
        font-size: 12px !important;
    }
}

/* Very Small Devices (Small Phones, less than 375px) */
@media (max-width: 374.98px) {
    .new-arrivals {
        padding: 40px 8px !important;
    }

    .new-arrivals__title {
        font-size: 18px !important;
        margin-bottom: 25px !important;
    }

    .new-arrivals__grid {
        gap: 8px !important;
    }

    .new-arrivals__image-wrapper {
        height: 220px !important;
    }

    .new-arrivals__product-title {
        font-size: 11px !important;
    }

    .new-arrivals__price {
        font-size: 11px !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .new-arrivals__link {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
        tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    }

    .new-arrivals__item:hover .new-arrivals__image--main,
    .new-arrivals__item:hover .new-arrivals__image--gallery {
        opacity: 1 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .new-arrivals,
    .new-arrivals__title,
    .new-arrivals__item,
    .new-arrivals__link,
    .new-arrivals__image,
    .new-arrivals__badge {
        transition: none !important;
        animation: none !important;
    }

    .new-arrivals--visible .new-arrivals__item {
        transition-delay: 0s !important;
    }
}

