.news-products {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    padding: 0px;
    overflow: hidden;
    border-radius: 25px;
    background-color: #f5f5f5;
    margin: 20px;
}

.container-news-products {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 1500px;
    transition: transform 0.3s ease-in-out;
}

.carusel-news-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.wrapper-news-title {
    text-align: left;
    margin-top: 40px;
    margin-bottom: 20px;
}

.news-product-section-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 1px;
    margin-left: 40px;
}

.carousel-news-arrow-left,
.carousel-news-arrow-right {
    position: absolute;
    top: 40%;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.carousel-news-arrow-left {
    left: -10px;
}

.carousel-news-arrow-right {
    right: 20px;
}

.news-product-section {
    display: flex;
    gap: 20px;
    width: 100%;
    overflow-x: scroll;
    scroll-behavior: smooth;
    padding: 20px 40px 40px 40px;
    align-items: flex-start;
    scrollbar-width: none;
    height: 680px;
}

.news-product-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-product-item {
    flex: 0 0 330px;
    height: 550px;
    box-sizing: border-box;
    border-radius: 8px;
    padding: 16px;
    background-color: white;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    cursor: pointer;
}

.nws-product-section-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    letter-spacing: 1px;
}

.news-product-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    transform-origin: center center;
    height: 595px !important;
}

.news-product-item .status-label {
    background-color: transparent;
    display: inline-block;
    padding: 5px 10px;
    margin: 0;
}

.news-product-info {
    margin-top: 10px;
    transition: margin-top 0.3s ease;
    text-align: left;
}

.sku-news {
    color: #4a5568;
    font-size: 0.875rem;
    margin: 3px 0px;
}

.news-product-title {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    margin: 3px 0;
    color: #000;
}

.line-news-product {
    height: 1px;
    background-color: rgb(224, 224, 224);
    width: 100%;
    box-sizing: border-box;
    border-width: initial;
    border-style: none;
    border-color: initial;
    border-image: initial;
    margin: 10px -16px;
    width: calc(100% + 32px);
}

.news-price {
    font-size: 1.05rem;
    font-weight: bold;
    color: #000;
    margin-top: 10px;
}

.availability-container-news {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #02816f;
    padding-top: 8px;
}

.availability-label-news {
    color: #6c757d;
    font-weight: normal;
    margin-right: 5px;
    font-size: 0.875rem;
}

.availability-text-news {
    color: #02816f;
    font-weight: bold;
    font-size: 14px;
}

.shipping-icon-news {
    width: 18.52px;
    height: 14px;
    opacity: 0.7;
}

.add-to-cart-button-rec-news {
    background: linear-gradient(to right, #0d3c55, #00b894);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
    width: 93%;
    display: none;
    margin-left: -2px;
}

.news-product-item:hover .add-to-cart-button-rec-news {
    display: block;
}

.shipping-info-news {
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    border-radius: 9999px;
    margin-top: 10px;
    margin-left: 0px;
    width: 90%;
}

.image-news-slider {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;
    margin-top: 30px;
}

.news-product-item .image-news-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.news-product-item .news-product-image {
    width: 100%;
    max-width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
}

.prev-arrow-news,
.next-arrow-news,
.thumbnails-news {
    display: none;
}

.news-product-item:hover .prev-arrow-news,
.news-product-item:hover .next-arrow-news,
.news-product-item:hover .thumbnails-news {
    display: none !important;
}

.prev-arrow-news,
.next-arrow-news {
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.news-product-item:hover .prev-arrow-news,
.news:hover .next-arrow-news {
    display: flex;
}

.prev-arrow-news {
    right: -8px;
}

.next-arrow-news {
    left: -8px;
}

.prev-arrow-news:hover,
.next-arrow-news:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.thumbnails-news {
    display: flex;
    justify-content: flex-start;
    gap: 5px;
    margin-top: 10px;
    overflow-x: scroll;
    white-space: nowrap;
    scrollbar-width: none;
    display: none;
}

.thumbnails-news:hover {
    display: flex;
}

.thumbnails-news::-webkit-scrollbar {
    display: none;
}

.thumbnail-news {
    width: 50px;
    height: 50px;
    border: 1px solid #ddd;
    cursor: pointer;
    object-fit: cover;
    flex-shrink: 0;
}

.thumbnail-news:hover {
    border-color: #02816f;
}

.news-product-item:hover .news-product-info {
    margin-top: 5px;
}

.news-product-item:hover .prev-arrow-news,
.news-product-item:hover .next-arrow-news {
    display: flex;
    margin-top: 15px;
}

.news-product-image {
    transition: opacity 0.5s ease;
}

.news-product-section::-webkit-scrollbar {
    display: none;
}

.news-product-item.dimmed {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.product-title-link:hover{
    text-decoration: underline;
    color: inherit;
}




@media (max-width: 1600px) {
    .carousel-container-news {
        width: 70%;
    }

    .news-product-item {
        flex: 0 0 23%;
    }

    .sku-news {
        white-space: nowrap;
    }

    .news-product-title {
        font-size: 0.9rem;
    }

    .availability-text-news {
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .shipping-info-news {
        font-size: 0.8rem;
        white-space: nowrap;
        width: 100%;
    }

    .add-to-cart-button-rec-news {
        font-size: 0.85rem;
    }
}

@media (max-width: 1570px) {
    .carousel-news-arrow-left {
        left: 3px;
    }
}

@media (max-width: 1300px) {
    .carousel-container-news {
        width: calc(100% - 80px);
        overflow: hidden;
    }

    .carousel-arrow-left {
        left: 0;
    }

    .carousel-arrow-right {
        right: 15px;
    }

    .news-product-item {
        flex: 0 0 30%;
    }

    .news-product-section {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .news-product-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
        scroll-snap-type: x mandatory;
        padding: 20px 0 40px;
        height: auto;
        align-items: flex-start;
    }

    /* Spacery umożliwiające centrowanie pierwszej i ostatniej karty */
    .news-product-section::before,
    .news-product-section::after {
        content: '';
        flex: 0 0 26.5%;
        display: block;
    }

    .news-product-item {
        flex: 0 0 47%;
        height: auto !important;
        min-height: 550px;
        max-height: none !important;
        overflow: visible;
        scroll-snap-align: center;
    }

    /* Ukryj strzałki na mobile */
    .carousel-news-arrow-left,
    .carousel-news-arrow-right {
        display: none !important;
    }

    .news-product-item:hover .prev-arrow-news,
    .news-product-item:hover .next-arrow-news,
    .news-product-item:hover .thumbnails-news {
        display: none !important;
    }

    .news-product-item:hover {
        transform: none;
        box-shadow: none;
        height: auto !important;
        min-height: 550px;
        max-height: none !important;
    }

    .news-product-item:hover .news-product-info {
        margin-top: 10px !important;
    }

    .add-to-cart-button-rec-news {
        display: block;
        width: 100%;
    }

    .news-product-item .custom-add-to-cart-form .btn.btn-primary {
        display: block;
    }
}





@media (max-width: 768px) {

    .news-products {
        height: auto;
    }

    .container-news-products {
        height: auto;
    }

    .carusel-news-container {
        max-width: 100%;
        height: auto;
    }

    .news-product-section {
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
        padding: 16px 0 20px;
        gap: 12px;
        touch-action: pan-x pan-y;
    }

    /* Spacery dla centrowania na mobile 768px — karta 85%-16px → spacer (100%-85%+16px)/2 */
    .news-product-section::before,
    .news-product-section::after {
        flex: 0 0 calc(7.5% + 8px);
        width: calc(7.5% + 8px);
    }

    .news-product-item {
        flex: 0 0 calc(85% - 16px);
        max-width: calc(85% - 16px);
        scroll-snap-align: center;
    }

    .news-product-item .news-product-image {
        max-width: 100%;
        height: 170px;
    }

    .news-product-item .label-container {
        margin-top: 8px;
    }

    .add-to-cart-button-rec-news {
        font-size: 0.85rem;
        width: 100%;
        padding: 10px 15px;
    }

    .wrapper-news-title  {
        text-align: center;
        margin-top: 20px;
        margin-bottom: 0;
        padding-left: 16px;
    }

    .news-product-section-title {
        font-size: 1.4rem;
        margin-left: 0;
        margin-bottom: 10px;
    }

}

@media (max-width: 515px) {
    .news-product-item {
        flex: 0 0 calc(88% - 16px);
        max-width: calc(88% - 16px);
    }

    .news-product-section::before,
    .news-product-section::after {
        flex: 0 0 calc(6% + 8px);
        width: calc(6% + 8px);
    }
}

@media (max-width: 460px) {
    .news-product-item {
        flex: 0 0 calc(90% - 16px);
        max-width: calc(90% - 16px);
    }

    .news-product-section::before,
    .news-product-section::after {
        flex: 0 0 calc(5% + 8px);
        width: calc(5% + 8px);
    }

    .news-product-item .news-product-image {
        max-width: 100%;
        height: 170px;
    }
}

@media (max-width: 400px) {
    .availability-container-news {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.875rem;
        margin-top: 10px;
    }

    .availability-label-news {
        margin-bottom: 5px;
    }

    .icon-text-wrapper-news {
        display: flex;
        align-items: center;
    }

    .check-icon-news {
        width: 9px;
        height: 7px;
        margin-right: 5px;
    }

    .shipping-info-news {
        font-size: 0.7rem;
        padding: 5px;
    }

    .sku-news {
        font-size: 0.775rem;
    }

    .news-product-item .news-product-image {
        max-width: 100%;
        height: 170px;
    }
}

@media (max-width: 365px) {
    .news-product-item {
        flex: 0 0 calc(92% - 16px);
        max-width: calc(92% - 16px);
    }

    .news-product-section::before,
    .news-product-section::after {
        flex: 0 0 calc(4% + 8px);
        width: calc(4% + 8px);
    }
}

@media (max-width: 335px) {
    .add-to-cart-button-rec-news {
        font-size: 11.5px;
    }

    .shipping-info-news svg {
        display: none;
    }

    .availability-text-news {
        font-size: 0.875rem;
    }

    .news-product-item {
        flex: 0 0 calc(93% - 16px);
        max-width: calc(93% - 16px);
    }

    .news-product-section::before,
    .news-product-section::after {
        flex: 0 0 calc(3.5% + 8px);
        width: calc(3.5% + 8px);
    }
}

@media (max-width: 320px) {
    .news-product-item {
        flex: 0 0 calc(95% - 16px);
        max-width: calc(95% - 16px);
    }

    .news-product-section::before,
    .news-product-section::after {
        flex: 0 0 calc(2.5% + 8px);
        width: calc(2.5% + 8px);
    }
}
/* Dodatkowe style dla stanów specjalnych */
.news-product-item.highlighted {
    border: 2px solid #02816f;
    box-shadow: 0 0 0 4px rgba(2, 129, 111, 0.2);
}

/* Animacje ładowania */
@keyframes news-shimmer {
    0% { background-position: -468px 0 }
    100% { background-position: 468px 0 }
}

.loading-placeholder-news {
    animation: news-shimmer 1.5s infinite linear;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
}






