/* Karşılaştır sayfası responsive */

.compare-table {
    min-width: 500px;
}

.compare-table th,
.compare-table td {
    min-width: 180px;
    vertical-align: middle;
}

.compare-table th:first-child,
.compare-table td:first-child {
    min-width: 120px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

.compare-table thead th:first-child {
    background: #fff;
}

.compare-table tbody th:first-child {
    background: #f8f9fa;
}

.compare-product-img {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
}

@media (max-width: 767.98px) {
    .sen-karsilastir .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-top: 1rem !important;
    }

    .sen-karsilastir h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    .table-responsive {
        position: relative;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .table-responsive::-webkit-scrollbar { display: none; }

    .compare-table {
        min-width: auto;
        border: 0;
    }
    .compare-table tr { border: 0; }
    .compare-table th,
    .compare-table td {
        min-width: 160px;
        padding: 0.55rem 0.6rem;
        border-color: #f0f0f0;
        font-size: 0.78rem;
    }
    .compare-table th:first-child,
    .compare-table td:first-child {
        min-width: 88px;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #64748b;
        padding: 0.55rem 0.55rem;
        background: #fafafa;
    }
    .compare-table tbody th:first-child { background: #fafafa; }

    .compare-table thead th { padding: 0.6rem 0.55rem; vertical-align: top; }
    .compare-table thead th .position-relative { padding-top: 6px; }
    .compare-table thead th h6 {
        font-size: 0.72rem;
        line-height: 1.25;
        margin-bottom: 4px;
        text-transform: none;
        font-weight: 600;
    }
    .compare-table thead th p {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    .compare-table thead th .btn {
        font-size: 0.62rem;
        padding: 0.45rem 0.5rem;
        letter-spacing: 0.5px;
    }
    .compare-table thead th .btn-link.text-danger {
        font-size: 0.85rem;
        padding: 0;
    }

    .compare-product-img {
        max-width: 110px;
        aspect-ratio: 3 / 4;
        border-radius: 6px;
    }

    .sen-karsilastir .text-center .btn {
        width: 100%;
    }

    .compare-add-cell {
        min-height: 180px;
        padding: 1rem 0.5rem;
    }
    .compare-add-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

@media (max-width: 575.98px) {
    .compare-table th,
    .compare-table td {
        min-width: 140px;
        padding: 0.5rem 0.5rem;
        font-size: 0.74rem;
    }
    .compare-table th:first-child,
    .compare-table td:first-child {
        min-width: 78px;
        font-size: 0.6rem;
    }
    .compare-product-img {
        max-width: 96px;
    }
    .compare-table thead th h6 {
        font-size: 0.7rem;
    }
    .compare-table thead th p {
        font-size: 0.78rem;
    }
}

.compare-add-cell {
    min-height: 220px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    transition: border-color .2s, color .2s, background .2s;
    color: #64748b;
}

.compare-add-cell:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    background: #fafafa;
}

.compare-add-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

@media (max-width: 575.98px) {
    .compare-add-cell {
        min-height: 160px;
    }
    .compare-add-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

.cmp-mobile { display: none; }
@media (max-width: 767.98px) {
    .cmp-mobile { display: block; }

    .cmp-urun-row {
        display: flex;
        gap: 6px;
        margin-bottom: 16px;
    }
    .cmp-urun-kart {
        flex: 1;
        min-width: 0;
        position: relative;
        padding: 8px 6px;
        border: 1px solid #ececec;
        background: #fff;
    }
    .cmp-kapat {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        color: #c0392b;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        font-size: 0.7rem;
        text-decoration: none;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }
    .cmp-urun-gorsel {
        display: block;
        margin-bottom: 8px;
        text-decoration: none;
    }
    .cmp-urun-gorsel img {
        width: 100%;
        aspect-ratio: 3 / 4;
        object-fit: cover;
        display: block;
    }
    .cmp-urun-bilgi {
        padding: 0 2px;
        margin-bottom: 8px;
    }
    .cmp-urun-ad {
        font-size: 0.7rem;
        line-height: 1.25;
        font-weight: 600;
        margin: 0 0 4px;
        color: #1a1a1a;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-transform: none;
    }
    .cmp-urun-fiyat {
        font-size: 0.85rem;
        font-weight: 700;
        color: #1a1a1a;
        margin: 0;
    }
    .cmp-urun-fiyat.cmp-stoksuz {
        color: #c0392b;
    }
    .cmp-urun-sepet {
        width: 100%;
        padding: 7px 4px;
        background: #1a1a1a;
        color: #fff;
        border: 0;
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        cursor: pointer;
        border-radius: 0;
    }
    .cmp-urun-sepet i {
        margin-right: 4px;
        font-size: 0.72rem;
    }

    .cmp-urun-ekle {
        flex: 1;
        min-width: 0;
        border: 2px dashed #cbd5e1;
        background: #fafafa;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 6px;
        text-decoration: none;
        color: #64748b;
        transition: border-color 0.2s, color 0.2s;
    }
    .cmp-urun-ekle:hover,
    .cmp-urun-ekle:active {
        border-color: #1a1a1a;
        color: #1a1a1a;
    }
    .cmp-ekle-ikon {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 1.5px solid currentColor;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
    }
    .cmp-ekle-yazi {
        font-size: 0.6rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: center;
        line-height: 1.2;
    }

    .cmp-ozellik-listesi {
        border-top: 1px solid #ececec;
    }
    .cmp-ozellik-satir {
        border-bottom: 1px solid #f3f3f3;
        padding: 10px 0 12px;
    }
    .cmp-ozellik-baslik {
        font-size: 0.62rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: #94a3b8;
        margin-bottom: 6px;
    }
    .cmp-ozellik-degerler {
        display: flex;
        gap: 6px;
    }
    .cmp-ozellik-deger {
        flex: 1;
        min-width: 0;
        font-size: 0.78rem;
        color: #1a1a1a;
        padding: 0 2px;
    }
    .cmp-stok-var {
        color: #16a34a;
        font-size: 0.74rem;
        font-weight: 600;
    }
    .cmp-stok-yok {
        color: #dc2626;
        font-size: 0.74rem;
        font-weight: 600;
    }
    .cmp-stok-var i,
    .cmp-stok-yok i {
        margin-right: 3px;
    }
}

.cmp-indirim-badge {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    letter-spacing: 0.4px;
    border-radius: 0;
}

.cmp-eski-fiyat {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.85rem;
}

.cmp-temizle:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}
