/* =============================================================================
   WC Produktų Palyginimas – compare.css
   ============================================================================= */

:root {
    --wcp-primary:   #1a1a2e;
    --wcp-accent:    #e94560;
    --wcp-green:     #10b981;
    --wcp-red:       #ef4444;
    --wcp-border:    #e5e7eb;
    --wcp-bg:        #ffffff;
    --wcp-bg-alt:    #f9fafb;
    --wcp-text:      #374151;
    --wcp-muted:     #9ca3af;
    --wcp-shadow:    0 4px 24px rgba(0,0,0,.10);
    --wcp-radius:    10px;
    --wcp-bar-h:     90px;
    --wcp-transition: 200ms ease;
}

/* ── Palyginti mygtukas ───────────────────────────────────────────────────────── */

.wcp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1.5px solid var(--wcp-border);
    border-radius: 20px;
    background: var(--wcp-bg);
    color: var(--wcp-text);
    cursor: pointer;
    transition: all var(--wcp-transition);
    margin-top: 8px;
    letter-spacing: .02em;
}

.wcp-btn:hover {
    border-color: var(--wcp-accent);
    color: var(--wcp-accent);
    transform: translateY(-1px);
}

.wcp-btn--added {
    background: var(--wcp-primary);
    border-color: var(--wcp-primary);
    color: #fff;
}

.wcp-btn--added:hover {
    background: var(--wcp-accent);
    border-color: var(--wcp-accent);
    color: #fff;
}

/* ── Sticky juosta apačioje ──────────────────────────────────────────────────── */

.wcb-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: var(--wcp-primary);
    color: #fff;
    box-shadow: 0 -4px 24px rgba(0,0,0,.20);
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(.4,0,.2,1);
}

.wcb-sticky-bar.is-visible {
    transform: translateY(0);
}

.wcb-sticky-bar__inner { overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Produktų elementai */
.wcb-bar__items {
    display: flex;
    gap: 10px;
    flex: 1;
}

.wcb-bar__item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    padding: 6px 10px 6px 6px;
    animation: wcb-slide-in .2s ease;
    min-width: 0;
    overflow: visible;
    position: relative;
}

@keyframes wcb-slide-in {
    from { opacity:0; transform: scale(.9) translateY(4px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}

.wcb-bar__thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255,255,255,.1);
}

.wcb-bar__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wcb-bar__name {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,.9);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.wcb-bar__remove {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--wcp-transition);
    flex-shrink: 0;
    overflow: hidden;
}

.wcb-bar__remove:hover { color: var(--wcp-red); }

/* Tušti slotai */
.wcb-bar__empty-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 64px;
    height: 60px;
    border: 1.5px dashed rgba(255,255,255,.2);
    border-radius: 8px;
    flex-shrink: 0;
    opacity: .5;
}

.wcb-bar__empty-icon {
    font-size: 20px;
    color: rgba(255,255,255,.4);
    line-height: 1;
}

.wcb-bar__empty-slot span {
    font-size: 9px;
    color: rgba(255,255,255,.3);
    text-align: center;
    line-height: 1.2;
}

/* Mygtukai */
.wcb-bar__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.wcb-bar__compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--wcp-accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--wcp-transition);
    white-space: nowrap;
}

.wcb-bar__compare-btn:hover {
    background: #c73652;
    transform: translateY(-1px);
    color: #fff;
}

.wcb-bar__compare-btn.is-disabled {
    opacity: .5;
    pointer-events: none;
}

.wcb-bar__count {
    background: rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 12px;
}

.wcb-bar__clear {
    background: none;
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.6);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--wcp-transition);
    text-align: center;
}

.wcb-bar__clear:hover {
    border-color: var(--wcp-red);
    color: var(--wcp-red);
}

/* ── Palyginimo puslapis ──────────────────────────────────────────────────────── */

.wcp-wrap {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px calc(var(--wcp-bar-h) + 40px);
}

.wcp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

.wcp-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    color: var(--wcp-primary);
    margin: 0;
}

.wcp-back-link {
    color: var(--wcp-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--wcp-transition);
}

.wcp-back-link:hover { color: var(--wcp-accent); }

/* ── Lentelė ─────────────────────────────────────────────────────────────────── */

.wcp-table-wrap {
    overflow-x: auto;
    border-radius: var(--wcp-radius);
    box-shadow: var(--wcp-shadow);
    border: 1px solid var(--wcp-border);
}

.wcp-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--wcp-bg);
    table-layout: fixed;
}

.wcp-col--label   { width: 160px; }
.wcp-col--product { width: calc((100% - 160px) / var(--wcp-cols, 2)); }

/* Eilutės */
.wcp-row { 
    border-bottom: 1px solid var(--wcp-border); 
    opacity: 0;
    transform: translateY(10px);
    animation: wcp-row-in 0.4s ease forwards;
}

@keyframes wcp-row-in {
    to { opacity: 1; transform: translateY(0); }
}

.wcp-row:nth-child(2)  { animation-delay: 0.05s; }
.wcp-row:nth-child(3)  { animation-delay: 0.1s; }
.wcp-row:nth-child(4)  { animation-delay: 0.15s; }
.wcp-row:nth-child(5)  { animation-delay: 0.2s; }
.wcp-row:nth-child(n+6){ animation-delay: 0.25s; }

.wcp-row:last-child { border-bottom: none; }
.wcp-row:nth-child(even) .wcp-cell--value { background: var(--wcp-bg-alt); }

/* Antraštės eilutė */
.wcp-row--header .wcp-cell--value {
    text-align: center;
    padding: 24px 16px 12px;
}

.wcp-row--image .wcp-cell--value img {
    max-width: 160px;
    height: 160px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    transition: transform var(--wcp-transition);
}

.wcp-row--image .wcp-cell--value img:hover {
    transform: scale(1.04);
}

.wcp-product-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--wcp-primary);
    text-decoration: none;
    line-height: 1.3;
    padding: 0 8px;
}

.wcp-product-title:hover { color: var(--wcp-accent); }

/* Celės */
.wcp-cell {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 13.5px;
}

.wcp-cell--label {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--wcp-muted);
    background: var(--wcp-bg-alt);
    border-right: 1px solid var(--wcp-border);
    white-space: nowrap;
    width: 160px;
}

.wcp-cell--label-empty { background: var(--wcp-bg-alt); }

.wcp-cell--value {
    text-align: center;
    color: var(--wcp-text);
    transition: background var(--wcp-transition);
    position: relative;
}

/* Geriausias badge */
.wcp-cell--best {
    background: #fef9ec !important;
}

.wcp-best-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 6px;
    letter-spacing: .03em;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
    animation: wcp-badge-pulse 2s infinite;
}

@keyframes wcp-badge-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); }
}

/* Statusų ženkliukai */
.wcp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.wcp-badge--green { background: #d1fae5; color: #065f46; }
.wcp-badge--red   { background: #fee2e2; color: #991b1b; }

/* Actions eilutė */
.wcp-row--actions .wcp-cell--value {
    padding: 20px 16px;
}

.wcp-remove-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: none;
    border: 1px solid var(--wcp-border);
    border-radius: 6px;
    padding: 6px;
    font-size: 12px;
    color: var(--wcp-muted);
    cursor: pointer;
    transition: all var(--wcp-transition);
}

.wcp-remove-btn:hover {
    border-color: var(--wcp-red);
    color: var(--wcp-red);
}

/* Diff juosta */
.wcp-diff-bar {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.wcp-diff-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--wcp-text);
    user-select: none;
}

.wcp-diff-toggle input { display: none; }

.wcp-diff-toggle__switch {
    width: 40px;
    height: 22px;
    background: var(--wcp-border);
    border-radius: 11px;
    position: relative;
    transition: background var(--wcp-transition);
}

.wcp-diff-toggle__switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform var(--wcp-transition);
}

.wcp-diff-toggle input:checked + .wcp-diff-toggle__switch {
    background: var(--wcp-accent);
}

.wcp-diff-toggle input:checked + .wcp-diff-toggle__switch::after {
    transform: translateX(18px);
}

.wcp-row--diff-same { display: none; }

/* Tuščias vaizdas */
.wcp-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--wcp-muted);
}

.wcp-empty__icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: .3;
}

.wcp-empty h2 {
    font-size: 22px;
    color: var(--wcp-primary);
    margin-bottom: 8px;
}

.wcp-shop-btn {
    margin-top: 20px;
    display: inline-block;
    padding: 12px 28px;
    background: var(--wcp-accent);
    color: #fff !important;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--wcp-transition);
}

.wcp-shop-btn:hover { background: #c73652; transform: translateY(-2px); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .wcb-sticky-bar__inner { overflow: hidden;
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .wcb-bar__name { max-width: 80px; }
    .wcb-bar__empty-slot { display: none; }

    .wcp-col--label { width: 100px; }
    .wcp-cell--label { font-size: 10px; width: 100px; }

    .wcp-title { font-size: 20px; }
}
