body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

header {
    background: #333;
    color: #fff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #e8491d 3px solid;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
}

header li {
    float: left;
    display: inline;
    padding: 0 20px 0 20px;
}

header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
}

header nav {
    float: right;
    margin-top: 10px;
}

header .highlight, header .current a {
    color: #e8491d;
    font-weight: bold;
}

header a:hover {
    color: #cccccc;
    font-weight: bold;
}

/* Products */
.products {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 20px;
}

.product-item {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    width: 30%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    border-radius: 5px;
}

.product-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.product-item h3 {
    margin: 10px 0;
}

.price {
    color: #e8491d;
    font-size: 18px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.btn {
    display: inline-block;
    background: #e8491d;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    border: 0;
    cursor: pointer;
}

.btn:hover {
    background: #333;
}

/* Footer */
footer {
    padding: 20px;
    margin-top: 20px;
    color: #fff;
    background-color: #333;
    text-align: center;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background: #333;
    color: #fff;
}

.alert {
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }

    header {
        padding-top: 15px;
        min-height: auto;
    }

    header #branding {
        float: none;
        text-align: center;
        margin-bottom: 10px;
    }

    header #branding h1 {
        font-size: 20px;
    }

    header nav {
        float: none;
        margin-top: 0;
        text-align: center;
    }

    header ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    header li {
        float: none;
        padding: 5px 10px;
    }

    header a {
        font-size: 14px;
    }

    .products {
        flex-direction: column;
        align-items: center;
    }

    .product-item {
        width: 100%;
        max-width: 350px;
        margin-bottom: 15px;
    }

    .product-item img {
        max-height: 250px;
        object-fit: cover;
    }

    /* Cart table mobile */
    table {
        font-size: 14px;
    }

    table th, table td {
        padding: 8px 5px;
    }

    table td img {
        width: 40px !important;
    }

    /* Product detail page mobile */
    .container > div[style*="flex"] {
        flex-direction: column !important;
    }

    .container > div[style*="flex"] > div {
        min-width: auto !important;
        width: 100%;
    }

    .container > div[style*="flex"] img {
        max-width: 100% !important;
    }

    /* Buttons mobile */
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    /* Forms mobile */
    form[style*="max-width"] {
        max-width: 100% !important;
    }

    input[type="number"] {
        width: 60px !important;
    }

    select {
        width: 100% !important;
        max-width: 300px;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    header #branding h1 {
        font-size: 18px;
    }

    header li {
        padding: 5px 8px;
    }

    header a {
        font-size: 12px;
    }

    .product-item {
        padding: 15px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    table {
        font-size: 12px;
    }

    table th, table td {
        padding: 5px 3px;
    }

    .price {
        font-size: 16px;
    }
}
