:root {
    --primary: #003E7E;
    --accent: #C41E3A;
    --background: #f8f9fa;
    --text: #2c3e50;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.main-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    width: 100%;
}

.nav-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin: 0;
    text-align: center;
}

.tagline {
    color: var(--accent);
    font-style: italic;
    text-align: center;
    margin-bottom: 2rem;
}

/* Main Content */
main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Products */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    max-width: 400px;
    margin: 0 auto 1rem;
}

.product-card h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.price {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.description {
    color: #666;
    margin-bottom: 1.5rem;
}

.variants {
    margin-bottom: 1rem;
}

select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.buy-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: auto;
}

.buy-button:hover {
    opacity: 0.9;
}

/* Cart */
.cart-icon {
    text-decoration: none;
    font-size: 1.5rem;
    justify-self: end;
}

#cart-count {
    background: var(--accent);
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

.cart-items {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 2rem;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item img {
    width: 120px;
    height: auto;
    border-radius: 8px;
}

.item-details h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.item-price {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1rem;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-actions button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-summary {
    padding: 1.5rem;
    background: white;
    border-top: 2px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.button {
    display: inline-block;
    width: 100%;
    background: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: white;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* Product Image Transitions */
.product-image {
    transition: opacity 0.3s ease;
}

.product-image.fade {
    opacity: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-nav {
        padding: 1rem;
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

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

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .cart-item img {
        width: 80px;
    }

    .item-actions {
        margin-top: 1rem;
    }
}