/**
 * Modern Products Page Styles
 * Based on latest Material Tailwind and Catalyst UI design patterns
 */

/* Reset and Base Styles */
.modern-products-page {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

.modern-main {
    padding-top: 0;
}

/* Modern Hero Section */
.modern-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.modern-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.08) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 8px 16px;
    border-radius: 50px;
    color: #d4af37;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-icon {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Modern Search Bar */
.hero-search {
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    position: relative;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
    margin-left: 20px;
    margin-right: 12px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 16px 0;
    font-size: 16px;
    color: #1f2937;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-button {
    background: linear-gradient(135deg, #d4af37 0%, #f59e0b 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Container and Layout */
.modern-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Filter Sidebar */
.filter-sidebar {
    position: sticky;
    top: 100px;
}

.filter-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #d4af37;
}

.filter-icon {
    width: 20px;
    height: 20px;
    color: #d4af37;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-item:hover {
    background: #f8fafc;
    color: #1f2937;
}

.filter-item.active {
    background: linear-gradient(135deg, #d4af37, #f59e0b);
    color: white;
    font-weight: 500;
}

.filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.filter-item.active .filter-dot {
    opacity: 1;
}

.filter-count {
    margin-left: auto;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.filter-item.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

.filter-group {
    margin-top: 16px;
}

.filter-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    padding-left: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    min-width: 0;
}

/* Featured Section */
.featured-section {
    margin-bottom: 48px;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.section-icon {
    width: 28px;
    height: 28px;
    color: #d4af37;
}

.section-description {
    color: #6b7280;
    font-size: 16px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.main-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.featured-card {
    border: 2px solid #d4af37;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2);
}

.modern-card {
    /* Additional modern styling */
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.featured-badge {
    background: linear-gradient(135deg, #d4af37, #f59e0b);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.badge-icon {
    width: 12px;
    height: 12px;
}

/* Product Image */
.product-image-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8fafc;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    text-align: center;
}

.view-icon {
    width: 24px;
    height: 24px;
}

.overlay-content span {
    font-size: 14px;
    font-weight: 500;
}

/* Product Content */
.product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: calc(100% - 240px); /* Adjust based on image height */
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.stars {
    display: flex;
    gap: 1px;
}

.star {
    width: 12px;
    height: 12px;
    color: #e5e7eb;
}

.star.filled {
    color: #fbbf24;
}

.rating-text {
    font-size: 12px;
    color: #6b7280;
    margin-left: 4px;
}

.product-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.product-footer {
    margin-top: auto;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.price-main {
    font-size: 18px;
    font-weight: 700;
    color: #d4af37;
}

.price-secondary {
    font-size: 14px;
    color: #6b7280;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: #d4af37;
    background: #fef3c7;
}

.action-btn.active {
    background: #d4af37;
    border-color: #d4af37;
    color: white;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.product-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.meta-icon {
    width: 14px;
    height: 14px;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.results-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.search-term {
    color: #d4af37;
}

.results-count {
    color: #6b7280;
    margin: 4px 0 0 0;
}

.count-number {
    font-weight: 600;
    color: #1f2937;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.view-toggle {
    display: flex;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-btn svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.view-btn.active svg {
    color: #1f2937;
}

.sort-dropdown {
    position: relative;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 140px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-illustration {
    margin-bottom: 24px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: #d1d5db;
    margin: 0 auto;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.empty-description {
    color: #6b7280;
    margin-bottom: 24px;
}

.empty-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #d4af37, #f59e0b);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.empty-action svg {
    width: 16px;
    height: 16px;
}

/* Pagination */
.pagination-nav {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 16px;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-number:hover {
    background: #f8fafc;
    color: #1f2937;
}

.pagination-number.active {
    background: linear-gradient(135deg, #d4af37, #f59e0b);
    color: white;
}

.pagination-ellipsis {
    color: #9ca3af;
    padding: 0 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .filter-sidebar {
        position: static;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .filter-card {
        padding: 16px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .modern-container {
        padding: 20px 16px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .results-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination-numbers {
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-content {
        padding: 16px;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
        border-radius: 16px;
    }
    
    .search-button {
        width: 100%;
        border-radius: 12px;
    }
}

/* List View */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 16px;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    height: 200px;
}

.products-grid.list-view .product-image-container {
    width: 300px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.products-grid.list-view .product-content {
    flex: 1;
    height: auto;
    padding: 24px;
}

.products-grid.list-view .product-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.products-grid.list-view .product-title {
    font-size: 18px;
}

.products-grid.list-view .product-description {
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .products-grid.list-view .product-card {
        flex-direction: column;
        height: auto;
    }
    
    .products-grid.list-view .product-image-container {
        width: 100%;
        aspect-ratio: 4/3;
    }
}
