/* ========================================
   PORÓWNYWARKA AI - OPTIMIZED STYLES
   ======================================== */

/* ----- NAVIGATION ----- */
.interactable {
    cursor: pointer;
}

/* ----- CATEGORY TABS ----- */
.category-tabs {
    font-family: 'Barlow', sans-serif;
    margin-bottom: 3rem; /* Zwiększony margines dolny */
}

.tabs-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px; /* Zwiększony odstęp */
}

.tab-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 24px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Barlow', sans-serif;
}

.tab-button:hover {
    border-color: #B92B27;
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(185, 43, 39, 0.1);
}

.tab-button:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 4px 8px rgba(185, 43, 39, 0.15);
}

.tab-button.active {
    background: #B92B27;
    border-color: #B92B27;
    color: white;
    box-shadow: 0 8px 24px rgba(185, 43, 39, 0.3);
    transform: translateY(-4px);
}

.tab-icon {
    width: 28px;
    height: 28px;
    transition: all 0.2s ease-in-out;
    color: #6b7280;
}

.tab-button:hover .tab-icon {
    color: #B92B27;
}

.tab-button.active .tab-icon {
    color: white;
}

.tab-label {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.tab-button.active .tab-label {
    color: white;
}

/* Mobile tabs */
@media (max-width: 640px) {
    .tabs-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tab-button {
        padding: 16px 12px;
        gap: 8px;
    }

    .tab-icon {
        width: 24px;
        height: 24px;
    }

    .tab-label {
        font-size: 13px;
    }
}

/* ----- PERSONA SELECTOR ----- */
.persona-selector-wrapper {
    font-family: 'Barlow', sans-serif;
}

.persona-card {
    position: relative;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    overflow: hidden;
}

.persona-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #B92B27 0%, #E85D4C 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.persona-card:hover::before,
.persona-card.active::before {
    transform: scaleX(1);
}

.persona-card:hover {
    border-color: #B92B27;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(185, 43, 39, 0.15);
}

.persona-card.active {
    border-color: #B92B27;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE5E5 100%);
    box-shadow: 0 8px 24px rgba(185, 43, 39, 0.2);
}

.persona-icon {
    font-size: 40px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.persona-card:hover .persona-icon {
    transform: scale(1.15);
}

.persona-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.persona-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.persona-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #B92B27;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.persona-card.active .persona-check {
    opacity: 1;
    transform: scale(1);
}

#reset-persona {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#reset-persona:hover {
    background: #f3f4f6;
}

/* Mobile persona selector */
@media (max-width: 768px) {
    .persona-card {
        padding: 16px 12px;
    }

    .persona-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .persona-title {
        font-size: 14px;
    }

    .persona-desc {
        font-size: 11px;
    }
}

/* ----- CATEGORY CHECKBOX FILTERS ----- */
.category-filters-wrapper {
    font-family: 'Barlow', sans-serif;
}

.category-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.category-checkbox:hover {
    border-color: #B92B27;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(185, 43, 39, 0.1);
}

.category-checkbox.checked {
    border-color: #B92B27;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE5E5 100%);
    box-shadow: 0 4px 12px rgba(185, 43, 39, 0.15);
}

.checkbox-icon {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.category-checkbox:hover .checkbox-icon {
    transform: scale(1.1);
}

.checkbox-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.category-checkbox.checked .checkbox-label {
    color: #B92B27;
}

.checkbox-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #B92B27;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.category-checkbox.checked .checkbox-check {
    opacity: 1;
    transform: scale(1);
}

/* Mobile checkbox filters */
@media (max-width: 768px) {
    .category-checkbox {
        padding: 10px 14px;
        gap: 6px;
    }

    .checkbox-icon {
        font-size: 18px;
    }

    .checkbox-label {
        font-size: 13px;
    }
}

/* ----- TCO CALCULATOR MODAL ----- */
.tco-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow', sans-serif;
}

.tco-modal.hidden {
    display: none;
}

.tco-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.tco-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: tcoSlideUp 0.3s ease;
}

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

.tco-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.tco-modal-close:hover {
    background: #e5e7eb;
    color: #B92B27;
    transform: rotate(90deg);
}

.tco-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.tco-modal-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
}

.tco-question {
    margin-bottom: 28px;
}

.tco-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.tco-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tco-radio,
.tco-checkbox {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tco-radio:hover,
.tco-checkbox:hover {
    border-color: #B92B27;
    background: #fff5f5;
}

.tco-radio input[type="radio"]:checked + span,
.tco-checkbox input[type="checkbox"]:checked + span {
    font-weight: 700;
    color: #B92B27;
}

.tco-radio input,
.tco-checkbox input {
    margin-right: 12px;
    accent-color: #B92B27;
    width: 20px;
    height: 20px;
}

.tco-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.2s;
}

.tco-input:focus {
    outline: none;
    border-color: #B92B27;
}

.tco-calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #B92B27 0%, #E85D4C 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 24px;
}

.tco-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(185, 43, 39, 0.3);
}

.tco-results {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid #e5e7eb;
}

.tco-results-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

.tco-total {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tco-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.tco-total-amount {
    font-size: 36px;
    font-weight: 800;
    color: #16a34a;
}

.tco-breakdown {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tco-breakdown h5 {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.tco-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.tco-breakdown-item:last-child {
    border-bottom: none;
}

.tco-breakdown-item.tco-bonus {
    color: #16a34a;
    font-weight: 600;
}

.tco-recommendation {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE5E5 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #B92B27;
    font-size: 14px;
    line-height: 1.6;
}

/* Mobile */
@media (max-width: 768px) {
    .tco-modal-content {
        padding: 24px;
        max-height: 95vh;
    }

    .tco-modal-title {
        font-size: 24px;
    }

    .tco-total-amount {
        font-size: 28px;
    }
}

/* ----- FILTERS BAR (HORIZONTAL) ----- */
.filters-bar {
    font-family: 'Barlow', sans-serif;
    margin-bottom: 3rem;
}

#reset-filters {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

#reset-filters:hover {
    border-color: #B92B27;
    background: #B92B27;
    color: white;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Price Slider */
.price-slider {
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #B92B27;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.2s;
}

.price-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.price-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #B92B27;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    transition: transform 0.2s;
}

.price-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Filter Chips (Radio buttons styled as chips) */
.filter-chip {
    cursor: pointer;
    display: inline-block;
}

.chip-label {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    background: white;
    color: #6b7280;
}

.filter-chip input:checked + .chip-label {
    background: #B92B27;
    border-color: #B92B27;
    color: white;
}

.filter-chip:hover .chip-label {
    border-color: #B92B27;
}

/* ----- DESKTOP TABLE ----- */
.table-wrapper {
    width: 100%;
}

.table-container {
    border: 1px solid #e5e7eb;
}

.comparison-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
}

/* Thead Styling */
.comparison-table thead th {
    background: #fafafa;
    border-bottom: 2px solid #e5e7eb;
    padding: 20px 12px;
    text-align: center;
    font-weight: 700;
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    vertical-align: middle;
}

.sticky-col-header {
    width: 140px;
    min-width: 140px;
}

.product-header {
    position: relative;
    width: calc((100% - 140px) / 5);
}

.badge-editor {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 10px;
    background: #B92B27;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Body Cells */
.comparison-table tbody th {
    background: #fafafa;
    border-right: 2px solid #e5e7eb;
    border-bottom: 1px solid #f3f4f6;
    padding: 16px 12px;
    font-weight: 600;
    font-family: 'Barlow', sans-serif;
    text-align: left;
    font-size: 14px;
    color: #374151;
}

.comparison-table tbody td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: 14px;
    color: #1f2937;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background: #f9fafb;
}

/* Images Row */
.images-row td {
    padding: 24px 12px 16px;
}

.product-image-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
}

.product-image-placeholder span {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Barlow', sans-serif;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Brand Colors for Logos */
.chatgpt-logo {
    background: linear-gradient(135deg, #10a37f 0%, #0d8a6a 100%) !important;
    border-color: #10a37f !important;
}

.claude-logo {
    background: linear-gradient(135deg, #cc785c 0%, #b36749 100%) !important;
    border-color: #cc785c !important;
}

.jasper-logo {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: #8b5cf6 !important;
}

.notion-logo {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
    border-color: #000000 !important;
}

.canva-logo {
    background: linear-gradient(135deg, #00c4cc 0%, #00a3b3 100%) !important;
    border-color: #00c4cc !important;
}

/* New product logos */
.gemini-logo {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%) !important;
    border-color: #4285f4 !important;
}

.grok-logo {
    background: linear-gradient(135deg, #000000 0%, #333333 100%) !important;
    border-color: #000000 !important;
}

.perplexity-logo {
    background: linear-gradient(135deg, #00b4d8 0%, #0096c7 100%) !important;
    border-color: #00b4d8 !important;
}

.copyai-logo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-color: #6366f1 !important;
}

.writesonic-logo {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: #8b5cf6 !important;
}

.midjourney-logo {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-color: #f59e0b !important;
}

.leonardo-logo {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
    border-color: #ec4899 !important;
}

.manus-logo {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
    border-color: #14b8a6 !important;
}

.dalle-logo {
    background: linear-gradient(135deg, #10a37f 0%, #0d8a6a 100%) !important;
    border-color: #10a37f !important;
}

.pika-logo {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border-color: #06b6d4 !important;
}

.runway-logo {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    border-color: #16a34a !important;
}

.higgsfield-logo {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border-color: #f97316 !important;
}

.heygen-logo {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
    border-color: #a855f7 !important;
}

.opusclip-logo {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: #ef4444 !important;
}

/* CTA Row */
.cta-row td {
    padding: 12px;
}

.price {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    font-family: 'Barlow', sans-serif;
    margin-bottom: 12px;
    line-height: 1;
}

.price span {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-left: 2px;
}

.cta-button {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    background: #B92B27;
    color: white;
    font-weight: 600;
    font-family: 'Barlow', sans-serif;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(185, 43, 39, 0.2);
}

.cta-button:hover {
    background: #a02621;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(185, 43, 39, 0.3);
}

.cta-button:active {
    transform: translateY(0);
}

/* Rating */
.rating {
    color: #fbbf24;
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.rating-value {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 13px;
    line-height: 1.8;
}

.features-list li {
    padding: 2px 0;
    color: #374151;
}

/* Check & Cross */
.check {
    color: #15803d;
    font-size: 18px;
    font-weight: bold;
}

.cross {
    color: #9ca3af;
    font-size: 18px;
}

/* Hidden columns/rows */
.comparison-table th.hidden,
.comparison-table td.hidden {
    display: none;
}

/* ----- MOBILE CARDS ----- */
.mobile-cards {
    display: block;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.product-card.hidden {
    display: none;
}

.product-card-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
    margin-bottom: 16px;
}

.product-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Barlow', sans-serif;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.product-card-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #B92B27;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
}

.product-card-image span {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Barlow', sans-serif;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card-price {
    text-align: center;
    margin-bottom: 16px;
}

.product-card-price .price {
    font-size: 36px;
    margin-bottom: 16px;
}

.product-card-cta .cta-button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.product-card-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.product-card-rating .rating {
    font-size: 20px;
}

.product-card-rating .rating-value {
    font-size: 16px;
}

.product-card-section {
    margin: 16px 0;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.product-card-section:last-child {
    border-bottom: none;
}

.product-card-section h4 {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Barlow', sans-serif;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-card-section ul li {
    padding: 6px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.product-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.product-card-label {
    font-weight: 600;
    color: #6b7280;
}

.product-card-value {
    font-weight: 500;
    color: #1a1a1a;
}

/* ----- FAQ ----- */
.faq-item {
    transition: all 0.2s ease;
}

.faq-item[open] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item summary {
    cursor: pointer;
    transition: color 0.2s;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '+';
    font-size: 24px;
    color: #B92B27;
    margin-right: 12px;
    display: inline-block;
    font-weight: 700;
}

.faq-item[open] summary::before {
    content: '−';
}

.faq-item summary:hover {
    color: #B92B27;
}

/* ----- ANIMATIONS ----- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes radar {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-radar {
    animation: radar 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.active\:pulse:active {
    animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.scroll-entry {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.scroll-entry.is-visible {
    opacity: 1;
}

/* ----- RESPONSIVE BREAKPOINTS ----- */

/* Tablet Adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .comparison-table {
        font-size: 13px;
    }

    .comparison-table thead th {
        padding: 16px 10px;
        font-size: 14px;
    }

    .comparison-table tbody th,
    .comparison-table tbody td {
        padding: 12px 8px;
    }

    .sticky-col-header {
        width: 120px;
        min-width: 120px;
    }

    .product-image-placeholder {
        width: 80px;
        height: 80px;
    }

    .price {
        font-size: 24px;
    }

    .cta-button {
        padding: 10px 12px;
        font-size: 13px;
    }

    .features-list {
        font-size: 12px;
    }
}

/* Mobile Specific */
@media (max-width: 768px) {
    /* Stack filters vertically on mobile */
    .filters-bar {
        padding: 16px;
    }

    .filters-bar > div {
        gap: 16px;
    }

    .filter-group {
        width: 100%;
    }

    /* Hide desktop table */
    .table-wrapper {
        display: none !important;
    }

    /* Show mobile cards */
    .mobile-cards {
        display: block !important;
    }

    /* Ensure mobile cards container is visible */
    #mobile-cards {
        display: block !important;
        visibility: visible !important;
    }

    /* Adjust FAQ for mobile */
    .faq-item summary::before {
        font-size: 20px;
        margin-right: 8px;
    }
}

/* Small Mobile (< 400px) */
@media (max-width: 400px) {
    .filters-bar {
        padding: 12px;
    }

    .filter-chip .chip-label {
        padding: 5px 12px;
        font-size: 13px;
    }

    .product-card {
        padding: 16px;
    }

    .product-card-header h3 {
        font-size: 18px;
    }

    .product-card-price .price {
        font-size: 32px;
    }
}

/* ----- PRINT STYLES ----- */
@media print {
    .filters-bar,
    .cta-button,
    nav,
    footer,
    .faq-item {
        display: none;
    }

    .table-wrapper {
        display: block !important;
    }

    .comparison-table {
        font-size: 10px;
    }

    .comparison-table thead th,
    .comparison-table tbody td {
        padding: 8px 6px;
    }
}

/* ----- ACCESSIBILITY ----- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for keyboard navigation */
.cta-button:focus,
.filter-chip input:focus + .chip-label,
#sort-select:focus,
#price-max:focus,
#price-max-input:focus {
    outline: 2px solid #B92B27;
    outline-offset: 2px;
}

/* ----- PERFORMANCE OPTIMIZATIONS ----- */
.cta-button,
.product-card,
.faq-item {
    will-change: transform;
    transform: translateZ(0);
}

/* ----- COMPARISON BAR ----- */
.comparison-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    color: white;
    padding: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.comparison-bar:not(.hidden) {
    transform: translateY(0);
}

.comparison-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.comparison-bar-title {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.comparison-count {
    color: #B92B27;
    font-size: 20px;
    margin-right: 4px;
}

.comparison-bar-products {
    flex: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comparison-product-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comparison-product-chip button {
    background: transparent;
    border: none;
    color: #B92B27;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin-left: 4px;
}

.comparison-product-chip button:hover {
    color: #FF4444;
}

.compare-btn {
    background: #B92B27;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.compare-btn:hover:not(:disabled) {
    background: #9a2421;
    transform: scale(1.05);
}

.compare-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.clear-comparison-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.clear-comparison-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.comparison-product {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.comparison-product.winner {
    border-color: #16a34a;
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.2);
}

.comparison-product-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.comparison-product-name {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
}

.comparison-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #B92B27;
}

.comparison-product-price span {
    font-size: 14px;
    color: #666;
}

.comparison-row {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-label {
    font-family: 'Barlow', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 4px;
}

.comparison-value {
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.5;
}

.winner-badge {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    display: inline-block;
}

@media (max-width: 768px) {
    .comparison-bar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .comparison-bar-title,
    .comparison-bar-products {
        text-align: center;
        justify-content: center;
    }

    .compare-btn,
    .clear-comparison-btn {
        width: 100%;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- PRODUCT MODAL ----- */
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.show {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #B92B27;
    color: white;
}

/* Mobile modal */
@media (max-width: 640px) {
    .modal-content {
        padding: 24px;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
        position: absolute;
        bottom: 0;
        width: 100%;
    }

    .product-modal.show .modal-content {
        transform: translateY(0);
    }

    .modal-content .flex.items-start.gap-4 {
        flex-wrap: wrap;
    }

    .modal-content .text-right {
        width: 100%;
        text-align: left;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f3f4f6;
    }
}

/* ========================================
   APP-LIKE MOBILE EXPERIENCE
   ======================================== */

/* Safe area for notched devices (iPhone X+) */
@supports (padding: max(0px)) {
    .mobile-cards {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .comparison-bar {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* Smooth native scrolling */
.mobile-cards {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Staggered card animations on load */
@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .product-card {
        animation: cardSlideUp 0.4s ease-out forwards;
        opacity: 0;
    }

    .product-card:nth-child(1) { animation-delay: 0.05s; }
    .product-card:nth-child(2) { animation-delay: 0.1s; }
    .product-card:nth-child(3) { animation-delay: 0.15s; }
    .product-card:nth-child(4) { animation-delay: 0.2s; }
    .product-card:nth-child(5) { animation-delay: 0.25s; }
    .product-card:nth-child(6) { animation-delay: 0.3s; }
    .product-card:nth-child(7) { animation-delay: 0.35s; }
    .product-card:nth-child(8) { animation-delay: 0.4s; }
    .product-card:nth-child(9) { animation-delay: 0.45s; }
    .product-card:nth-child(10) { animation-delay: 0.5s; }
}

/* Tap feedback - app-like press effect */
@media (max-width: 768px) {
    .product-card {
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .product-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .cta-button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    .tab-button:active,
    .category-checkbox:active,
    .filter-chip:active .chip-label {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Sticky filters on mobile - like app navigation */
@media (max-width: 768px) {
    .filters-bar {
        position: sticky;
        top: 80px; /* Below main nav */
        z-index: 40;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        margin-bottom: 20px;
    }
}

/* Horizontal scrollable filters - swipeable chips */
@media (max-width: 768px) {
    .category-filters-wrapper .flex.flex-wrap {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 8px;
        margin-bottom: -8px;
        gap: 8px !important;
    }

    .category-filters-wrapper .flex.flex-wrap::-webkit-scrollbar {
        display: none;
    }

    .category-checkbox {
        flex-shrink: 0;
    }
}

/* Better card spacing on mobile */
@media (max-width: 768px) {
    .mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 0 4px;
    }

    .product-card {
        border-radius: 20px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        border: none;
    }
}

/* Enhanced card header on mobile */
@media (max-width: 768px) {
    .product-card-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding-bottom: 20px;
    }

    .product-card-image {
        width: 80px;
        height: 80px;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .product-card-header h3 {
        font-size: 18px;
        margin-bottom: 4px;
    }
}

/* Floating CTA button on mobile - like app purchase button */
@media (max-width: 768px) {
    .product-card-cta {
        position: sticky;
        bottom: 0;
        background: linear-gradient(to top, white 80%, transparent);
        padding-top: 20px;
        margin-top: 16px;
        margin-left: -20px;
        margin-right: -20px;
        margin-bottom: -20px;
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 20px;
        border-radius: 0 0 20px 20px;
    }

    .product-card-cta .cta-button {
        border-radius: 14px;
        font-size: 15px;
        padding: 16px;
        font-weight: 700;
        box-shadow: 0 4px 16px rgba(185, 43, 39, 0.3);
    }
}

/* Quick action badges on mobile */
@media (max-width: 768px) {
    .product-card-badge {
        font-size: 11px;
        padding: 6px 14px;
        border-radius: 20px;
    }
}

/* Better price display on mobile */
@media (max-width: 768px) {
    .product-card-price {
        background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
        border-radius: 16px;
        padding: 16px;
        margin: 0 -4px 16px;
    }

    .product-card-price .price {
        font-size: 32px;
        color: #1a1a1a;
    }

    .product-card-price .price span {
        font-size: 14px;
        color: #6b7280;
    }
}

/* Collapsible sections on mobile - more app-like */
@media (max-width: 768px) {
    .product-card-section {
        border-radius: 12px;
        background: #fafafa;
        padding: 16px;
        margin: 12px -4px;
    }

    .product-card-section h4 {
        font-size: 12px;
        color: #B92B27;
        margin-bottom: 10px;
    }

    .product-card-section ul li {
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .product-card-section ul li:last-child {
        border-bottom: none;
    }
}

/* Pull indicator at top - subtle visual cue */
@media (max-width: 768px) {
    .mobile-cards::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #e5e7eb;
        border-radius: 2px;
        margin: 0 auto 20px;
    }
}

/* Empty state animation */
@keyframes emptyPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.mobile-cards:empty::after {
    content: 'Brak wyników dla wybranych filtrów';
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    animation: emptyPulse 2s ease-in-out infinite;
}

/* Rating stars more prominent on mobile */
@media (max-width: 768px) {
    .product-card-rating {
        background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
        border-radius: 12px;
        padding: 12px 16px;
        margin: 0 -4px 16px;
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        border-bottom: none;
    }

    .product-card-rating .rating {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .product-card-rating .rating-value {
        font-size: 14px;
        font-weight: 700;
        color: #92400e;
    }
}

/* Category tabs - horizontal scroll on mobile */
@media (max-width: 640px) {
    .tabs-wrapper {
        display: flex !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px;
        padding-bottom: 4px;
    }

    .tabs-wrapper::-webkit-scrollbar {
        display: none;
    }

    .tab-button {
        flex-shrink: 0;
        min-width: auto;
        padding: 14px 20px;
    }
}

/* Bottom safe area spacer */
@media (max-width: 768px) {
    .mobile-cards::after {
        content: '';
        display: block;
        height: 100px; /* Space for comparison bar */
    }
}

/* Improved touch targets - minimum 44px */
@media (max-width: 768px) {
    .filter-chip .chip-label,
    .category-checkbox,
    .tab-button {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Loading skeleton for cards */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.product-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 400px;
    border-radius: 20px;
}

.product-card.loading * {
    visibility: hidden;
}
