.product-compare-container {
    display: flex;
    width: 100%;
    border: 1px solid #e0e0e0;
    font-family: inherit;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    /* Was 100: same tier as FiboSearch panels / above Kadence submenus (often 10–11),
       so header menu & search appeared under this sticky bar. Stay above normal flow
       but below site chrome (mobile menu ~1000, desktop dropdowns ~10+). */
    z-index: 9;
    background-color: #fff;
}

.pc-column {
    flex: 1;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e0e0e0;
    box-sizing: border-box;
}

.pc-column:last-child {
    border-right: none;
}

.pc-title-column {
    background-color: #fff;
    color: #505050;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.pc-placeholder-column {
    background-color: #f1f1f1;
    color: #505050;
    cursor: pointer;
    transition: background-color 0.2s ease;
}


.pc-add-button {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pc-plus {
    font-size: 24px;
    line-height: 1;
    font-weight: 600;
}

.pc-text {
    font-size: 14px;
    font-weight: 600;
}

/* Mobile Controls */
.pc-mobile-controls {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
    background-color: #fff;
}

.pc-mobile-intro h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #505050;
    font-weight: 600;
}

.pc-mobile-intro p {
    font-size: 16px;
    color: #505050;
    max-width: 300px;
    margin: 0 auto 20px auto;
    line-height: 1.4;
}

.pc-mobile-header {
    font-size: 18px;
    font-weight: 600;
    color: #505050;
    margin-bottom: 15px;
}

.pc-mobile-add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    color: #505050;
    width: 100%;
    padding: 20px 0;
    cursor: pointer;
    gap: 8px;
    transition: background-color 0.2s;
}

.pc-mobile-add-btn:hover {
    background-color: #e5e5e5;
}

/* Sidebar Styles */
.pc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.pc-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pc-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    visibility: hidden; /* Ukryty domyślnie */
}

.pc-sidebar.active {
    right: 0;
    visibility: visible; /* Widoczny po dodaniu klasy active */
}

.pc-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.pc-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #505050;
}

.pc-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

.pc-product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.pc-product-item:last-child {
    border-bottom: none;
}

.pc-product-img {
    max-width: 100%;
    height: auto;

}

.pc-product-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 1px;
    display: block;
    color: #505050;
    text-decoration: none;
}

.pc-compare-check {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.pc-compare-check input {
    margin: 0;
}

/* Specs Table Styles */
.pc-specs-container {
    margin-top: 20px;
    font-family: inherit;
}

.pc-specs-header {
    background: #d5d5d5;
    padding: 15px;
    font-weight: 600;
    color: #505050;
    font-size: 17px;
    border: 1px solid #ccc;
    border-bottom: none;
    cursor: pointer;
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 10px; /* Odstęp między tekstem a ptaszkiem */
    transition: background-color 0.2s;
}

.pc-specs-header:hover {
    background-color: #d7d7d7;
}

/* Strzałka zwijania/rozwijania */
.pc-specs-header::after {
    content: '';
    width: 8px;
    height: 8px;
    border: solid #505050;
    border-width: 0 2px 2px 0; /* Prawa i dolna krawędź */
    display: inline-block;
    transform: rotate(45deg); /* Strzałka w dół \/ */
    transition: transform 0.3s ease;
    margin-bottom: 2px;
}

/* Domyślnie w JS ustawiam 'expanded', więc: */
.pc-specs-header.expanded::after {
    transform: rotate(-135deg); /* Strzałka w górę /\ */
    margin-bottom: -2px;
}

.pc-specs-row {
    display: flex;
    width: 100%;
    border: 1px solid #fff;
    border-top: none;
}

.pc-specs-row:not(.pc-actions-row):nth-child(odd) {
    background-color: #f6f6f6;
}

.pc-spec-label {
    flex: 1;
    padding: 15px 25px;
    font-weight: 600;
    border-right: 1px solid #ccc;

    font-size: 14px;
    display: flex;
    align-items: center;
}

.pc-spec-value {
    flex: 1;
    padding: 15px 25px;

    border-right: 1px solid #ccc;
    display: flex;
    align-items: center;

    font-size: 14px;
    font-weight: 500;
    min-height: 50px; /* Ensure empty rows have height */
}

.pc-spec-value:last-child {
    border-right: none;
}

/* Product Content in Slot */
.pc-product-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    flex: 1;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.pc-slot-img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    margin-top: auto;
    margin-bottom: auto;
}

.pc-remove-btn {
    color: #e34646;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;

}

.pc-remove-btn:hover {
    background-color: #fff;
    box-shadow: none;

    color: #e34646;
}
.pc-remove-btn svg.close-btn
{
    width:15px;
    height: 15px;
}
.pc-slot-name {
    font-weight: 600;
    color: #505050;
    font-size: 16px;
    text-decoration: underline;
    text-decoration-color: #c3cc21;
}

.pc-slot-link {
    text-decoration: none;
}

/* Przycisk "Check" używa .button-all / .button-green (jak przyciski kategorii) – generowany w JS */

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Show Mobile Controls */
    .pc-mobile-controls {
        display: flex;
    }
    
    /* Hide empty placeholder columns on mobile */
    .pc-placeholder-column:not(.pc-slot-filled) {
        display: none !important;
    }
    
    /* Hide empty spec values and action cells on mobile */
    .pc-spec-value:not(.pc-cell-filled),
    .pc-action-cell:not(.pc-cell-filled) {
        display: none !important;
    }

    /* Hide title column only - show label column but differently */
    .pc-title-column {
        display: none !important;
    }

    /* Show label inside the row as a full-width header */
    .pc-spec-label {
        display: flex !important;
        width: 100%;
        flex: 0 0 100%;
        justify-content: center;
        text-align: center;
        padding: 12px;
        background-color: #f6f6f6; 
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        color: #505050;
        font-weight: 600;
    }

    /* Enable wrapping to push values to next line */
    .pc-specs-row {
        flex-wrap: wrap;
    }

    /* Values appear side by side below the label */
    .pc-spec-value {
        flex-direction: row;
        justify-content: center;
        text-align: center;
        padding: 15px 10px;
        font-size: 13px;
        flex: 1; /* Equal width */
        border-right: 1px solid #e0e0e0;
        min-height: 40px;
    }

    /* Hide the pseudo-label ::before content */
    .pc-spec-value::before {
        display: none !important;
    }

    /* Remove right border from the last value cell */
    .pc-spec-value:last-child {
        border-right: none;
    }

    /* Ensure rows have consistent background */
    .pc-specs-row,
    .pc-specs-row:nth-child(odd),
    .pc-specs-row:not(.pc-actions-row):nth-child(odd) {
        background-color: #fff !important; /* Clean white background for mobile */
        border: 1px solid #e0e0e0;
        margin-top: -1px; /* Collapse borders */
    }

    /* Adjust column widths since we now have 3 instead of 4 */
    .pc-column {
        flex: 1; 
    }
    
    /* Reduce sidebar width on mobile */
    .pc-sidebar {
        width: 300px;
    }
    
    .pc-sidebar.active {
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }

    /* Full width on mobile - ignore container padding */
    .product-compare-wrapper {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .product-compare-container {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
}

/* Animations */
@keyframes pcFadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pcFadeOutScale {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

.pc-anim-fade-out-scale {
    animation: pcFadeOutScale 0.3s forwards;
}

@keyframes pcFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pc-anim-fade-in-scale {
    animation: pcFadeInScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.pc-anim-fade-in-up {
    animation: pcFadeInUp 0.5s ease-out forwards;
}

/* Micro-interactions */
.pc-placeholder-column .pc-plus {
    transition: transform 0.2s ease;
}

.pc-placeholder-column:hover .pc-plus {
    transform: scale(1.2);
}


/* Accordion row animation */
.pc-specs-row {
    /* Istniejące style pozostają, dodajemy animację przy pojawianiu się */
    animation: pcFadeIn 0.3s ease-out;
}

/* Styles for filled slot */
.pc-placeholder-column.pc-slot-filled {
    background-color: #fff;
    cursor: default;
}

.pc-placeholder-column.pc-slot-filled:hover {
    background-color: #fff;
}

.pc-spec-value.pc-action-cell
{
    justify-content: center;
}