/* ======== ESTILOS GENERALES ======== */
body {
    font-family: Arial, sans-serif;
    background-color: #dcedc8; /* Verde muy claro */
    color: #388e3c; /* Verde medio */
    margin: 0;
    padding: 0;
}

/* ======== HEADER ======== */
header {
    background-color: #4caf50; /* Verde bajo, suave */
    padding: 20px;
    display: flex;
    justify-content: center; /* Centra la imagen */
    align-items: center;
}

.logo {
    text-align: center;
    width: 100%;
}

.header-img {
    max-width: 930px; /* Ajusta el tamaño del logo */
    height: auto;
}

/* ======== MENÚ DE NAVEGACIÓN ======== */
nav {
    background-color: #66bb6a; /* Verde más suave */
    padding: 10px 0;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    transition: 0.3s;
}

nav ul li a:hover {
    background-color: #81c784; /* Verde suave al pasar el mouse */
    padding: 10px;
    border-radius: 5px;
}

/* ======== CONTENIDO PRINCIPAL ======== */
.container {
    text-align: center;
    padding: 50px 20px;
}

.container h2 {
    color: #4caf50; /* Verde bajo para los títulos */
    font-size: 28px;
}

.container p {
    font-size: 18px;
    color: #388e3c; /* Verde medio para los textos */
}

.container img {
    border-radius: 10px;
    margin-top: 15px;
}

/* ======== BOTÓN ======== */
.boton {
    display: inline-block;
    background-color: #388e3c; /* Verde medio */
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 18px;
    border-radius: 5px;
    margin-top: 15px;
    transition: 0.3s;
}

.boton:hover {
    background-color: #66bb6a; /* Verde suave al pasar el mouse */
}

/* ======== ESTILOS DEL FORMULARIO ======== */
form {
    background-color: #f1f8e9; /* Verde muy claro */
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    font-family: 'Arial', sans-serif;
}

form label {
    font-size: 15px;
    font-weight: 600;
    color: #2e7d32; /* Verde más oscuro */
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

form input, 
form textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #c5e1a5; /* Verde claro */
    border-radius: 8px;
    font-size: 16px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box; /* 🔹 Ajuste clave para evitar desbordamientos */
}


form input:focus, 
form textarea:focus {
    outline: none;
    border-color: #43a047; /* Verde más fuerte */
    box-shadow: 0px 0px 6px rgba(67, 160, 71, 0.4);
}

form textarea {
    min-height: 90px;
    resize: vertical;
}

/* ======== BOTÓN DEL FORMULARIO ======== */
form .boton {
    background-color: #2e7d32; /* Verde oscuro */
    color: white;
    font-size: 17px;
    font-weight: bold;
    border: none;
    padding: 12px;
    margin-top: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
}

form .boton:hover {
    background-color: #66bb6a; /* Verde más suave */
    transform: translateY(-2px);
}

form .boton:active {
    transform: translateY(1px);
}

/* ======== RESPONSIVE ======== */
@media (max-width: 600px) {
    form {
        max-width: 90%;
        padding: 20px;
    }
}

/* ======== ESTILOS PARA LA SECCIÓN DE PRODUCTOS ======== */
.container {
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

h2 {
    color: #2e7d32;
    font-size: 24px;
    margin-bottom: 20px;
}

/* GRID PARA LOS PRODUCTOS */
.producto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* ESTILOS DE CADA PRODUCTO */
.producto {
    background-color: #f1f8e9;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
}

/* ESTILO DE LAS IMÁGENES */
.producto img {
    width: 100%;
    height: auto;
    max-height: 180px;
    border-radius: 8px;
    object-fit: cover;
}

/* TEXTO DE LOS PRODUCTOS */
.producto span {
    display: block;
    font-size: 18px;
    color: #2e7d32;
    margin: 10px 0;
    font-weight: bold;
}

/* BOTÓN PARA AGREGAR AL CARRITO */
.boton {
    background-color: #2e7d32;
    color: white;
    font-size: 16px;
    padding: 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s ease;
}

.boton:hover {
    background-color: #66bb6a;
}

/* ======== ESTILOS PARA LA SECCIÓN DE CATÁLOGO ======== */
.container {
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

h2 {
    color: #2e7d32;
    font-size: 24px;
    margin-bottom: 20px;
}

/* ESTILOS DE LA TABLA */
.catalogo-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: #f1f8e9; /* Verde claro */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* CABECERA DE LA TABLA */
.catalogo-table thead {
    background-color: #2e7d32; /* Verde oscuro */
    color: white;
    font-size: 18px;
}

.catalogo-table th, .catalogo-table td {
    padding: 12px;
    border-bottom: 1px solid #c5e1a5; /* Línea verde claro */
    text-align: center;
}

/* IMÁGENES DENTRO DE LA TABLA */
.catalogo-table img {
    width: 80px; /* Ajusta el tamaño de la imagen */
    height: 80px;
    object-fit: cover; /* Evita deformaciones */
    border-radius: 10px; /* Bordes redondeados */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Efecto hover en filas */
.catalogo-table tbody tr:hover {
    background-color: #e8f5e9; /* Efecto hover */
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .catalogo-table {
        font-size: 14px;
    }

    .catalogo-table img {
        width: 60px;
        height: 60px;
    }
}

/* ======== ESTILOS PARA EL CARRITO DE COMPRAS ======== */
.container {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

h2 {
    color: #2e7d32;
    font-size: 24px;
    margin-bottom: 20px;
}

/* LISTA DE PRODUCTOS EN EL CARRITO */
#lista-carrito {
    list-style: none;
    padding: 0;
}

#lista-carrito li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f1f8e9; /* Verde claro */
    padding: 10px;
    margin: 8px 0;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* ESTILO PARA IMÁGENES DE PRODUCTOS */
.carrito-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
}

/* CONTENEDOR FLEXIBLE PARA CADA PRODUCTO */
.carrito-item {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

/* ESTILO PARA LOS BOTONES */
.boton {
    background-color: #388e3c; /* Verde medio */
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.boton:hover {
    background-color: #66bb6a; /* Verde más claro */
}

/* BOTÓN PARA ELIMINAR UN PRODUCTO */
.boton-eliminar {
    background-color: #d32f2f; /* Rojo */
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 5px;
}

.boton-eliminar:hover {
    background-color: #ff5252;
}

/* TOTAL DEL CARRITO */
#total {
    font-size: 20px;
    font-weight: bold;
    margin-top: 15px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .carrito-item {
        flex-direction: column;
        text-align: left;
    }

    .carrito-img {
        width: 50px;
        height: 50px;
    }

    .boton {
        font-size: 14px;
        padding: 6px 10px;
    }
}


/* ======== FOOTER ======== */
footer {
    background-color: #4caf50; /* Verde bajo */
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

button {
    padding: 10px 15px;
    background-color: #28a745; /* Verde */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

button:active {
    background-color: #1e7e34;
}


        .carrito-container {
            max-width: 1000px;
            margin: 50px auto;
            padding: 20px;
            background: #fff;
            border-radius: 15px;
            box-shadow: 0 0 15px rgba(0,0,0,0.1);
        }
        table { width: 100%; border-collapse: collapse; margin-bottom: 25px; }
        th, td { padding: 12px; text-align: center; border-bottom: 1px solid #ddd; }
        .producto-imagen img { width: 100px; height: auto; border-radius: 5px; }
        .btn-comprar, .btn-cancelar, .btn-actualizar, .btn-quitar {
            padding: 8px 12px;
            border: none;
            border-radius: 6px;
            font-weight: bold;
            cursor: pointer;
        }
        .btn-comprar { background-color: #28a745; color: white; }
        .btn-cancelar { background-color: #dc3545; color: white; }
        .btn-quitar { background-color: #ffc107; color: black; }
        .formulario-compra input, .formulario-compra select {
            width: 100%; padding: 8px; margin-bottom: 10px; border-radius: 5px; border: 1px solid #ccc;
        }