/* NOVE DE JULHO MARKETPLACE - CSS PRODUTOS */
/* Arquivo: assets/css/produtos.css */
/* Descrição: Estilos específicos para páginas de produtos */
/* Data: 2024 */

/* Products Section */
.products-section {
    background: #f8f9fa;
    min-height: 100vh;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: block;
    padding: 0.75rem 1rem;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.filter-option:hover {
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
}

.filter-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Search Form */
.search-form .input-group {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 25px;
    overflow: hidden;
}

.search-form .form-control {
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
}

.search-form .form-control:focus {
    box-shadow: none;
}

.search-form .btn {
    border: none;
    border-radius: 0 25px 25px 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Price Filter */
.price-filter .form-control {
    text-align: center;
    font-weight: 600;
}

.price-filter .btn {
    border-radius: 25px;
    font-weight: 600;
}

/* Products Grid */
.products-grid {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Results Info */
.results-info {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.view-options .btn-group .btn {
    border-radius: 8px;
    margin: 0 2px;
}

/* No Results */
.no-results {
    padding: 4rem 2rem;
    text-align: center;
}

.no-results i {
    margin-bottom: 1rem;
}

.no-results h4 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.no-results p {
    margin-bottom: 2rem;
}

/* Product Card Enhancements */
.product-card {
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-badges .product-badge.discount {
    background: linear-gradient(135deg, #dc3545 0%, #c53030 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.product-actions .product-action-btn.favorite.active {
    background: #dc3545;
    color: white;
}

.product-actions .product-action-btn.favorite.active i {
    color: white;
}

/* Product Rating Enhancement */
.product-rating .rating-stars i {
    margin-right: 2px;
}

/* Pagination */
.pagination {
    margin-top: 3rem;
}

.pagination .page-link {
    border: 1px solid #dee2e6;
    color: #667eea;
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* Sort Options */
.form-select {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    appearance: none;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Loading States */
.product-card.loading {
    position: relative;
    overflow: hidden;
}

.product-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Filter Animations */
.filter-section {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Product Grid Animations */
.products-grid .product-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.5s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .filters-sidebar {
        margin-bottom: 2rem;
        position: static;
    }

    .products-grid {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .filters-sidebar {
        padding: 1.5rem;
    }

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

    .results-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .results-info .d-flex {
        flex-direction: column;
        align-items: center !important;
    }

    .view-options {
        margin-top: 1rem;
    }

    .product-card .card-body {
        padding: 1rem;
    }

    .product-image {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .products-section {
        padding: 2rem 0;
    }

    .filters-sidebar {
        padding: 1rem;
    }

    .products-grid {
        padding: 1rem;
    }

    .filter-title {
        font-size: 1rem;
    }

    .search-form .form-control {
        font-size: 0.9rem;
        padding: 12px 16px;
    }

    .search-form .btn {
        padding: 12px 16px;
    }

    .price-filter .row {
        gap: 0.5rem;
    }

    .price-filter .col-6 {
        flex: 0 0 48%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .filters-sidebar,
    .products-grid {
        background: #2c3e50;
        color: #ecf0f1;
    }

    .filter-title {
        color: #ecf0f1;
        border-bottom-color: #34495e;
    }

    .filter-option {
        color: #bdc3c7;
    }

    .filter-option:hover {
        background: #34495e;
        color: #ecf0f1;
    }

    .results-info {
        background: #34495e;
        border-color: #4a5f7a;
    }

    .no-results h4,
    .no-results p {
        color: #95a5a6;
    }
}

/* Print Styles */
@media print {
    .filters-sidebar,
    .product-actions,
    .pagination {
        display: none !important;
    }

    .products-grid {
        box-shadow: none;
        padding: 0;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
        margin-bottom: 1rem;
    }
}

/* Accessibility */
.filter-option:focus,
.search-form .btn:focus,
.form-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .filter-option {
        border: 1px solid #dee2e6;
    }

    .filter-option.active {
        border: 2px solid #000;
    }

    .product-card {
        border: 2px solid #dee2e6;
    }
}
