/* Organic Product Catalog Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    color: #333;
}

/* Hide top info bar on mobile */
@media (max-width: 768px) {
    .top-info-bar {
        display: none !important;
    }
    
    /* Fix hero slider spacing on mobile */
    .hero-slider-wrapper {
        margin-top: 0 !important;
        padding-top: 0 !important;
        min-height: 400px !important;
        height: 60vh !important;
    }
    
    /* Ensure navbar is properly positioned */
    .navbar.fixed-top {
        top: 0 !important;
    }
    
    /* Adjust body padding for fixed navbar */
    body {
        padding-top: 0 !important;
    }
}

/* Header Styles */
.catalog-header {
    background: white;
    padding: 2rem 0 1rem;
    border-bottom: 1px solid #e9ecef;
}

.catalog-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.catalog-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .catalog-header {
        padding: 1rem 0 0.5rem;
    }
    
    .catalog-title {
        font-size: 1.5rem;
    }
    
    .catalog-subtitle {
        font-size: 0.9rem;
    }
}

/* Category Tabs */
.category-tabs {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.category-tabs-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
}

.category-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.category-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-tab .count {
    background: rgba(0,0,0,0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.category-tab.active .count {
    background: rgba(255,255,255,0.2);
}

/* Search and Filter Bar */
.search-filter-bar {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

/* Main Layout */
.products-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

/* Sidebar Filters */
.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.filter-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.filter-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-filter {
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.filter-option label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-count {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Products Grid */
.products-container {
    flex: 1;
}

.products-count {
    color: #6c757d;
    font-size: 0.9rem;
}

.sort-dropdown {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.badge-organic {
    background: var(--primary-dark);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-certification {
    background: #0d6efd;
    color: #fff;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-certification--certified-organic {
    background: var(--primary-dark);
}

.badge-certification--conventional {
    background: #0d6efd;
}

.badge-certification--in-conversion {
    background: #f57c00;
}

.badge-featured {
    background: var(--accent-amber);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-discount {
    background: var(--danger-color);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 1rem;
}

.product-category {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stars {
    color: #ffc107;
    font-size: 0.85rem;
}

.rating-count {
    color: #6c757d;
    font-size: 0.8rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.product-price .old-price {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.product-meta i {
    margin-right: 0.25rem;
}

.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.stock-badge.in-stock {
    background: rgba(90,116,44,0.12);
    color: var(--primary-dark);
}

.stock-badge.low-stock {
    background: rgba(248,175,24,0.15);
    color: #8a5a00;
}

/* Responsive */
@media (max-width: 992px) {
    .filters-sidebar {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .catalog-title {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.9rem;
        min-height: 2.6em;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .search-filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-box {
        max-width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}
