/**
 * Wishlist and Compare Pages Styles
 */

/* Compare Page */
.bl-compare-page,
.bl-wishlist-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.bl-compare-page h2,
.bl-wishlist-page h2 {
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

/* Compare Grid */
.bl-compare-grid,
.bl-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.bl-compare-product,
.bl-wishlist-product {
    position: relative;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    background: #fff;
    transition: all 0.3s ease;
}

.bl-compare-product:hover,
.bl-wishlist-product:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Compare Table */
.bl-compare-table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    background: #fff;
}

.bl-compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 800px;
}

.bl-compare-table th,
.bl-compare-table td {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.bl-compare-table th {
    background: #f8f9fa;
    font-weight: 600;
    width: 150px;
    text-align: left;
    color: #555;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bl-compare-table thead th {
    text-align: center;
    background: #fff;
    border-bottom: 2px solid #2271b1;
    position: relative;
}

.bl-compare-table .bl-col-actions {
    width: 50px;
    min-width: 50px;
}

/* Product Header */
.bl-compare-product-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bl-compare-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border: none;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.bl-compare-product-header:hover .bl-compare-remove {
    opacity: 1;
}

.bl-compare-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.bl-compare-img-link {
    display: block;
    line-height: 0;
}

.bl-compare-img {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bl-compare-img-link:hover .bl-compare-img {
    transform: scale(1.05);
}

.bl-compare-product-name {
    font-weight: 600;
    color: #222;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.bl-compare-product-name:hover {
    color: #2271b1;
}

.bl-compare-variation-name {
    display: block;
    font-size: 12px;
    color: #777;
    font-weight: normal;
    margin-top: 4px;
}

/* Price */
.bl-compare-price {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
}

/* Badges */
.bl-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bl-badge-success {
    background: #d4edda;
    color: #155724;
}

.bl-badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* Add to Cart Button */
.bl-compare-add-to-cart {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    background: #2271b1 !important;
    color: #fff !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    width: auto;
    min-width: 140px;
}

.bl-compare-add-to-cart:hover {
    background: #1a5f9e !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.bl-compare-add-to-cart.bl-btn-success {
    background: #28a745 !important;
}

.bl-btn-secondary {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: #f8f9fa !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.bl-compare-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Attributes */
.bl-compare-row-attr td {
    font-size: 14px;
    color: #444;
}

.bl-compare-na {
    color: #ccc;
    font-style: italic;
}

/* Actions Row */
.bl-compare-row-actions {
    background: #f8f9fa;
}

.bl-compare-row-actions td {
    padding: 20px;
}

/* Empty States */
.bl-compare-empty,
.bl-wishlist-empty,
.bl-wishlist-login-required {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.bl-compare-empty h2,
.bl-wishlist-empty h2,
.bl-wishlist-login-required h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.bl-compare-empty p,
.bl-wishlist-empty p,
.bl-wishlist-login-required p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

/* Remove button in empty state */
.bl-wishlist-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bl-wishlist-product:hover .bl-wishlist-remove {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .bl-compare-table {
        font-size: 13px;
    }
    
    .bl-compare-table th,
    .bl-compare-table td {
        padding: 12px 8px;
    }
    
    .bl-compare-img {
        max-width: 120px;
        max-height: 120px;
    }
}

/* Lightbox */
.bl-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.bl-lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.bl-lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.bl-lightbox-close:hover {
    color: #2271b1;
}

#bl-lightbox-caption {
    margin-top: 20px;
    color: #ccc;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
}

/* Compare Popup - Bottom Bar */
.bl-compare-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bl-compare-popup:hover {
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.2);
}

.bl-compare-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.bl-compare-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.bl-compare-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.bl-compare-popup-close:hover {
    color: #dc3545;
}

.bl-compare-popup-products {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.bl-compare-popup-products::-webkit-scrollbar {
    height: 6px;
}

.bl-compare-popup-products::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bl-compare-popup-products::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.bl-compare-popup-products::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.bl-compare-popup-item {
    position: relative;
    flex: 0 0 auto;
    width: 120px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.bl-compare-popup-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.bl-compare-popup-img-link {
    display: block;
    line-height: 0;
    margin-bottom: 8px;
}

.bl-compare-popup-img-link img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.bl-compare-popup-name {
    display: block;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.bl-compare-popup-remove {
    position: absolute;
    top: 5px;
    right: -8px;
    width: 22px;
    height: 22px;
    border: none;
    background: #dc3545;
    color: #fff;
    border-radius: 15%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.bl-compare-popup-item:hover .bl-compare-popup-remove {
    opacity: 1;
}

.bl-compare-popup-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.bl-compare-popup-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 12px;
}

a.bl-compare-popup-btn.bl-compare-popup-btn-primary{
    color: white;
}

.bl-compare-popup-btn {
    display: inline-block;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.bl-compare-popup-btn-primary {
    background: #2271b1;
    color: #fff;
}

.bl-compare-popup-btn-primary:hover {
    background: #1a5f9e;
    transform: translateY(-2px);
    color: #fff;
}

.bl-compare-popup-btn-secondary {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
}

.bl-compare-popup-btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .bl-compare-popup {
        padding: 12px 15px;
    }
    
    .bl-compare-popup-title {
        font-size: 14px;
    }
    
    .bl-compare-popup-item {
        width: 100px;
        padding: 8px;
    }
    
    .bl-compare-popup-img-link img {
        width: 60px;
        height: 60px;
    }
    
    .bl-compare-popup-name {
        font-size: 11px;
    }
    
    .bl-compare-popup-link {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* Floating Compare Icon */
.bl-compare-floating-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.bl-compare-floating-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #3282C1;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(50, 130, 193, 0.4);
    color: #fff;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

a.bl-compare-floating-link {
    color: #fff !important;
}

.bl-compare-floating-link:hover {
    background: #2a6fa8;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(50, 130, 193, 0.5);
}

.bl-compare-floating-link svg {
    width: 24px;
    height: 24px;
}

.bl-compare-floating-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: #e00000;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.bl-compare-floating-plus {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    color: #2271b1;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
