.news-products-page {
    max-width: 1700px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 0 20px;
    margin-top: 40px;
}

/* SIDEBAR - Z białym tłem */
.news-sidebar {
    width: 250px;
    background-color: #f8f9fa; /* Przywrócone białe tło */
    border-radius: 12px;
    height: fit-content;
    top: 20px;
    padding: 15px; /* Dodany padding wewnętrzny */
}

.news-sidebar-wrapper {
    /* Wrapper for sidebar */
}

.news-sidebar-header {
    display: flex;
    align-items: center;
    padding: 0 0 15px 0; /* Zmieniony padding - brak bocznych, bo sidebar ma swój */
    background: none;
}

.news-sidebar-header .news-icon {
    width: 24px;
    height: 24px;
    background-color: #cc240f;
    margin-right: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-sidebar-header .news-icon::before {
    content: '';
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #ffffff 25%, transparent 25%, transparent 75%, #ffffff 75%),
    linear-gradient(45deg, #ffffff 25%, transparent 25%, transparent 75%, #ffffff 75%);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
}

.news-sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.news-nav-list {
    padding: 0;
    margin: 0; /* Dodany margin reset */
    list-style: none;

}

/* ELEMENTY MENU - z większym paddingiem */
.news-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0; /* Zwiększony padding z 12px do 15px */
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    position: relative;
}

.news-nav-item:hover {
    background: none;
    color: black; /* Zmienione z #cc240f na czarny */
}

/* IKONY STRZAŁEK - używamy boxicons zamiast CSS */
.news-nav-item.news-has-dropdown i {
    font-size: 0.8rem;
    color: #666666;
    transition: transform 0.2s ease, color 0.2s ease;
    margin-left: auto;
}

.news-nav-item.news-has-dropdown:hover i {
    color: black; /* Zmienione z #cc240f na czarny */
}

.news-nav-item.news-has-dropdown.active i {
    transform: rotate(180deg);
    color: black; /* Zmienione z #cc240f na czarny */
}

/* Usuwamy stare CSS strzałki */
.news-nav-item.news-has-dropdown::after {
    display: none; /* Ukrywamy stare strzałki CSS */
}

.news-nav-item-wrapper {
    position: relative;
}

/* DROPDOWNY - bez białego tła i box-shadow */
.news-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: none; /* Usunięte białe tło */
    box-shadow: none; /* Usunięty box-shadow */
    border: none; /* Usunięty border-left */
}

.news-dropdown.active {
    max-height: none;
    overflow: visible;
}

/* ELEMENTY DROPDOWN - z większym paddingiem i wyrównaniem do lewej */
.news-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Zmienione z space-between na flex-start */
    padding: 12px 0; /* Zwiększony padding z 10px do 12px */
    color: #666666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.news-dropdown-item:hover {
    background: none;
    color: black; /* Zmienione z #cc240f na czarny */
}

/* IKONY DLA ELEMENTÓW DROPDOWN - pozycjonowanie ikon */
.news-dropdown-item.news-has-dropdown i {
    font-size: 0.7rem;
    color: #666666;
    transition: transform 0.2s ease, color 0.2s ease;
    margin-left: auto; /* Ikona zostaje po prawej stronie */
}

.news-dropdown-item.news-has-dropdown:hover i {
    color: black; /* Zmienione z #cc240f na czarny */
}

.news-dropdown-item.news-has-dropdown.active i {
    transform: rotate(180deg);
    color: black; /* Zmienione z #cc240f na czarny */
}

/* TRZECI POZIOM DROPDOWN - dodatkowe wcięcie */
.news-dropdown .news-dropdown {
    padding-left: 0px; /* Dodatkowe wcięcie dla trzeciego poziomu */
}

/* MAIN CONTENT */
.news-main-content {
    flex: 1;
    background-color: #ffffff;
    padding: 30px;
    min-height: 600px;
}

.news-content-section {
    margin-bottom: 40px;
}

.news-content-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.news-content-section p a {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-content-section p  {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-content-section  a:hover {
    text-underline: #333;
}



/* Sort Dropdown */
.news-sort-dropdown {
    position: relative;
    display: inline-block;
    margin-top: 20px;
}

.news-sort-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 150px;
}

.news-sort-toggle:hover {
    border-color: #ccc;
    background-color: #fafafa;
}

.news-sort-toggle::before {
    content: '';
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23333333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="6" x2="20" y2="6"></line><line x1="4" y1="12" x2="20" y2="12"></line><line x1="4" y1="18" x2="11" y2="18"></line></svg>') no-repeat center;
    background-size: contain;
}

.news-sort-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #666;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.news-sort-dropdown.active .news-sort-toggle::after {
    transform: rotate(180deg);
}

.news-sort-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.news-sort-dropdown.active .news-sort-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.news-sort-item {
    display: block;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.news-sort-item:hover {
    background-color: #f8f8f8;
    color: #333;
}

.news-sort-item.active {
    color: #333;
    font-weight: 600;
    background-color: #f0f0f0;
}

.news-sort-divider {
    height: 1px;
    margin: 0;
    background-color: #e0e0e0;
}

/* Product Grid */
.news-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 20px;
    gap: 20px;
    cursor: pointer;
    align-items: stretch;

}

.news-product-item {
    background-color: #ffffff;
    border: 2px solid #f0efef;
    border-radius: 15px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: auto;
    height: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.news-product-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.news-product-image-container {
    position: relative;
    margin-bottom: 15px;
}

.news-product-item img {
    margin: 0 auto;
    max-width: 60%;
    height: auto;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    object-fit: contain;
    max-height: 200px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.news-producer-title {
    text-align: left;
    color: #4a5568;
    font-size: 0.9rem;
    white-space: nowrap;
}


.news-product-title {
    font-size: 16px;
    font-weight: 600;
    color: black;
    display: flex;
    align-items: flex-start;
    position: relative;
    min-height: calc(1.4em * 2); /* Miejsce na 2 linie */
    overflow: visible;
}

.news-product-title a {
    color: #000;
    text-decoration: none;
    line-height: 1.4em;
    display: block;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    word-break: break-word;
}

.news-product-title.news-short-title a {
    display: block;
    overflow: visible;
}

.news-product-title.news-medium-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.4em * 2);
}

.news-product-title.news-medium-title:hover a {
    -webkit-line-clamp: unset !important;
    max-height: none !important;
    overflow: visible !important;
    position: absolute;
    top: -1.4em;
    left: 0;
    right: 0;
    z-index: 10;
}

.news-product-title.news-long-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.4em * 2);
}

.news-product-title.news-long-title:hover a {
    -webkit-line-clamp: 4 !important;
    max-height: calc(1.4em * 4) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    position: absolute;
    top: -2.8em;
    left: 0;
    right: 0;
    z-index: 10;
}

.news-product-item.title-hover-active {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

@media (max-width: 768px) {
    .news-product-title.news-medium-title:hover a {
        top: -1em;
    }

    .news-product-title.news-long-title:hover a {
        top: -2em;
        -webkit-line-clamp: 3;
        max-height: calc(1.4em * 3);
    }
}

.news-separator {
    height: 1px;
    border: none;
    border-top: 1px solid #e9e9e9;
    margin: 10px -20px;
    width: calc(100% + 40px);
}

.news-product-price {
    color: #000;
    font-weight: bold;
}

.news-availability {
    text-align: left;
    color: #4a5568;
    font-size: 0.9rem;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 400;
}

.news-stock-status.in-stock {
    color: #02816f;
    font-weight: bold;
    font-size: 14px;
}

.news-stock-status.low-stock {
    color: #ffc107;
    font-weight: bold;
    font-size: 14px;
}

.news-stock-status.out-of-stock {
    color: #dc3545;
    font-weight: bold;
    font-size: 14px;
}

.news-shipping-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px;
}

.news-shipping-info {
    background-color: #f5f5f5;
    justify-content: flex-start;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    border-radius: 9999px;
    margin-left: 0px;
    width: 80%;
}

.news-cart-button {
    width: 40px;
    height: 40px;
    background: linear-gradient(to left, #e1001d 0%, #03294c 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    flex-shrink: 0;
    outline: none;
    visibility: hidden;
}



.news-cart-button:hover {
    background: linear-gradient(to left, #c4001a 0%, #021f35 100%);
    transform: scale(1.05);

}

.news-cart-button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.news-cart-button:active {
    transform: scale(0.95);
}

.news-product-item:hover .news-cart-button {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.news-cart-icon {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Pagination */
.news-pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.news-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-page-number {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 500;
}

.news-page-number:hover {
    background-color: #f0f0f0;
    color: #333;
}

.news-page-number.active {
    background: linear-gradient(to left, #e1001d 0%, #03294c 100%);
    color: white;
    cursor: default;
    font-weight: 600;
}

.news-page-number.active:hover {
    color: white;
}

.news-page-dots {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    cursor: default;
}

.news-nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: linear-gradient(to left, #e1001d 0%, #03294c 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.news-nav-button:hover {
    opacity: 0.9;
}

.news-nav-button::after {
    content: '›';
    font-size: 20px;
    font-weight: bold;
}

.news-nav-button.prev::after {
    content: '';
}

.news-nav-button.prev::before {
    content: '‹';
    font-size: 20px;
    font-weight: bold;
}

.news-prev-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.news-prev-button:hover {
    color: #333;
}

.news-prev-button::before {
    content: '‹';
    font-size: 20px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 1550px) {
    .news-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1150px) {
    .news-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 992px) {
    .news-products-page {
        flex-direction: column;
        padding: 15px;
    }

    .news-sidebar {
        width: 100%;
        position: static;
        display: none;
    }

    .news-main-content {
        padding: 20px;
    }

    .news-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .news-cart-button {
        display: flex !important;
        opacity: 1 !important;
        transform: scale(1) !important;
    }

    .news-pagination-container {
        gap: 12px;
    }

    .news-page-number, .news-page-dots {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .news-nav-button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .news-prev-button {
        font-size: 14px;
    }

    .hide-mobile {
        display: none;
    }


    .news-product-item img {
       max-width: 50%;
    }



}

@media (max-width: 768px) {
    .news-products-page {
        padding: 10px;
    }

    .news-main-content {
        padding: 15px;
    }

    .news-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .news-pagination-numbers {
        gap: 4px;
    }

    .news-page-number, .news-page-dots {
        width: 32px;
        height: 32px;
    }

    .news-nav-button {
        padding: 8px 16px;
    }
}

@media (max-width: 550px) {
    .news-product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .news-product-grid {
        grid-template-columns: 1fr;
    }
}


.news-dropdown-item.news-has-dropdown.active {
    font-weight: bold;
    color: black;
}

.free-shipping-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #00c07f;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 1;
}


.news-product-badge.new-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    z-index: 2;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    background-color: #00c07f;
}


.news-price-container {
    display: flex;
    align-items: center;

}

.news-product-price {
    margin: 0;
}

.news-savings-info {
    margin: 0;
}


.news-stock-status.in-stock,
.news-stock-status.large-quantity {
    color: #02816f;
    font-weight: bold;
    font-size: 14px;
}

.news-stock-status.last-items {
    color: #ff9a52;
    font-weight: bold;
    font-size: 14px;
}

.news-stock-status.out-of-stock {
    color: #cc240f;
    font-weight: bold;
    font-size: 14px;
}



.news-product-price, .producer-stock-status { margin-top: 5px; }


.news-savings-info, .manufacturer-savings-amount {
    color: #079257;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
    font-size: 14px;
    font-weight: bold;
}

.news-product-item .free-shipping-badge:nth-child(2) {
    left: 95px !important;
}





/* Style dla numerów stron (kółka) */
.responsive-pagination .page-list .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid #ddd;
    background: white;
    color: #333;

}

/* Aktywna strona (kółko) */
.responsive-pagination .page-list .page-item.current .page-link,
.responsive-pagination .page-list .page-item.active .page-link {
    background: linear-gradient(to left, #e1001d 0%, #03294c 100%) !important;
    color: white !important;
    cursor: default !important;
    font-weight: 600 !important;
}

/* Hover dla nieaktywnych stron */
.responsive-pagination .page-list .page-item:not(.current):not(.active) .page-link:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Style dla przycisków Poprzednia/Następna */
.responsive-pagination .page-list .page-item.previous .page-link,
.responsive-pagination .page-list .page-item.next .page-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    border: none !important;
    background: linear-gradient(to left, #e1001d 0%, #03294c 100%) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 44px !important;
}

/* Hover dla Poprzednia/Następna */
.responsive-pagination .page-list .page-item.previous .page-link:hover,
.responsive-pagination .page-list .page-item.next .page-link:hover {
    opacity: 0.9 !important;
}

/* Ukryj ikony strzałek */
.responsive-pagination .mobile-icon {
    display: none !important;
}

/* Pokaż tekst zawsze */
.responsive-pagination .desktop-text {
    display: inline !important;
}

/* Odstępy między elementami paginacji */
.responsive-pagination .page-list {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
    list-style: none;
}


.responsive-pagination .page-list .page-item {
    margin: 0;
}

.responsive-pagination .page-item.previous .page-link::before {
    display: none;
}


/* Hover dla Poprzednia/Następna - BEZ podnoszenia */
.responsive-pagination .page-list .page-item.previous .page-link:hover,
.responsive-pagination .page-list .page-item.next .page-link:hover {
    opacity: 0.9 !important;
    transform: none !important; /* DODAJ TĘ LINIĘ */
}


/* Dla aktywnej strony zachowaj gradient */
.responsive-pagination .page-list .page-item.current .page-link:focus,
.responsive-pagination .page-list .page-item.current .page-link:active,
.responsive-pagination .page-list .page-item.active .page-link:focus,
.responsive-pagination .page-list .page-item.active .page-link:active {
    outline: none !important;
    box-shadow: none !important;
    background: linear-gradient(to left, #e1001d 0%, #03294c 100%) !important;
    color: white !important;
    border: 2px solid #ddd !important;
}

/* Dla przycisków Poprzednia/Następna zachowaj gradient */
.responsive-pagination .page-list .page-item.previous .page-link:focus,
.responsive-pagination .page-list .page-item.previous .page-link:active,
.responsive-pagination .page-list .page-item.next .page-link:focus,
.responsive-pagination .page-list .page-item.next .page-link:active {
    outline: none !important;
    box-shadow: none !important;
    background: linear-gradient(to left, #e1001d 0%, #03294c 100%) !important;
    color: white !important;
    border: none !important;
}


/* Wyłącz wszystkie efekty focus/active/hover dla paginacji */
.responsive-pagination .page-list .page-item .page-link:focus,
.responsive-pagination .page-list .page-item .page-link:active,
.responsive-pagination .page-list .page-item .page-link:focus-visible,
.responsive-pagination .page-list .page-item .page-link:hover {
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
}


.mobile-pagination-actions{
    display: none;
}




.news-product-item .ajax-icon-cart-btn {
    width: 40px !important;
    height: 40px !important;
    background: linear-gradient(to left, rgb(225, 0, 29) 0%, rgb(3, 41, 76) 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    opacity: 0 !important;
    transform: scale(0.8) !important;
    flex-shrink: 0 !important;
    outline: none !important;
    padding: 0px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    margin: 0px !important;
    font-size: 0px !important;
    pointer-events: none !important;
}

/* Pojawienie przycisku po najechaniu na kartę produktu (desktop) */
.news-product-item:hover .ajax-icon-cart-btn {
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
}


/* Responsywność - widoczny zawsze poniżej 992px */
@media (max-width: 992px) {
    .news-product-item .ajax-icon-cart-btn {
        opacity: 1 !important;
        transform: scale(1) !important;
        pointer-events: auto !important;
    }
}
