/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f9f9f9;
}
header {
    background-color: #000;
    color: white;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #ff0000;
}

/* NAV – Mobile First */
nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;                 /* equal spacing */
    margin: 0;
    padding: 0;
}

nav li {
    white-space: nowrap;       /* prevents breaking */
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #ff0000;
}


footer {
    background-color: #000;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive Navigation */
@media (min-width: 1024px) {

    header {
        padding: 1.2rem 3rem;
    }

    header h1 {
        font-size: 2rem;
    }

    nav ul {
        gap: 2.5rem;          /* more space on laptop */
    }

    nav a {
        font-size: 1rem;
    }
}
nav {
    overflow-x: auto;
}

nav ul {
    flex-wrap: nowrap;
}

/* Hero Section */
.hero {
    background-image: url('https://thumbs.dreamstime.com/z/inside-big-shop-19719092.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero h2 {
    position: relative;
    z-index: 1;
    font-size: 3rem;
    margin: 0;
}

.hero p {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
}

/* Sections */
section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 1rem;
}

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

.product {
    background: white;
    border: 1px solid #ddd;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s;
}

.product:hover {
    transform: scale(1.05);
}

.product img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product h3 {
    margin: 0.5rem 0;
}

.product p {
    color: #666;
}

/* Form */
form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea, button {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #ff0000;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #cc0000;
}

/* Cart */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

section {
    animation: fadeIn 1s;
}