/* General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f0e6; /* light beige */
    color: #4b3b2a; /* dark brown text */
    margin: 0;
    padding: 0;
}

a {
    color: #5a3e2b;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #8b5e3c;
    text-decoration: underline;
}

h1, h2, h3 {
    margin: 0;
}

/* Header  */
header {
    background-color: #d9cbb7; /* beige header */
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 a {
    color: #4b3b2a;
    font-size: 28px;
    font-weight: bold;
}

nav a {
    margin-left: 20px;
    font-weight: bold;
}

nav a:hover {
    color: #8b5e3c;
}

/* Main Content  */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/*  Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.product {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.product img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.product h3 {
    margin: 10px 0 5px 0;
    font-size: 18px;
}

.product p {
    margin: 5px 0;
    font-weight: bold;
}

/* Product Detail  */
.product-detail {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto 30px auto;
    text-align: center;
    transition: transform 0.3s;
}

.product-detail:hover {
    transform: translateY(-3px);
}

.product-detail img {
    display: block;
    margin: 10px auto;
    border-radius: 10px;
    max-width: 100%;
}

/* Forms */
form {
    margin-top: 15px;
}

input[type="number"],
input[type="email"],
input[type="password"] {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    border-color: #8b5e3c;
    box-shadow: 0 0 5px rgba(139,94,60,0.4);
}

button {
    background-color: #8b5e3c; /* brown */
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 5px;
    transition: background-color 0.2s, transform 0.2s;
}

button:hover {
    background-color: #5a3e2b;
    transform: translateY(-2px);
}

/*Cart Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

th, td {
    padding: 10px 15px;
    text-align: left;
}

th {
    background-color: #d9cbb7;
}

tr:nth-child(even) {
    background-color: #f5f0e6;
}

/* Remove button style */
button[name="remove"] {
    background-color: #c95c4b;
    padding: 5px 10px;
}

button[name="remove"]:hover {
    background-color: #a03e32;
}

/* Footer  */
footer {
    background-color: #d9cbb7;
    padding: 15px;
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #4b3b2a;
}

/* Responsive  */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    header h1 {
        font-size: 22px;
    }

    nav a {
        margin-left: 10px;
        font-size: 14px;
    }

    input[type="number"] {
        width: 60px;
    }
}

/* Product Filter  */
.filter-form {
    background-color: #ffffff;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form input[type="text"],
.filter-form input[type="number"] {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    min-width: 160px;
    font-size: 14px;
}

.filter-form button {
    background-color: #8b5e3c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.filter-form button:hover {
    background-color: #5a3e2b;
}

.filter-form a {
    font-weight: bold;
    color: #5a3e2b;
}
