/*
 * Ürün listesi ve arama sonuçları (Views/Product/Index, Search; Views/Shared/Components/ProductTable)
 * Karşılaştırma çubuğu ve penceresi: css/Shared/compare-bar.css
 */

.pf-section {
    padding: 24px 0 60px;
}

.pf-wrap [hidden] {
    display: none !important;
}

.pf-wrap {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 24px;
    align-items: flex-start;
    font-size: 14px;
}

.pf-wrap--no-filters {
    grid-template-columns: minmax(0, 1fr);
}

/* ===== FİLTRELER ===== */

.pf-sidebar {
    padding: 20px;
    border: 1px solid #dde1e7;
    border-top: 4px solid #feb324;
    background: #ffffff;
}

.pf-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f5;
}

.pf-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
    font-size: 13px;
    letter-spacing: 0.06em;
}

    .pf-sidebar-title::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 14px;
        background: #feb324;
    }

.pf-clear {
    padding: 3px 10px;
    border: 1px solid #feb324;
    background: transparent;
    color: #feb324;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.15s;
}

    .pf-clear:hover,
    .pf-clear:focus-visible {
        background: #feb324;
        color: #ffffff;
    }

.pf-group {
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.pf-group-title {
    width: 100%;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid #f5f5f5;
    color: #999999;
    font-size: 10px;
    letter-spacing: 0.1em;
}

    .pf-group-title i {
        width: 16px;
        margin-right: 6px;
        color: #f39c12;
        text-align: center;
    }

.pf-check-item {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 7px;
    padding: 5px 8px;
    border-left: 2px solid transparent;
    transition: all 0.12s;
}

    .pf-check-item:hover {
        border-left-color: #feb324;
        background: #f5f5f5;
    }

    .pf-check-item input[type="checkbox"] {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
        margin: 0;
        padding: 0;
        -webkit-appearance: checkbox;
        appearance: checkbox;
        accent-color: #feb324;
        cursor: pointer;
    }

    .pf-check-item label {
        margin: 0;
        color: #999999;
        font-size: 10px;
        font-weight: 500;
        line-height: 1.4;
        cursor: pointer;
    }

/* ===== ÜST BAR ===== */

.pf-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.pf-count-badge {
    padding: 5px 14px;
    border: 1px solid #dde1e7;
    background: #f5f5f5;
    color: #555555;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.pf-kva-info {
    color: #f39c12;
    font-size: 12px;
}

.pf-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #feb324;
    background: #fff8e6;
    color: #7a4f00;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
}

/* ===== TABLO ===== */

.pf-table-wrap {
    overflow-x: auto;
}

.pf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .pf-table th,
    .pf-table td {
        padding: 8px 12px;
        white-space: nowrap;
        vertical-align: middle;
    }

    .pf-table .pf-th-empty {
        border: none;
        background: transparent;
    }

    .pf-table .pf-th-group {
        padding: 6px 12px;
        border-right: 3px solid #ffffff;
        border-left: 3px solid #ffffff;
        background: #f7c948;
        color: #1a1a1a;
        font-size: 12px;
        font-weight: 400;
        letter-spacing: 1px;
        text-align: center;
    }

    .pf-table .row-cols th {
        border-bottom: 3px solid #feb324;
        background: #fafafa;
        color: #feb324;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-align: center;
        text-transform: uppercase;
    }

        .pf-table .row-cols th.pf-col-compare {
            width: 44px;
            color: #f39c12;
            font-size: 16px;
        }

        .pf-table .row-cols th.pf-col-image {
            width: 60px;
        }

        .pf-table .row-cols th.col-model {
            min-width: 200px;
            color: #555555;
            font-size: 12px;
            text-align: left;
        }

        .pf-table .row-cols th.pf-col-actions {
            width: 140px;
        }

    .pf-table tbody tr {
        border-bottom: 1px solid #eeeeee;
        transition: background 0.1s;
    }

        .pf-table tbody tr:nth-child(even) {
            background: #fafafa;
        }

        .pf-table tbody tr:hover {
            background: #fff8e6;
            box-shadow: inset 3px 0 0 #feb324;
        }

        .pf-table tbody tr.selected {
            background: #fef9e7;
        }

    .pf-table tbody td {
        border-right: 1px solid #eeeeee;
        color: #333333;
        text-align: center;
    }

        .pf-table tbody td:last-child {
            border-right: none;
        }

/* Tema (main.css) checkbox'ları gizleyip etiketle çiziyor; karşılaştırma kutusunun etiketi yok */
.pf-checkbox-cell input[type="checkbox"] {
    top: 0;
    width: 18px;
    height: 18px;
    margin: 0 auto;
    visibility: visible;
    -webkit-appearance: checkbox;
    appearance: checkbox;
    accent-color: #f39c12;
    cursor: pointer;
}

.pf-model-cell {
    min-width: 200px;
    max-width: 300px;
    white-space: normal !important;
    text-align: left !important;
}

.pf-model-code {
    display: inline-block;
    margin-bottom: 2px;
    color: #f39c12;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

    .pf-model-code:hover,
    .pf-model-code:focus-visible {
        color: #feb324;
    }

.pf-model-name {
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    word-wrap: break-word;
}

/* ===== GÖRSEL & BÜYÜTME ===== */

.pf-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dde1e7;
    background: #f5f5f5;
    cursor: zoom-in;
    transition: border-color 0.15s;
}

    .pf-thumb:hover,
    .pf-thumb:focus-visible {
        border-color: #feb324;
    }

    .pf-thumb img {
        width: 44px;
        height: 44px;
        object-fit: contain;
        transition: transform 0.2s;
    }

    .pf-thumb:hover img {
        transform: scale(1.15);
    }

.pf-thumb--empty {
    color: #cccccc;
    font-size: 20px;
    cursor: default;
}

.pf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}

    .pf-lightbox[hidden] {
        display: none;
    }

    .pf-lightbox img {
        max-width: 88vw;
        max-height: 88vh;
        object-fit: contain;
        border-radius: 4px;
        background: #ffffff;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
        cursor: default;
    }

.pf-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

    .pf-lightbox-close:hover,
    .pf-lightbox-close:focus-visible {
        border-color: #feb324;
        background: rgba(254, 179, 36, 0.15);
        color: #feb324;
    }

/* ===== İŞLEM BUTONLARI ===== */

.pf-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pf-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    background: #ffffff;
    color: #555555;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

    .pf-btn-action:hover,
    .pf-btn-action:focus-visible {
        border-color: #999999;
        color: #333333;
        text-decoration: none;
    }

.pf-btn-pdf:hover,
.pf-btn-pdf:focus-visible {
    border-color: #c0392b;
    background: #c0392b;
    color: #ffffff;
}

.pf-btn-detail:hover,
.pf-btn-detail:focus-visible {
    border-color: #2980b9;
    background: #2980b9;
    color: #ffffff;
}

.pf-btn-quote:hover,
.pf-btn-quote:focus-visible {
    border-color: #f39c12;
    background: #f39c12;
    color: #ffffff;
}

/* ===== BOŞ DURUM & SAYFALAMA ===== */

.pf-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 50px 25px;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.pf-empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #fff7ea;
    color: #f39c12;
    font-size: 30px;
}

.pf-empty-state-title {
    margin: 0;
    color: #444444;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.pf-pagination-nav {
    margin-top: 20px;
}

.pf-page-info {
    margin-bottom: 6px;
    color: #999999;
    font-size: 12px;
    text-align: center;
}

.pf-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 28px 0 12px;
}

.pf-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #555555;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

    .pf-page-btn:hover:not(:disabled):not(.active) {
        border-color: #f39c12;
        background: #fff8ee;
        color: #f39c12;
    }

    .pf-page-btn.active {
        border-color: #f39c12;
        background: #f39c12;
        box-shadow: 0 3px 10px rgba(243, 156, 18, 0.35);
        color: #ffffff;
        cursor: default;
    }

    .pf-page-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.pf-page-dots {
    color: #aaaaaa;
    letter-spacing: 2px;
}

/* ===== MOBİL ===== */

.pf-mobile-filter-toggle,
.pf-sidebar-close {
    display: none;
}

@media (max-width: 900px) {
    .pf-wrap {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .pf-sidebar {
        position: fixed;
        top: 0;
        left: -340px;
        z-index: 10000;
        width: 300px;
        max-width: 85vw;
        height: 100dvh;
        padding-top: 56px;
        overflow-y: auto;
        border-top: none;
        border-left: 4px solid #feb324;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);
        transition: left 0.28s ease;
    }

        .pf-sidebar.is-open {
            left: 0;
        }

    .pf-sidebar-close {
        position: absolute;
        top: 10px;
        right: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: none;
        background: #1a1a1a;
        color: #feb324;
        font-size: 18px;
        cursor: pointer;
    }

    .pf-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s;
    }

        .pf-sidebar-overlay.is-open {
            opacity: 1;
            visibility: visible;
        }

    .pf-mobile-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        border: none;
        background: #1a1a1a;
        color: #feb324;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        cursor: pointer;
    }

    .pf-active-tags {
        order: 3;
        width: 100%;
    }
}

/* Telefonda tablo kart görünümüne geçer */
@media (max-width: 768px) {
    .pf-table-wrap {
        overflow: visible;
    }

    .pf-table,
    .pf-table tbody,
    .pf-table td {
        display: block;
        width: 100%;
    }

        .pf-table thead {
            display: none;
        }

        /* İlk satır: görsel | model | karşılaştır; altında özellikler, en altta butonlar */
        .pf-table tbody tr {
            display: grid;
            grid-template-columns: 64px minmax(0, 1fr) auto;
            align-items: center;
            gap: 8px 14px;
            margin-bottom: 14px;
            padding: 14px 14px 12px;
            border: 1px solid #dde1e7;
            border-left: 4px solid #feb324;
            background: #ffffff !important;
            box-shadow: none !important;
        }

            .pf-table tbody tr.selected {
                border-left-color: #e6a420;
                background: #fff8e6 !important;
            }

        .pf-table tbody td {
            width: auto;
            padding: 0;
            border: none;
            text-align: left;
            white-space: normal;
        }

    .pf-checkbox-cell {
        grid-row: 1;
        grid-column: 3;
        text-align: right !important;
    }

    .pf-thumb-cell {
        grid-row: 1;
        grid-column: 1;
    }

    .pf-model-cell {
        grid-row: 1;
        grid-column: 2;
        min-width: 0;
        max-width: none;
    }

    .pf-thumb {
        width: 64px;
        height: 64px;
        margin: 0;
        border-radius: 4px;
    }

        .pf-thumb img {
            width: 58px;
            height: 58px;
        }

    .pf-model-name {
        font-size: 13px;
        line-height: 1.3;
    }

    .pf-table tbody td.pf-spec-cell {
        display: flex;
        grid-column: 1 / -1;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 4px;
        padding: 8px 10px;
        border-radius: 2px;
        background: #f8f9fb;
        font-size: 12px;
    }

        .pf-table tbody td.pf-spec-cell::before {
            content: attr(data-label);
            color: #888888;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.08em;
        }

    .pf-actions-cell {
        order: 1;
        grid-column: 1 / -1;
        margin-top: 4px;
        padding-top: 10px !important;
        border-top: 1px solid #f0f0f0 !important;
    }

    .pf-actions {
        justify-content: flex-start;
        gap: 8px;
    }

    .pf-btn-action {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    .pf-table tbody tr {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        padding: 10px;
    }

    .pf-thumb {
        width: 56px;
        height: 56px;
    }
}
