/* --- Basic Reset & Utility --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* --- Header & Navigation --- */
header {
    background-color: #007bff; /* Primary Brand Color */
    color: white;
    padding: 10px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #0056b3;
}

/* --- Call-to-Action Button --- */
.cta-button {
    background-color: #28a745; /* Green Accent Color */
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 15px;
    transition: background-color 0.3s;
    border: none; /* For form buttons */
    cursor: pointer; /* For form buttons */
}

.cta-button:hover {
    background-color: #1e7e34;
}

/* --- Hero Section --- */
.hero {
    background-color: #e9ecef;
    text-align: center;
    padding: 60px 0;
}

.hero h2 {
    color: #007bff;
    margin-bottom: 10px;
}

/* --- General Section Styling --- */
section {
    padding: 40px 0;
}

section:nth-child(even) {
    background-color: #ffffff;
}

h3 {
    text-align: center;
    color: #007bff;
    margin-bottom: 30px;
}

/* --- Product Grid --- */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.product-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: 250px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-card .price {
    font-size: 1.2em;
    color: #ff5722; /* Orange for price */
    margin: 5px 0 15px;
}

.add-cart {
    background-color: #ffc107;
    color: #333;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    display: block;
    transition: background-color 0.3s;
}

.add-cart:hover {
    background-color: #e0a800;
}

/* --- Sell/Trade-In Form --- */
.sell-form {
    background-color: #f8f9fa;
    text-align: center;
}

.sell-form form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: left;
    background-color: white;
}

.sell-form label,
.sell-form input[type="text"],
.sell-form select,
.sell-form input[type="file"] {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.sell-form input[type="text"],
.sell-form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- Footer --- */
footer {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    nav ul {
        margin-top: 10px;
        justify-content: center;
    }
    .product-grid {
        flex-direction: column;
        align-items: center;
    }
    .product-card {
        width: 80%; /* Wider on small screens */
    }
}