/* Paleta de colores: 
   Verde Bosque: #2d5a27
   Verde Hoja: #4caf50
   Fondo Suave: #f4f7f6
*/

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 0;
}

#contenedor {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Encabezado */
header {
    border-bottom: 3px solid #2d5a27;
    margin-bottom: 30px;
    padding-bottom: 20px;
    text-align: center;
}

header h1 {
    color: #2d5a27;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

header h2 {
    color: #666;
    font-weight: 300;
    font-style: italic;
}

/* Botones del Menú */
.botonmenu {
    display: inline-block;
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px 5px;
    transition: background 0.3s ease;
    font-weight: bold;
}

.botonmenu:hover {
    background-color: #2d5a27;
}

/* Tabla de Productos */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
}

table th {
    background-color: #2d5a27;
    color: white;
    padding: 12px;
    text-align: left;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

table tr:hover {
    background-color: #f1f1f1;
}

table img {
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* Formularios y Fieldsets */
fieldset {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #fafafa;
}

legend {
    font-weight: bold;
    color: #2d5a27;
    padding: 0 10px;
    font-size: 1.2em;
}

input[type="text"], 
input[type="number"], 
select {
    padding: 8px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: auto;
}

input[type="submit"] {
    background-color: #2d5a27;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s ease;
}

input[type="submit"]:hover {
    background-color: #1e3d1a;
    transform: scale(1.05);
}

/* Estilo para el input de borrar (rojo) */
form[action="borrarproducto.php"] input[type="submit"] {
    background-color: #c0392b;
}

form[action="borrarproducto.php"] input[type="submit"]:hover {
    background-color: #962d22;
}

/* Limpieza de floats */
div[style*="clear:both"] {
    clear: both;
}