/*
 * DealFrance Main CSS
 * Additional styles for the theme
 */

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background-color: #007cba;
    color: white;
    text-decoration: none;
}

/* Enhanced Product Cards */
.product-card .deal-status {
    position: absolute;
    top: 50px;
    left: 12px;
    z-index: 10;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.new {
    background: #28a745;
    color: white;
}

.status-badge.hot {
    background: #dc3545;
    color: white;
    animation: pulse 1.5s infinite;
}

.status-badge.stale {
    background: #ffc107;
    color: #333;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Loading States */
.deals-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.skeleton-image {
    height: 200px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.skeleton-title {
    height: 20px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-button {
    height: 40px;
    border-radius: 4px;
    margin-top: 15px;
}

/* Enhanced Filters */
.filter-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Advanced Search */
.advanced-search {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
}

.search-suggestion:hover {
    background: #f8f9fa;
}

.search-suggestion:last-child {
    border-bottom: none;
}

/* Price Range Slider */
.price-range-slider {
    position: relative;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 20px 0;
}

.price-range-track {
    position: absolute;
    height: 100%;
    background: #007cba;
    border-radius: 3px;
}

.price-range-thumb {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #007cba;
    border: 2px solid white;
    border-radius: 50%;
    top: -7px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.warning {
    background: #ffc107;
    color: #333;
}

.notification.info {
    background: #17a2b8;
}

/* Comparison Feature */
.compare-button {
    position: absolute;
    top: 50px;
    right: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-card:hover .compare-button {
    opacity: 1;
}

.compare-button.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.comparison-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 15px 20px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.comparison-bar.active {
    transform: translateY(0);
}

.comparison-items {
    display: flex;
    gap: 15px;
    align-items: center;
}

.comparison-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
}

.comparison-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.comparison-controls {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

/* Wishlist Feature */
.wishlist-heart {
    color: #ccc;
    transition: color 0.3s ease;
}

.wishlist-heart.active {
    color: #dc3545;
    animation: heartbeat 0.6s ease-in-out;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-button.facebook {
    background: #1877f2;
    color: white;
}

.share-button.twitter {
    background: #1da1f2;
    color: white;
}

.share-button.whatsapp {
    background: #25d366;
    color: white;
}

.share-button.copy {
    background: #6c757d;
    color: white;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* Infinite Scroll */
.infinite-scroll-trigger {
    height: 1px;
    margin: 50px 0;
}

.load-more-button {
    display: block;
    width: 200px;
    margin: 40px auto;
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.load-more-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Enhanced Pagination */
.pagination-info {
    text-align: center;
    margin: 20px 0;
    color: #6c757d;
    font-size: 14px;
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quick-view-content {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.quick-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
}

.quick-view-body {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.quick-view-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #e9ecef;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
    
    .comparison-items {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .quick-view-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .filters-section,
    .pagination-container,
    .share-buttons,
    .wishlist-btn,
    .quick-view-btn,
    .compare-button {
        display: none !important;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .deals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .product-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .site-header {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .search-input,
    .filter-input {
        background: #2d2d2d;
        color: #e0e0e0;
        border-color: #404040;
    }
    
    .quick-view-content {
        background: #2d2d2d;
        color: #e0e0e0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .deal-button {
        border: 2px solid currentColor;
    }
    
    .discount-badge {
        border: 2px solid #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .notification {
        transition: none;
    }
}
