/* Base Resets and Variables */
:root {
    --primary-color: #0056b3; /* Deep Blue for medical trust */
    --secondary-color: #007bff; /* Brighter blue for actions */
    --accent-color: #00d2ff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 10px 15px rgba(0,0,0,0.025);
    --hover-shadow: 0 10px 20px rgba(0,0,0,0.1), 0 15px 30px rgba(0,0,0,0.05);
    --border-radius: 12px;
    --transition: all 0.3s ease;

    /* Division Colors */
    --div-ethical: #e83e8c; /* Pink/Red for Ethical */
    --div-generic: #28a745; /* Green for Generic */
    --div-otc: #fd7e14; /* Orange for OTC */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.app-header {
    background-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.app-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 45px;
    object-fit: contain;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Hero Section */
.hero-section {
    padding: 60px 0;
    background: var(--white);
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: #999;
}

#searchInput {
    width: 100%;
    padding: 18px 20px 18px 55px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

#searchInput:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

/* Filters */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--white);
    border: 1px solid #dcdcdc;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background-color: #f0f0f0;
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

/* Products Section */
.products-section {
    padding: 50px 0;
}

.results-meta {
    margin-bottom: 25px;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 4px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.product-card.div-ethical { border-top-color: var(--div-ethical); }
.product-card.div-generic { border-top-color: var(--div-generic); }
.product-card.div-otc { border-top-color: var(--div-otc); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 10px;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
}

.badge-ethical { background-color: var(--div-ethical); }
.badge-generic { background-color: var(--div-generic); }
.badge-otc { background-color: var(--div-otc); }

.product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    font-size: 0.9rem;
}

.detail-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    color: var(--text-secondary);
}

.no-results svg {
    color: #ccc;
    margin-bottom: 15px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.hidden {
    display: none !important;
}

/* Footer */
.app-footer {
    background-color: var(--white);
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #eaeaea;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .filter-container {
        flex-direction: row;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}
