/**
 * Karsilastirma Sistemi — CSS (v3.48.0).
 * Tum renkler NECOX CSS degiskenleri uzerinden (preset uyumlu).
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Ilan karti — Karsilastir butonu (dinamik enjekte) */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.necox-ad-card {
    position: relative;
}

.necox-cmp-btn {
    position: absolute;
    top: 8px;
    right: 48px; /* favorite butonundan sonra */
    width: 30px;
    height: 30px;
    background: var(--necox-white, #fff);
    border: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 3;
    transition: background 0.15s, color 0.15s;
    color: var(--necox-text, #111);
}

.necox-cmp-btn:hover {
    background: var(--necox-muted-bg, #f3f4f6);
}

.necox-cmp-btn.is-active {
    background: var(--necox-primary, #111);
    color: var(--necox-primary-fg, #fff);
    border-color: var(--necox-primary, #111);
}

.necox-cmp-btn svg {
    width: 14px;
    height: 14px;
    display: block;
    stroke: currentColor;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Header Rozet */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.necox-cmp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--necox-white, #fff);
    border: 0.5px solid var(--necox-border-secondary, rgba(0,0,0,.3));
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    color: var(--necox-text, #111);
    transition: background 0.15s;
}

.necox-cmp-badge:hover {
    background: var(--necox-muted-bg, #f3f4f6);
}

.necox-cmp-badge__count {
    background: var(--necox-primary, #111);
    color: var(--necox-primary-fg, #fff);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 500;
    min-width: 18px;
    text-align: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Modal */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.necox-cmp-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.necox-cmp-modal.is-open {
    display: flex;
}

.necox-cmp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.necox-cmp-modal__content {
    position: relative;
    background: var(--necox-white, #fff);
    color: var(--necox-text, #111);
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.necox-cmp-modal__header {
    padding: 14px 18px;
    border-bottom: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.necox-cmp-modal__title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.necox-cmp-modal__count {
    background: var(--necox-primary, #111);
    color: var(--necox-primary-fg, #fff);
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 999px;
    font-weight: 500;
}

.necox-cmp-modal__sub {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--necox-muted, #666);
}

.necox-cmp-modal__close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: var(--necox-muted, #666);
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.necox-cmp-modal__body {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.necox-cmp-modal__empty {
    padding: 40px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--necox-muted, #666);
}

.necox-cmp-modal__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.necox-cmp-modal__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    border-radius: 8px;
    background: var(--necox-white, #fff);
}

.necox-cmp-modal__item-thumb {
    width: 44px;
    height: 44px;
    background: var(--necox-muted-bg, #f3f4f6);
    border-radius: 8px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.necox-cmp-modal__item-info {
    flex: 1;
    min-width: 0;
}

.necox-cmp-modal__item-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--necox-text, #111);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.necox-cmp-modal__item-meta {
    font-size: 11px;
    color: var(--necox-muted, #666);
}

.necox-cmp-modal__item-remove {
    width: 24px;
    height: 24px;
    background: var(--necox-muted-bg, #f3f4f6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    color: var(--necox-muted, #666);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.necox-cmp-modal__footer {
    padding: 12px 18px;
    border-top: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.necox-cmp-modal__clear {
    font-size: 11px;
    background: transparent;
    border: none;
    color: var(--necox-muted, #666);
    cursor: pointer;
    padding: 0;
}

.necox-cmp-modal__clear:hover {
    color: var(--necox-text, #111);
    text-decoration: underline;
}

.necox-cmp-modal__footer-actions {
    display: flex;
    gap: 8px;
}

.necox-cmp-modal__cancel,
.necox-cmp-modal__go {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    border: 0.5px solid var(--necox-border-secondary, rgba(0,0,0,.3));
    background: transparent;
    color: var(--necox-text, #111);
    font-weight: 400;
}

.necox-cmp-modal__go {
    background: var(--necox-primary, #111);
    color: var(--necox-primary-fg, #fff);
    border-color: var(--necox-primary, #111);
    font-weight: 500;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Karsilastirma Tablosu */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.necox-compare-wrap {
    width: 100%;
}

.necox-compare-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.necox-compare-toolbar__info {
    font-size: 12px;
    color: var(--necox-muted, #666);
}

.necox-compare-toolbar__clear {
    padding: 8px 14px;
    font-size: 12px;
    background: transparent;
    border: 0.5px solid var(--necox-border-secondary, rgba(0,0,0,.3));
    border-radius: 8px;
    cursor: pointer;
    color: var(--necox-text, #111);
}

.necox-compare-toolbar__clear:hover {
    background: var(--necox-muted-bg, #f3f4f6);
}

.necox-compare-table-wrap {
    border: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    border-radius: 8px;
    overflow-x: auto;
    max-width: 100%;
    background: var(--necox-white, #fff);
}

.necox-compare-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--necox-text, #111);
}

.necox-compare-table__label-col {
    width: 160px;
}

.necox-compare-table__ad-col {
    width: 200px;
}

.necox-compare-table__label {
    background: var(--necox-muted-bg, #f9fafb);
    padding: 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    color: var(--necox-muted, #666);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
}

.necox-compare-table__sticky {
    position: sticky;
    left: 0;
    z-index: 2;
}

.necox-compare-table__ad-head {
    padding: 16px 12px 14px;
    text-align: center;
    border-bottom: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    position: relative;
    vertical-align: top;
}

.necox-compare-table__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--necox-muted-bg, #f3f4f6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: var(--necox-muted, #666);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.necox-compare-table__remove:hover {
    background: var(--necox-danger, #dc2626);
    color: #fff;
}

.necox-compare-table__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--necox-muted-bg, #f3f4f6);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    text-decoration: none;
}

.necox-compare-table__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.necox-compare-table__thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.necox-compare-table__title {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--necox-text, #111);
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.necox-compare-table__title:hover {
    text-decoration: underline;
}

.necox-compare-table__value {
    padding: 12px;
    text-align: center;
    border-bottom: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    font-size: 12px;
    color: var(--necox-text, #111);
    word-break: break-word;
}

.necox-compare-table__value--highlight {
    font-size: 13px;
    font-weight: 500;
}

.necox-compare-table__value--muted {
    font-size: 11px;
    color: var(--necox-muted, #666);
}

.necox-compare-table__action-row td {
    border-bottom: none;
}

.necox-compare-table__view-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 11px;
    background: var(--necox-primary, #111);
    color: var(--necox-primary-fg, #fff);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.necox-compare-table__view-btn:hover {
    opacity: 0.9;
}

/* Bos durum */
.necox-compare-empty {
    padding: 60px 24px;
    text-align: center;
    border: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    border-radius: 8px;
    background: var(--necox-muted-bg, #fafafa);
}

.necox-compare-empty__icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--necox-white, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid var(--necox-border, rgba(0,0,0,.15));
    color: var(--necox-muted, #666);
}

.necox-compare-empty__title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--necox-text, #111);
}

.necox-compare-empty__desc {
    margin: 0 0 18px;
    font-size: 12px;
    color: var(--necox-muted, #666);
    line-height: 1.6;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.necox-compare-empty__btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 12px;
    background: var(--necox-primary, #111);
    color: var(--necox-primary-fg, #fff);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
}

/* Mobil */
@media (max-width: 640px) {
    .necox-cmp-badge__label {
        display: none;
    }
    .necox-compare-table__label-col {
        width: 120px;
    }
    .necox-compare-table__ad-col {
        width: 160px;
    }
    .necox-cmp-modal__content {
        max-height: 90vh;
    }
}
