/* ── Porovnání parfémů ──────────────────────────── */

/* Tlačítko na produktové kartě */
.product-card-compare {
    position: absolute;
    top: 10px;
    right: 50px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 0;
}
.product-card-compare:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: scale(1.08);
}
.product-card-compare.active {
    background: var(--color-text, #1a1a1a);
    color: #fff;
}
.product-card-compare.active svg {
    stroke: #fff;
}
.product-card-compare svg {
    pointer-events: none;
}

/* Menší verze pro carousel karty */
.product-card-small-img-wrap .product-card-compare {
    width: 30px;
    height: 30px;
    top: 8px;
    right: 44px;
}
.product-card-small-img-wrap .product-card-compare svg {
    width: 16px;
    height: 16px;
}

/* Tlačítko na detailu produktu */
.product-compare-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--color-border, #e5e5e5);
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    color: var(--color-text, #1a1a1a);
}
.product-compare-detail-btn:hover {
    border-color: var(--color-text, #1a1a1a);
}
.product-compare-detail-btn.active {
    background: var(--color-text, #1a1a1a);
    color: #fff;
    border-color: var(--color-text, #1a1a1a);
}
.product-compare-detail-btn.active svg {
    stroke: #fff;
}

/* ── Plovoucí lišta ────────────────────────────── */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border, #e5e5e5);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}
.compare-bar.visible {
    transform: translateY(0);
}
.compare-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.compare-bar-items {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.compare-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-bg-light, #f8f8f8);
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 0;
    max-width: 220px;
}
.compare-bar-item-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: #fff;
}
.compare-bar-item-info {
    min-width: 0;
    flex: 1;
}
.compare-bar-item-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text, #1a1a1a);
    display: block;
}
.compare-bar-item-brand {
    font-size: 11px;
    color: var(--color-muted, #999);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.compare-bar-item-remove {
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-muted, #999);
    font-size: 16px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}
.compare-bar-item-remove:hover {
    background: rgba(0,0,0,0.06);
    color: var(--color-text, #1a1a1a);
}

/* Prázdné sloty */
.compare-bar-slot-empty {
    width: 100px;
    height: 52px;
    border: 2px dashed var(--color-border, #e5e5e5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted, #999);
    font-size: 11px;
}

/* Akční tlačítka */
.compare-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.compare-bar-btn {
    padding: 12px 28px;
    background: var(--color-text, #1a1a1a);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}
.compare-bar-btn:hover {
    opacity: 0.85;
}
.compare-bar-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
.compare-bar-count {
    font-size: 12px;
    color: var(--color-muted, #999);
    white-space: nowrap;
}
.compare-bar-clear {
    background: none;
    border: none;
    color: var(--color-muted, #999);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
    transition: color 0.15s ease;
}
.compare-bar-clear:hover {
    color: var(--color-text, #1a1a1a);
}

/* ── Srovnávací stránka ────────────────────────── */
.compare-page {
    min-height: 60vh;
}
.compare-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 32px;
}

/* Prázdný stav */
.compare-empty {
    text-align: center;
    padding: 80px 20px;
}
.compare-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}
.compare-empty h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.compare-empty p {
    font-size: 14px;
    color: var(--color-muted, #999);
    margin-bottom: 24px;
}

/* Loader */
.compare-loader {
    text-align: center;
    padding: 80px 20px;
}

/* Grid srovnávací tabulky */
.compare-grid {
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 60px;
}

/* Řádek */
.compare-row {
    display: flex;
    flex-wrap: wrap;
}
.compare-row-label {
    width: 100%;
    padding: 10px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-muted, #999);
    background: #fafafa;
    border-top: 1px solid var(--color-border, #e5e5e5);
}
.compare-row-label-sub {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    font-size: 10px;
}

/* Buňka */
.compare-cell {
    padding: 12px 20px 16px;
    font-size: 14px;
    border-right: 1px solid var(--color-border, #e5e5e5);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    box-sizing: border-box;
}
.compare-cols-1 .compare-cell { width: 100%; }
.compare-cols-2 .compare-cell { width: 50%; }
.compare-cols-3 .compare-cell { width: 33.333%; }
.compare-cell:last-child {
    border-right: none;
}

/* Zvýraznění rozdílů */
.compare-row-diff .compare-cell {
    background: rgba(251, 191, 36, 0.04);
}
.compare-row-diff .compare-row-label {
    background: rgba(251, 191, 36, 0.08);
}

/* Obrázek */
.compare-row-image .compare-cell {
    justify-content: center;
    padding: 24px 16px;
    background: #fafafa;
}
.compare-product-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}
.compare-product-img-placeholder {
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: #f0f0f0;
    border-radius: 8px;
}

/* Odkaz na produkt */
.compare-product-link {
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    text-decoration: none;
}
.compare-product-link:hover {
    text-decoration: underline;
}

/* Ceny */
.compare-price {
    font-weight: 700;
    font-size: 16px;
}
.compare-price-old {
    text-decoration: line-through;
    color: var(--color-muted, #999);
    font-size: 13px;
}

/* Noty badges */
.compare-note {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
}
.compare-note--top {
    background: rgba(251, 191, 36, 0.1);
    color: #92400e;
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.compare-note--heart {
    background: rgba(244, 114, 182, 0.1);
    color: #9d174d;
    border: 1px solid rgba(244, 114, 182, 0.2);
}
.compare-note--base {
    background: rgba(167, 139, 250, 0.1);
    color: #5b21b6;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

/* Vůňový profil – sloupcový graf */
.compare-profile-chart {
    width: 100%;
}
.compare-profile-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.compare-profile-label {
    font-size: 11px;
    width: 55px;
    text-align: right;
    color: var(--color-muted, #999);
    flex-shrink: 0;
}
.compare-profile-track {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.compare-profile-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.compare-profile-val {
    font-size: 11px;
    font-weight: 600;
    width: 16px;
    text-align: center;
    color: var(--color-text, #1a1a1a);
}

/* Hvězdičky */
.compare-stars .star {
    font-size: 16px;
}
.compare-stars .star.filled { color: #f59e0b; }
.compare-stars .star.half { color: #f59e0b; opacity: 0.6; }
.compare-stars .star.empty { color: #e5e5e5; }
.compare-rating-text {
    font-size: 13px;
    color: var(--color-muted, #999);
    margin-left: 4px;
}

/* Akční řádky */
.compare-row-actions .compare-cell {
    justify-content: flex-end;
    padding: 8px 20px;
    background: #fafafa;
}
.compare-remove-btn {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--color-muted, #999);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s ease;
}
.compare-remove-btn:hover {
    color: #ef4444;
}

.compare-row-actions-bottom .compare-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 20px;
    border-top: 1px solid var(--color-border, #e5e5e5);
}
.compare-cart-btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 13px;
    letter-spacing: 1px;
}
.compare-detail-link {
    text-align: center;
    font-size: 13px;
    color: var(--color-muted, #999);
    text-decoration: underline;
}
.compare-detail-link:hover {
    color: var(--color-text, #1a1a1a);
}

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

/* Mobilní: horizontální scroll tabulky */
@media (max-width: 768px) {
    .compare-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    .compare-grid {
        min-width: 600px;
    }
    .compare-product-img {
        width: 120px;
        height: 120px;
    }
    .compare-cell {
        padding: 10px 14px 14px;
        font-size: 13px;
    }
    .compare-row-label {
        padding: 8px 14px 3px;
    }
}

@media (max-width: 768px) {
    .compare-bar-inner {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .compare-bar-items {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .compare-bar-items::-webkit-scrollbar {
        display: none;
    }
    .compare-bar-item {
        flex-shrink: 0;
    }
    .compare-bar-actions {
        width: 100%;
        justify-content: space-between;
    }
    .compare-bar-btn {
        flex: 1;
        text-align: center;
        padding: 11px 20px;
    }
    .compare-bar-slot-empty {
        display: none;
    }
    .product-card-compare {
        right: 48px;
    }
    .product-card-small-img-wrap .product-card-compare {
        right: 42px;
    }
}
@media (max-width: 480px) {
    .compare-bar-item {
        max-width: 160px;
    }
    .compare-bar-item-img {
        width: 34px;
        height: 34px;
    }
}
