body {
    font-family: "Segoe UI", sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
    color: #333;
    max-width: 1200px;
    margin: auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.message {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    text-align: center;
}

.search-bar,
.product-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

input[type="text"],
input[type="number"],
button {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
}

button:hover {
    background-color: #0056b3;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
    overflow-x: auto;
}

thead {
    background-color: #007bff;
    color: white;
}

th,
td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

td button,
td a {
    margin: 2px;
    padding: 6px 10px;
    font-size: 0.9rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

td button {
    background-color: #ffc107;
    color: #333;
}

td a {
    background-color: #dc3545;
    color: white;
}

td button:hover {
    background-color: #e0a800;
}

td a:hover {
    background-color: #c82333;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .search-bar,
    .product-form {
        flex-direction: column;
        align-items: stretch;
    }

    input,
    button {
        width: 100%;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 10px;
        background: #fff;
        border-radius: 5px;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    td {
        text-align: right;
        position: relative;
        padding-left: 50%;
    }

    td::before {
        position: absolute;
        left: 10px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
    }

    td:nth-of-type(1)::before { content: "Name"; }
    td:nth-of-type(2)::before { content: "SKU"; }
    td:nth-of-type(3)::before { content: "Category"; }
    td:nth-of-type(4)::before { content: "Quantity"; }
    td:nth-of-type(5)::before { content: "Price"; }
    td:nth-of-type(6)::before { content: "Total"; }
    td:nth-of-type(7)::before { content: "Actions"; }
}
