/* Общи стилове */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: url('../assets/clothes_store.jpg') no-repeat center center fixed;
    background-size: cover;
    background-attachment: fixed;
    color: #333;
    padding-top: 65px; /* височината на navbar + малко */
}

h2 {
    text-align: center;
    margin-top: 20px;
}

/* Navbar */
.navbar {
    position: fixed; /* фиксиран на екрана */
    top: 0;
    left: 0;
    width: 100%;
    background: #4CAF50;
    padding: 15px;
    display: flex;
    justify-content: center;
    z-index: 1000; /* да е над останалото съдържание */
}

.navbar a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-size: 18px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.navbar a:hover {
    background: #45a049;
}

/* Search section */
#searchDiv {
    display: flex;
    justify-content: center;   /* центриране хоризонтално на съдържанието */
    align-items: center;       /* центриране вертикално */
    gap: 10px;                 /* разстояние между елементите */
    margin: 20px auto;         /* центриране на блока */
    padding: 10px 15px;        /* вътрешен отстъп */
    background: #45a049;       /* зелен фон */
    border-radius: 25px;       /* заоблени краища */
    width: max-content;        /* ширината се адаптира към съдържанието */
    flex-wrap: wrap;            /* ако няма място, нов ред */
    color: white;
}



#searchDiv label {
    font-weight: bold;
    margin-right: 5px;
    color: white;
}


#searchDiv input, #searchDiv select {
    padding: 5px 10px;
    margin-right: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#searchDiv button {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    transition: background 0.3s;
}



#searchBtn {
    background: #2196F3; /* син фон */
}

#searchBtn:hover {
    background: #1976D2; /* по-тъмен син при hover */
}

/* Нулирай – червен */
#resetBtn {
    background: #f44336; /* червен фон */
}

#resetBtn:hover {
    background: #d32f2f; /* по-тъмен червен при hover */
}


/* Tables */
table {
    width: 60%;
    margin: 0 auto 30px auto;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

th, td {
    padding: 10px;
    text-align: center;
}

th {
    background: #4CAF50;
    color: white;
}

tr:nth-child(even) {
    background: #f2f2f2;
}

/* Buttons in table */
button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    transition: background 0.3s;
}

.edit-btn {
    background: #2196F3;
}

.edit-btn:hover {
    background: #1976D2;
}

.delete-btn {
    background: #f44336;
}

.delete-btn:hover {
    background: #d32f2f;
}

/* Forms (Add/Edit) */
#addDiv, #editDiv {
    margin: 20px auto;
    padding: 20px;
    width: 450px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#addDiv table, #editDiv table {
    width: 100%;
    border-collapse: collapse;
}

#addDiv td, #editDiv td {
    padding: 8px;
}

#addDiv label, #editDiv label {
    display: inline-block;
    text-align: right;
    margin-right: 10px;
}

#editDiv select, #editDiv input[type="text"] {
    width: 100%;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    text-align: center;
}

#addDiv select, #addDiv input[type="text"] {
    width: 100%;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    text-align: center;
}

#addDiv input[type="text"], #editDiv input[type="text"] {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#addDiv button, #editDiv button {
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

#addDiv button[type="submit"], #editDiv button[type="submit"] {
    background: #2196F3;
    color: white;
}

#addDiv button[type="submit"]:hover, #editDiv button[type="submit"]:hover {
    background: #1976D2;
}

#addDiv button[type="button"], #editDiv button[type="button"] {
    background: #f44336;
    color: white;
}

#addDiv button[type="button"]:hover, #editDiv button[type="button"]:hover {
    background: #d32f2f;
}

/* Save (Запази) – зелен */
.save-btn {
    padding: 6px 12px;
    border: none;
    cursor: pointer;
    background: #2196F3;
    color: white;
    transition: background 0.3s;
}

.save-btn:hover {
    background: #1976D2;
}

/* Cancel (Откажи) – червен, изглежда като бутон */
.cancel-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    background: #f44336;
    color: white;
    text-decoration: none;
    margin-left: 10px;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: #d32f2f;
}


/* Center all content in form rows */
label {
    text-align: right;
    display: block;
}
