/* 
 * Nutrition Page Styles
 * FitTeen Australia Theme
 */

/* Supermarket Container */
.supermarket-container {
    margin: 2rem 0;
}

.aisle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.aisle-item {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
}

.aisle-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-green);
}

.aisle-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.aisle-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.aisle-count {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

/* Category Foods Section */
.category-section {
    margin-top: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.back-to-aisles {
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-aisles:hover {
    background: var(--secondary-green);
    transform: translateX(-2px);
}

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

.food-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

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

.food-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* View Details Button - ENHANCED */
.select-food-btn {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.select-food-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.select-food-btn:hover {
    background: linear-gradient(135deg, #45a049, #66bb69);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.select-food-btn:hover::before {
    left: 100%;
}

.select-food-btn:active {
    transform: translateY(0);
}

/* Food Details Modal */
.food-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.food-details-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.food-details-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.food-details-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.food-details-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-right: 3rem;
}

.nutrition-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.nutrition-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9ff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.nutrition-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    display: block;
}

.nutrition-label {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-weight: 500;
    margin-top: 0.25rem;
}

.food-guidelines {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.food-guidelines h4 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.food-guidelines p {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

/* Comparison Section */
.comparison-section {
    background: #f8f9ff;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
}

.comparison-section h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.comparison-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.food-select {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.food-select:focus {
    border-color: var(--primary-green);
    outline: none;
}

.vs-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-medium);
    padding: 0 1rem;
}

.compare-button {
    background: linear-gradient(135deg, var(--accent-orange), #ffb74d);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.compare-button:hover {
    background: linear-gradient(135deg, #f57c00, #ffb74d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.comparison-results {
    margin-top: 1rem;
}

/* Mobile Responsive for Nutrition */
@media (max-width: 768px) {
    .aisle-grid {
        grid-template-columns: 1fr;
    }
    
    .food-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-inputs {
        flex-direction: column;
    }
    
    .vs-text {
        order: 2;
        padding: 0.5rem 0;
    }
    
    .food-select {
        min-width: auto;
        width: 100%;
    }
    
    .food-details-content {
        margin: 1rem;
        width: calc(100% - 2rem);
        padding: 1.5rem;
    }
    
    .nutrition-info {
        grid-template-columns: repeat(2, 1fr);
    }
}