/* Fresh Box - Enhanced Shop Page Styles */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Barlow', sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fafafa;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header & Navigation */
.shop-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 20px 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #4A7C59;
}

.nav-cta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cart-icon {
    position: relative;
    font-size: 20px;
    color: #333;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #FF6B6B;
    color: white;
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Mega Menu Categories */
.mega-menu {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 20px 0;
}

.category-nav {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s;
    min-width: 120px;
    text-align: center;
}

.category-item:hover {
    background: #f8fdf9;
    transform: translateY(-2px);
}

.category-item.active {
    background: #e8f5e9;
}

.category-icon {
    font-size: 32px;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Quick Filters */
.quick-filters {
    background: #f8fdf9;
    padding: 16px 0;
    border-bottom: 1px solid #e8e8e8;
}

.filter-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tag:hover {
    border-color: #4A7C59;
    color: #4A7C59;
}

.filter-tag.active {
    background: #4A7C59;
    border-color: #4A7C59;
    color: white;
}

/* Shop Container */
.shop-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 40px 0;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 24px;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.filter-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

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

.filter-option label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    flex: 1;
}

/* Products Area */
.products-area {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.products-count {
    font-size: 16px;
    color: #666;
}

.sort-dropdown {
    padding: 10px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

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

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

.product-image-container {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: #f8f8f8;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-organic {
    background: #4A7C59;
    color: white;
}

.badge-local {
    background: #7FA650;
    color: white;
}

.badge-bestseller {
    background: #FFB800;
    color: white;
}

.badge-gf {
    background: #FF6B6B;
    color: white;
}

.badge-vegan {
    background: #00C853;
    color: white;
}

.product-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
}

.product-wishlist:hover {
    background: #FF6B6B;
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-size {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.stars {
    color: #FFB800;
    font-size: 14px;
}

.rating-count {
    font-size: 13px;
    color: #999;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.unit-price {
    font-size: 12px;
    color: #999;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: #4A7C59;
    transform: scale(1.02);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 0;
    color: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: #666;
}

/* AI-Powered Smart Bundles Section */
.smart-bundles-section {
    background: linear-gradient(135deg, #f0f9f4 0%, #e8f5e9 100%);
    padding: 80px 0;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.smart-bundles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4A7C59 0%, #7FA650 100%);
}

.smart-bundles-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ai-badge i {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.smart-bundles-title {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.2;
}

.smart-bundles-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.savings-highlight {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fbbf24;
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 15px;
    margin-left: 8px;
}

.bundles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Bundle Card */
.bundle-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.bundle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #4A7C59;
}

.bundle-header {
    background: linear-gradient(135deg, #4A7C59 0%, #7FA650 100%);
    color: white;
    padding: 20px;
    position: relative;
}

.bundle-type {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.bundle-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.bundle-confidence {
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bundle-products {
    padding: 24px;
}

.bundle-product-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bundle-product-item:last-child {
    border-bottom: none;
}

.bundle-product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f8f8;
}

.bundle-product-info {
    flex: 1;
}

.bundle-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.bundle-product-size {
    font-size: 12px;
    color: #999;
}

.bundle-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #4A7C59;
}

.bundle-footer {
    padding: 20px 24px;
    background: #f8fdf9;
    border-top: 2px dashed #e0e0e0;
}

.bundle-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bundle-prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.bundle-price {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
}

.bundle-savings {
    text-align: right;
}

.savings-badge {
    background: #FF6B6B;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.savings-amount {
    font-size: 12px;
    color: #666;
}

.add-bundle-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-bundle-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #4A7C59 0%, #7FA650 100%);
}

/* Loading State for Bundles */
.bundles-loading {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.bundles-loading i {
    font-size: 48px;
    color: #4A7C59;
    margin-bottom: 20px;
    display: block;
}

.bundles-loading-text {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

/* Empty State for Bundles */
.bundles-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bundles-empty i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.bundles-empty h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-weight: 700;
}

.bundles-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.browse-products-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #4A7C59;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.browse-products-btn:hover {
    background: #3a6449;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

/* AI Recommendations Section */
.ai-recommendations-section {
    background: white;
    padding: 80px 0;
}

.recommendations-header {
    text-align: center;
    margin-bottom: 50px;
}

.recommendations-title {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.recommendations-subtitle {
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.personalized-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.recommendations-carousel-wrapper {
    position: relative;
    padding: 0 60px;
}

.recommendations-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #4A7C59 #f0f0f0;
}

.recommendations-carousel::-webkit-scrollbar {
    height: 8px;
}

.recommendations-carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.recommendations-carousel::-webkit-scrollbar-thumb {
    background: #4A7C59;
    border-radius: 10px;
}

.recommendation-card {
    min-width: 250px;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #4A7C59;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #4A7C59;
    color: #4A7C59;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-nav-btn:hover {
    background: #4A7C59;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.left {
    left: 0;
}

.carousel-nav-btn.right {
    right: 0;
}

/* Recommendations Loading/Empty States */
.recommendations-loading,
.recommendations-empty {
    width: 100%;
    min-width: 100%;
    text-align: center;
    padding: 60px 40px;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.recommendations-loading i {
    font-size: 48px;
    color: #4A7C59;
    margin-bottom: 20px;
    display: block;
}

.recommendations-empty i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.recommendations-loading p,
.recommendations-empty p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .shop-container {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .bundles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .recommendations-carousel-wrapper {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
    
    .category-nav {
        gap: 16px;
    }
    
    .category-item {
        min-width: 90px;
        padding: 8px 12px;
    }
    
    .category-icon {
        font-size: 24px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    /* Smart Bundles Mobile */
    .smart-bundles-section {
        padding: 60px 0;
    }
    
    .smart-bundles-title {
        font-size: 32px;
    }
    
    .smart-bundles-subtitle {
        font-size: 16px;
    }
    
    .bundles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bundle-card {
        max-width: 100%;
    }
    
    .bundle-name {
        font-size: 20px;
    }
    
    .bundle-price {
        font-size: 24px;
    }
    
    /* Recommendations Mobile */
    .ai-recommendations-section {
        padding: 60px 0;
    }
    
    .recommendations-title {
        font-size: 32px;
    }
    
    .recommendations-subtitle {
        font-size: 16px;
        flex-direction: column;
    }
    
    .recommendations-carousel-wrapper {
        padding: 0 20px;
    }
    
    .carousel-nav-btn {
        display: none;
    }
    
    .recommendation-card {
        min-width: 200px;
    }
}
