:root {
    --primary: #385297;
    --primary-dark: #314884;
    --primary-darker: #2A3E72;
    --primary-darkest: #23345F;
    --primary-light: #3F5CAA;
    --primary-lighter: #4767BB;
    --primary-lightest: #5A76C2;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    background-color: #f9fafb;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Fixed Header & Footer */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 100%;
    padding: 0 2rem;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Main Content */
.main-content {
    width: 100%;
    margin-top: 64px; /* Height of navbar */
    margin-bottom: 80px; /* Height of footer */
    padding: 2rem;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-icon {
    width: 4rem;
    height: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #111827;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: #4b5563;
    max-width: 42rem;
    margin: 0 auto;
}

/* Products Section */
.products-section {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    text-align: center;
}

.products-section h2 {
    font-size: 2rem;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* For 2 cards scenario */
.products-grid:has(> .card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(350px, 1fr));
    justify-content: center;
    max-width: 800px;
}

/* Center last row items */
.products-grid:last-child {
    justify-content: center;
}

/* For single item in last row */
.products-grid > .card:last-child:nth-child(3n-2) {
    grid-column-start: 2;
}

/* View All Button */
.view-all-btn {
    display: inline-block;
    margin-top: 3rem;
    padding: 1rem 2rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.view-all-btn:hover {
    background-color: var(--primary-dark);
}

/* Products List Page Specific Styles */
.products-list-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 0.5rem;
}

.products-list-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.products-list-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.products-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-button {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 0.375rem;
    background: white;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-button:hover,
.filter-button.active {
    background: var(--primary);
    color: white;
}

/* Media Queries */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
