* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 2rem;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
}

.cart-link {
    background: rgba(255,255,255,0.2);
    font-weight: bold;
}

main {
    padding: 2rem 0;
}

h2 {
    margin-bottom: 2rem;
    color: #667eea;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.product-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.category {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 0.5rem;
}

.stock {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.3s;
}

.btn:hover:not(:disabled) {
    opacity: 0.9;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error {
    color: #e74c3c;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #fadbd8;
    border-radius: 5px;
}

.success {
    color: #27ae60;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #d5f4e6;
    border-radius: 5px;
}

.cart-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
}

.cart-table th {
    background: #667eea;
    color: white;
}

.cart-table tr:nth-child(even) {
    background: #f9f9f9;
}

.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}