/* Enhanced Product Comparison Styles */

/* Floating Compare Button */
.floating-actions {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.comparison-toggle {
    position: relative;
}

.comparison-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c2185b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Add to Compare Button on Products */
.add-to-compare-btn {
    position: absolute;
    top: 50px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
    z-index: 5;
}

.add-to-compare-btn:hover,
.add-to-compare-btn.active {
    background: #c2185b;
    color: white;
    transform: scale(1.1);
    border-color: #c2185b;
}

/* Enhanced Comparison Panel */
.enhanced-comparison-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 380px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.enhanced-comparison-panel.visible {
    right: 0;
}

.comparison-panel-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #c2185b, #e91e63);
    color: white;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.comparison-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.comparison-items-list {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.empty-comparison {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-comparison i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-comparison p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.empty-comparison small {
    color: #999;
}

.comparison-item-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.comparison-item-enhanced:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-image {
    flex-shrink: 0;
}

.item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-price {
    font-size: 1rem;
    font-weight: 700;
    color: #c2185b;
    margin-bottom: 0.25rem;
}

.item-category {
    font-size: 0.8rem;
    color: #666;
    background: rgba(194, 24, 91, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

.remove-item-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.comparison-panel-actions {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compare-btn {
    padding: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.compare-btn.primary {
    background: #c2185b;
    color: white;
}

.compare-btn.primary:hover:not(:disabled) {
    background: #a91650;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(194, 24, 91, 0.3);
}

.compare-btn.primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.compare-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.compare-btn.secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Enhanced Comparison Modal */
.enhanced-comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.enhanced-comparison-modal.visible {
    opacity: 1;
    visibility: visible;
}

.comparison-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.comparison-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.comparison-modal-header {
    padding: 2rem;
    background: linear-gradient(135deg, #c2185b, #e91e63);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparison-modal-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.comparison-modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow: auto;
}

.comparison-table-container {
    overflow-x: auto;
}

.enhanced-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.enhanced-comparison-table th,
.enhanced-comparison-table td {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.enhanced-comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.feature-column {
    background: #c2185b !important;
    color: white !important;
    text-align: left !important;
    font-weight: 700;
}

.feature-label {
    font-weight: 600;
    color: #c2185b;
    text-align: left !important;
    background: rgba(194, 24, 91, 0.05);
}

.comparison-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #c2185b;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 2px;
}

.star-rating .filled {
    color: #ffc107;
}

.comparison-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-btn {
    background: #c2185b;
    color: white;
}

.view-btn:hover {
    background: #a91650;
    transform: translateY(-2px);
}

.remove-btn {
    background: #ff4757;
    color: white;
}

.remove-btn:hover {
    background: #ff3742;
    transform: translateY(-2px);
}

/* Enhanced Notifications */
.enhanced-notification {
    position: fixed;
    top: 2rem;
    right: -400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    transition: right 0.4s ease;
    display: flex;
    align-items: center;
    min-width: 350px;
    overflow: hidden;
}

.enhanced-notification.visible {
    right: 2rem;
}

.enhanced-notification.success {
    border-left: 4px solid #28a745;
}

.enhanced-notification.warning {
    border-left: 4px solid #ffc107;
}

.enhanced-notification.error {
    border-left: 4px solid #dc3545;
}

.enhanced-notification.info {
    border-left: 4px solid #17a2b8;
}

.notification-content {
    flex: 1;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.2rem;
}

.enhanced-notification.success .notification-content i {
    color: #28a745;
}

.enhanced-notification.warning .notification-content i {
    color: #ffc107;
}

.enhanced-notification.error .notification-content i {
    color: #dc3545;
}

.enhanced-notification.info .notification-content i {
    color: #17a2b8;
}

.notification-close {
    background: none;
    border: none;
    padding: 1rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: #666;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .floating-actions {
        right: 1rem;
        gap: 0.5rem;
    }
    
    .enhanced-comparison-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .comparison-modal-container {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .comparison-modal-body {
        padding: 1rem;
    }
    
    .enhanced-comparison-table th,
    .enhanced-comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .comparison-product-image {
        width: 60px;
        height: 60px;
    }
    
    .enhanced-notification {
        right: -100vw;
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
    
    .enhanced-notification.visible {
        right: 1rem;
    }
}