/* Enhanced Interactive Features Styles */

/* Product Filter Styles */
.filter-section {
    background: #f8f9fa;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #d4af37;
    background: white;
    color: #d4af37;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #d4af37;
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #d4af37;
    color: white;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.search-container {
    position: relative;
    margin-bottom: 1rem;
}

#product-search {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#product-search:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
}

.price-range-container {
    margin-top: 1rem;
}

#price-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

#price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d4af37;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#price-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d4af37;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#price-display {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: bold;
    color: #d4af37;
}

#results-count {
    text-align: center;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

/* Product Comparison Styles */
.compare-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    transition: bottom 0.3s ease;
    z-index: 1000;
}

.compare-bar.active {
    bottom: 0;
}

.compare-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.compare-title {
    font-weight: bold;
    white-space: nowrap;
}

.compare-items {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.compare-item {
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.btn-compare, .btn-clear-compare {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

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

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

.btn-clear-compare {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.btn-clear-compare:hover {
    background: white;
    color: #2c3e50;
}

.add-to-compare {
    background: #f8f9fa;
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.add-to-compare:hover {
    background: #d4af37;
    color: white;
}

.add-to-compare.active {
    background: #d4af37;
    color: white;
}

/* Comparison Modal */
.comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #d4af37;
}

.comparison-table {
    padding: 2rem;
}

/* Image Gallery Zoom */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.zoom-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.zoom-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.zoom-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-close:hover {
    color: #d4af37;
}

.zoom-prev, .zoom-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-prev {
    left: -80px;
}

.zoom-next {
    right: -80px;
}

.zoom-prev:hover, .zoom-next:hover {
    background: rgba(212, 175, 55, 0.8);
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
    overflow: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid #d4af37;
}

.notification.show {
    transform: translateX(0);
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-info {
    border-left-color: #3498db;
}

.notification-success {
    border-left-color: #27ae60;
}

.notification-warning {
    border-left-color: #f39c12;
}

.notification-error {
    border-left-color: #e74c3c;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.notification-message {
    flex: 1;
    color: #2c3e50;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    margin-left: 1rem;
}

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

/* Product Card Enhancements */
.product-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.product-actions button {
    flex: 1;
    min-width: 120px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-section {
        padding: 1rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .compare-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .compare-items {
        justify-content: center;
    }
    
    .notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .zoom-prev, .zoom-next {
        display: none;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 480px) {
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions button {
        min-width: auto;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Smooth Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.slide-in-left.visible {
    transform: translateX(0);
}

.slide-in-right {
    transform: translateX(100%);
    transition: transform 0.5s ease;
}

.slide-in-right.visible {
    transform: translateX(0);
}

/* Accessibility Improvements */
.filter-btn:focus,
.add-to-compare:focus,
.btn-compare:focus,
.btn-clear-compare:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

.notification[role="alert"] {
    /* Screen reader announcements */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .filter-btn {
        border-width: 3px;
    }
    
    .notification {
        border-width: 2px;
        border-style: solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}