.netf-accordion-container {
    max-width: 100%;
    margin: 25px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.netf-element-group {
    margin-bottom: 35px;
}

/* Nagłówek z nazwami kolumn */
.netf-header-columns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 24px;
    background: #f8f9fa;
    border: 2px solid #0073aa;
    border-radius: 8px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.3px;
}

.netf-column-header {
    flex: 1;
    text-align: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 10px;
    position: relative;
}

/* Sortowalne kolumny */
.netf-sortable-column {
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.netf-sortable-column:hover {
    color: #0073aa;
    background-color: rgba(0, 115, 170, 0.1);
    border-radius: 4px;
}

/* Strzałki sortowania */
.netf-sort-arrows {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.netf-sortable-column:hover .netf-sort-arrows {
    opacity: 0.7;
}

.netf-sort-asc,
.netf-sort-desc {
    font-size: 10px;
    display: block;
    line-height: 1;
}

.netf-sort-asc {
    margin-bottom: 1px;
}

/* Aktywne sortowanie */
.netf-sortable-column.sort-asc .netf-sort-arrows .netf-sort-asc,
.netf-sortable-column.sort-desc .netf-sort-arrows .netf-sort-desc {
    opacity: 1;
    color: #0073aa;
    font-weight: bold;
}

.netf-sortable-column.sort-asc .netf-sort-arrows .netf-sort-desc,
.netf-sortable-column.sort-desc .netf-sort-arrows .netf-sort-asc {
    opacity: 0.3;
}

/* Animacja sortowania */
.netf-element-group .netf-accordion-item {
    transition: all 0.4s ease;
}

/* Responsywność dla sortowania */
@media (max-width: 768px) {
    .netf-sortable-column {
        gap: 4px;
    }
    
    .netf-sort-arrows {
        font-size: 8px;
    }
    
    .netf-sort-asc,
    .netf-sort-desc {
        font-size: 8px;
    }
}

.netf-accordion-item {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.netf-accordion-item:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.netf-accordion-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

/* When accordions are not collapsible */
.netf-accordion-container.netf-non-collapsible .netf-accordion-header {
    cursor: default;
}

.netf-accordion-container.netf-non-collapsible .netf-accordion-item:hover {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.netf-accordion-container.netf-non-collapsible .netf-accordion-arrow {
    opacity: 0.3;
    transform: none !important;
}

.netf-accordion-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.netf-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    text-align: center;
    flex: 1;
}

.netf-field-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.netf-field-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    text-align: center;
}

.netf-no-value {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.netf-field-image {
    flex-shrink: 0;
}

.netf-field-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e1e8ed;
    transition: border-color 0.3s ease;
}

.netf-field-image img:hover {
    border-color: #0073aa;
}

.netf-field-text {
    flex: 1;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
}

.netf-field-cena {
    flex-shrink: 0;
}

.netf-price-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.netf-field-price {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
}

.netf-price-history-btn {
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 !important;
    margin-left: 8px;
}

.netf-price-history-btn:hover {
    transform: scale(1.2);
    opacity: 0.7;
}

.netf-price-history-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.netf-field-attachment {
    flex-shrink: 0;
}

.netf-field-attachment a {
    font-size: 24px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.netf-field-attachment a:hover {
    text-decoration: none;
    transform: scale(1.2);
}

.netf-accordion-arrow {
    transition: transform 0.3s ease;
    color: #0073aa;
    font-size: 24px;
    margin-left: 15px;
}

.netf-accordion-item.active .netf-accordion-arrow {
    transform: rotate(180deg);
}

.netf-accordion-body {
    padding: 20px;
    border-top: 1px solid #ddd;
    background: rgba(255,255,255,0.5);
}

/* Nowy layout 25%-50%-25% w środku accordiona */
.netf-accordion-body .netf-new-layout {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: stretch;
    box-sizing: border-box;
}

/* Responsywność */
@media (max-width: 768px) {
    .netf-header-columns {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .netf-column-header {
        padding: 4px 0;
        font-size: 12px;
    }
    
    .netf-accordion-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .netf-field-image,
    .netf-field-text,
    .netf-field-attachment {
        align-self: center;
    }
    
    .netf-field-image img {
        width: 60px;
        height: 60px;
    }
    
    .netf-field-text {
        font-size: 15px;
        text-align: center;
    }
    
    .netf-accordion-header {
        padding: 15px 20px;
        min-height: auto;
    }
}

/* Modal historii cen na froncie */
.netf-frontend-price-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.netf-frontend-price-modal.active {
    opacity: 1;
    visibility: visible;
}

.netf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.netf-frontend-price-modal .netf-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 90%;
    width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.netf-frontend-price-modal .netf-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.netf-frontend-price-modal .netf-modal-close:hover {
    color: #333;
}

.netf-frontend-price-modal h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.netf-price-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.netf-price-history-table thead {
    background: #34495e;
    color: white;
}

.netf-price-history-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.netf-price-history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
    color: #2c3e50;
}

.netf-price-history-table tbody tr:hover {
    background: #f8f9fa;
}

.netf-price-history-table tbody tr:nth-child(even) {
    background: #fdfdfd;
}

.netf-price-history-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .netf-frontend-price-modal .netf-modal-content {
        width: 95%;
        padding: 20px;
        margin: 20px;
    }
    
    .netf-price-history-table {
        font-size: 12px;
    }
    
    .netf-price-history-table th,
    .netf-price-history-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .netf-accordion-container {
        margin: 15px 0;
    }
    
    .netf-accordion-header {
        padding: 12px 16px;
    }
    
    .netf-accordion-content {
        gap: 12px;
    }
    
    .netf-field-image img {
        width: 50px;
        height: 50px;
    }
    
    .netf-field-text {
        font-size: 14px;
        text-align: center;
    }
}

/* Lightbox modal dla galerii zdjęć */
.netf-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.netf-lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.netf-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.netf-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.netf-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 21000;
}

.netf-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.netf-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 21000;
}

.netf-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.netf-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.netf-lightbox-nav:disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1);
}

.netf-lightbox-prev {
    left: 20px;
}

.netf-lightbox-next {
    right: 20px;
}

.netf-lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
    z-index: 21000;
}

/* Responsywność dla lightboxu */
@media (max-width: 768px) {
    .netf-lightbox-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .netf-lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .netf-lightbox-nav {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }
    
    .netf-lightbox-prev {
        left: 15px;
    }
    
    .netf-lightbox-next {
        right: 15px;
    }
    
    .netf-lightbox-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .netf-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .netf-lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .netf-lightbox-prev {
        left: 10px;
    }
    
    .netf-lightbox-next {
        right: 10px;
    }
    
    .netf-lightbox-counter {
        bottom: 15px;
        font-size: 13px;
        padding: 6px 12px;
        min-width: 60px;
    }
}


/* Sekcja obrazów - 25% (w środku accordiona) */
.netf-accordion-body .netf-images-section {
    flex: 0 0 23%;
    display: grid;
    gap: 5px;
    align-items: stretch;
    justify-content: stretch;
    height: 300px;
    min-height: 200px;
    box-sizing: border-box;
}

/* Layout dla różnej liczby zdjęć */
.netf-accordion-body .netf-images-section.images-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.netf-accordion-body .netf-images-section.images-2 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
}

.netf-accordion-body .netf-images-section.images-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.netf-accordion-body .netf-images-section.images-3 .netf-image-item:nth-child(3) {
    grid-column: 1 / 3;
}

.netf-accordion-body .netf-images-section.images-4,
.netf-accordion-body .netf-images-section.images-more {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.netf-accordion-body .netf-image-item {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 6px;
}

.netf-accordion-body .netf-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e1e8ed;
    transition: all 0.3s ease;
}

.netf-accordion-body .netf-image-item img:hover {
    border-color: #0073aa;
    transform: scale(1.02);
}

.netf-accordion-body .netf-image-item.clickable {
    cursor: pointer;
}

.netf-accordion-body .netf-image-item.clickable:hover {
    opacity: 0.95;
}

/* Licznik zdjęć dla przypadku gdy jest więcej niż 4 */
.netf-accordion-body .netf-image-item .netf-image-counter {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    pointer-events: none;
}

.netf-accordion-body .netf-no-images {
    color: #999;
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* Sekcja pól przekraczających limit - 50% (w środku accordiona) */
.netf-accordion-body .netf-overflow-fields-section {
    flex: 0 0 48%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding: 0 15px;
    box-sizing: border-box;
}

.netf-accordion-body .netf-overflow-field {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.netf-accordion-body .netf-overflow-field:last-child {
    border-bottom: none;
}

.netf-accordion-body .netf-overflow-field-label {
    font-weight: 600;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 80px;
    text-align: right;
}

.netf-accordion-body .netf-overflow-field-value {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    text-align: left;
}

.netf-accordion-body .netf-no-overflow {
    color: #999;
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* Sekcja historii cen - 25% (w środku accordiona) */
.netf-accordion-body .netf-price-history-section {
    flex: 0 0 23%;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
}

.netf-accordion-body .netf-price-item {
    width: 100%;
    text-align: center;
}

.netf-accordion-body .netf-price-item .netf-price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.netf-accordion-body .netf-price-item .netf-field-price {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2;
}

.netf-accordion-body .netf-price-item .netf-price-history-btn {
    background: none !important;
    border: none !important;
    font-size: 18px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px !important;
    margin: 0;
}

.netf-accordion-body .netf-no-prices {
    color: #999;
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* Styled container for price header (title + current price) */
.netf-accordion-body .netf-price-header-container {
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: inline-block;
    width: auto;
}

.netf-accordion-body .netf-price-title {
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.netf-accordion-body .netf-current-price {
    display: block;
}

/* Uproszczone style historii cen w rozwiniętym accordionie */
.netf-accordion-body .netf-price-item-expanded {
    width: 100%;
    margin-bottom: 15px;
}

.netf-accordion-body .netf-price-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.netf-accordion-body .netf-price-history-item {
    margin-bottom: 8px;
    padding: 2px 0;
    display: block;
}

.netf-accordion-body .netf-price-history-item:last-child {
    margin-bottom: 0;
}

.netf-accordion-body .netf-old-price {
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: -10px;
    display: block;
}

.netf-accordion-body .netf-price-date {
    font-size: 12px;
    opacity: 0.7;
    font-style: italic;
    display: block;
}

.netf-accordion-body .netf-show-more-history {
    margin-top: 8px;
    padding: 4px 8px;
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.8;
}

.netf-accordion-body .netf-show-more-history:hover {
    opacity: 1;
}

.netf-accordion-body .netf-no-history {
    font-style: italic;
    font-size: 12px;
    opacity: 0.6;
}

/* Responsywność dla nowego layoutu w środku accordiona */
@media (max-width: 768px) {
    .netf-accordion-body .netf-new-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .netf-accordion-body .netf-images-section,
    .netf-accordion-body .netf-overflow-fields-section,
    .netf-accordion-body .netf-price-history-section {
        flex: none;
        width: 100%;
    }
    
    .netf-accordion-body .netf-images-section {
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        height: auto;
        min-height: auto;
    }
    
    .netf-accordion-body .netf-image-item {
        width: 60px;
        height: 60px;
        flex: none;
    }
    
    .netf-accordion-body .netf-image-item img {
        width: 60px;
        height: 60px;
    }
    
    .netf-accordion-body .netf-overflow-fields-section {
        padding: 0 10px;
    }
    
    .netf-accordion-body .netf-overflow-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0;
    }
    
    .netf-accordion-body .netf-overflow-field-label {
        min-width: auto;
        text-align: left;
        font-size: 11px;
    }
    
    .netf-accordion-body .netf-price-history-section {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .netf-accordion-body .netf-price-item-expanded {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .netf-accordion-body .netf-price-value {
        font-size: 16px;
    }
    
    .netf-accordion-body .netf-price-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .netf-accordion-body .netf-new-layout {
        gap: 12px;
    }
    
    .netf-accordion-body .netf-image-item {
        width: 50px;
        height: 50px;
        flex: none;
    }
    
    .netf-accordion-body .netf-image-item img {
        width: 50px;
        height: 50px;
    }
    
    .netf-accordion-body .netf-overflow-field-label {
        font-size: 10px;
    }
    
    .netf-accordion-body .netf-overflow-field-value {
        font-size: 13px;
    }
    
    .netf-accordion-body .netf-price-item .netf-field-price {
        font-size: 13px;
    }
    
    .netf-accordion-body .netf-price-item .netf-price-history-btn {
        font-size: 16px !important;
    }
    
    .netf-accordion-body .netf-price-item-expanded {
        margin-bottom: 12px;
        padding: 10px;
    }
    
    .netf-accordion-body .netf-price-value {
        font-size: 15px;
    }
    
    .netf-accordion-body .netf-price-title {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .netf-accordion-body .netf-current-price {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .netf-accordion-body .netf-price-history-item {
        padding: 6px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .netf-accordion-body .netf-show-more-history {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Klikalny nagłówek obrazów - nowe style */
.netf-header-image-wrapper.clickable {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease;
}

.netf-header-image-wrapper.clickable:hover {
    transform: scale(1.02);
}

.netf-header-image-wrapper img {
    display: block;
    border-radius: 6px;
    transition: all 0.3s ease;
}