/* ==========================================================================
   PORÓWNYWARKA (aurora-cmp / aurora-compare)
   Plik: assets/css/components/compare.css
   ========================================================================== */

html.aurora-cmp-lock { overflow: hidden; }

/* Przycisk na karcie (obok quick view / wishlist) */
.kp-media .aurora-compare-toggle {
    position: absolute;
    top: 100px;
    right: 12px;
    z-index: 6;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, .92);
    color: var(--aurora-navy, #1e293b);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease, background .2s ease, color .2s ease;
}
.kp-card:hover .kp-media .aurora-compare-toggle { opacity: 1; transform: translateY(0); }
.aurora-compare-toggle:hover,
.aurora-compare-toggle.is-active { background: var(--aurora-indigo, #6366f1); color: #fff; }
@media (hover: none), (max-width: 768px) {
    .kp-media .aurora-compare-toggle { opacity: 1; transform: none; }
}

/* Pasek dolny */
.aurora-cmp-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 9997;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 20px;
    background: var(--aurora-navy, #1e293b);
    color: #fff;
    border-radius: 50px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, .3);
}
/* Ukryj pasek, gdy nic nie wybrano (atrybut hidden musi wygrać z display:flex) */
.aurora-cmp-bar[hidden] { display: none !important; }
.aurora-cmp-bar-count { font-size: 14px; }
.aurora-cmp-bar-count strong { font-size: 16px; }
.aurora-cmp-bar-actions { display: flex; gap: 8px; }
.aurora-cmp-open, .aurora-cmp-clear {
    border: none;
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.aurora-cmp-open { background: var(--aurora-gradient, linear-gradient(135deg, #f59e0b, #6366f1)); color: #fff; }
.aurora-cmp-clear { background: rgba(255, 255, 255, .12); color: #fff; }
.aurora-cmp-open:hover { filter: brightness(1.05); }
.aurora-cmp-clear:hover { background: rgba(255, 255, 255, .2); }

/* Modal */
.aurora-cmp-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.aurora-cmp-overlay.is-open { opacity: 1; visibility: visible; }

.aurora-cmp-modal {
    width: 100%;
    max-width: 900px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(20px) scale(.98);
    transition: transform .35s cubic-bezier(.165, .84, .44, 1);
}
.aurora-cmp-overlay.is-open .aurora-cmp-modal { transform: translateY(0) scale(1); }

.aurora-cmp-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--aurora-border, #e2e8f0);
}
.aurora-cmp-modal-head h3 { margin: 0; font-size: 18px; }
.aurora-cmp-close {
    width: 34px; height: 34px;
    border: none; border-radius: 50%;
    background: #f1f2f5; color: #555;
    font-size: 20px; cursor: pointer;
}
.aurora-cmp-close:hover { background: #e6e7eb; }

.aurora-cmp-body { overflow: auto; padding: 8px; }
.aurora-cmp-table-wrap { overflow-x: auto; }
.aurora-cmp-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.aurora-cmp-table th, .aurora-cmp-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    vertical-align: middle;
    font-size: 13.5px;
}
.aurora-cmp-table th {
    text-align: left;
    font-weight: 700;
    color: var(--aurora-slate, #64748b);
    background: #f8fafc;
    white-space: nowrap;
}
.aurora-cmp-row-head td { position: relative; padding-top: 30px; }
.aurora-cmp-thumb { display: block; width: 90px; height: 90px; margin: 0 auto 8px; border-radius: 10px; overflow: hidden; }
.aurora-cmp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.aurora-cmp-name { font-weight: 600; color: var(--aurora-navy, #1e293b); text-decoration: none; font-size: 13px; }
.aurora-cmp-remove {
    position: absolute; top: 6px; right: 6px;
    width: 22px; height: 22px; border: none; border-radius: 50%;
    background: #f1f5f9; color: #64748b; cursor: pointer; font-size: 15px; line-height: 1;
}
.aurora-cmp-remove:hover { background: #fee2e2; color: #dc2626; }
.aurora-cmp-price { font-weight: 700; color: var(--aurora-navy, #1e293b); }
.aurora-cmp-in { color: #16a34a; font-weight: 600; }
.aurora-cmp-out { color: #dc2626; font-weight: 600; }
.aurora-cmp-dash { color: #cbd5e1; }
.aurora-cmp-buy {
    display: inline-block; padding: 9px 16px; border-radius: 50px;
    background: var(--aurora-gradient, linear-gradient(135deg, #f59e0b, #6366f1));
    color: #fff; text-decoration: none; font-weight: 600; font-size: 13px;
}
.aurora-cmp-buy:hover { filter: brightness(1.05); }

.aurora-cmp-loader { display: flex; justify-content: center; padding: 60px; }
.aurora-cmp-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(0, 0, 0, .1);
    border-top-color: var(--aurora-indigo, #6366f1);
    border-radius: 50%;
    animation: aurora-cmp-spin .8s linear infinite;
}
@keyframes aurora-cmp-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    .aurora-cmp-bar { left: 10px; right: 10px; transform: none; justify-content: space-between; }
}
