body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #222;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f39c12;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
}

nav a:hover {
    color: #f39c12;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.product-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    text-align: center;
}

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

.product-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-card h3 {
    margin: 0.5rem 0;
}

.product-card p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Product Detail */
.product-details {
    display: flex;
    gap: 4rem;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.product-details img {
    flex: 1;
    max-width: 500px;
    border-radius: 12px;
}

.product-info {
    flex: 1;
}

.product-info .price {
    font-size: 2rem;
    color: #e67e22;
    margin-bottom: 1.5rem;
}

/* Cart Styles */
.cart-page {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

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

.cart-item-details {
    flex: 2;
}

.cart-item-details input {
    width: 60px;
    padding: 5px;
    margin-top: 10px;
}

.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-container input {
    width: 100%;
    padding: 0.8rem;
    margin: 1rem 0;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Buttons */
button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button:hover {
    background: #219150;
}

.message {
    text-align: center;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.message.success { background: #d4edda; color: #155724; }
.message.error { background: #f8d7da; color: #721c24; }

@media (max-width: 768px) {
    .product-details, .cart-page {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}
