/* product-styles.css */

body {
    font-family: "Roboto", sans-serif;
    background-color: #fff0b3;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #ffc107;
    color: #333;
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

#searchBar {
    width: 80%;
    padding: 10px;
    border: 2px solid #333;
    border-radius: 5px;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.product-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 10px;
    padding: 10px;
    width: 200px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.product-item:hover {
    transform: scale(1.05);
}


.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 40%;
    max-width: 600px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    cursor: pointer;
}

.hidden {
    display: none;
}

label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"] {
    width: 70%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#additionalAttributes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.additional-attribute {
    display: none;
}

#saveBtn {
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

#saveBtn:hover {
    background-color: #218838;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.2em;
    }

    #searchBar {
        width: 90%;
    }

    .product-item {
        width: 80%;
    }

    .modal-content {
        width: 90%;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px;
    }

    header h1 {
        font-size: 1em;
    }

    #searchBar {
        width: 60%;
    }

    .product-item {
        width: 60%;
    }

    .modal-content {
        width: 90%;
    }

    #additionalAttributes {
        grid-template-columns: 1fr;
    }
}