/* Estilo general de la página */
body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

/* Contenedor principal del carrito */
h2 {
    text-align: center;
    margin-top: 20px;
    font-size: 2em;
    color: #333;
}

/* Tabla de carrito */
table {
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

table th,
table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
}

/* Encabezados de la tabla */
table th {
    background-color: #ff3232; /* Naranja */
    color: #fff;
    font-weight: bold;
}

/* Fila de productos */
table td img {
    width: 100px;
    height: 100px;
    object-fit: cover; /* Ajusta la imagen para que no se distorsione */
}

/* Fila de total */
table tfoot {
    background-color: #f4f4f4;
    font-weight: bold;
}

table tfoot td {
    font-size: 1.2em;
}

/* Estilo cuando el carrito está vacío */
.carrito-vacio {
    text-align: center;
    font-size: 1.5em;
    color: #000000;
    margin-top: 50px;
}

/* Botones de acción */
.boton-link, button {
    padding: 10px 16px;
    margin: 10px 5px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
}

/* Botón verde: Proceder al pago */
.boton-verde {
    background-color: #2ecc71;
}

.boton-verde:hover {
    background-color: #27ae60;
}

/* Botón rojo: Vaciar carrito */
.boton-rojo {
    background-color: #e74c3c;
}

.boton-rojo:hover {
    background-color: #c0392b;
}

/* Botón negro: Regresar a la tienda */
.boton-negro {
    background-color: #2c3e50;
}

.boton-negro:hover {
    background-color: #1a252f;
}

/* Contenedor de los botones principales centrados */
.boton-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

/* Botón de volver a la tienda posicionado abajo a la izquierda */
.boton-regresar {
    position: fixed;
    bottom: 20px;
    left: 20px;
}

/* Media Queries para dispositivos móviles */
@media (max-width: 768px) {
    /* Ajustes en la tabla */
    table {
        width: 95%;
    }

    table td img {
        width: 80px;
        height: 80px;
    }

    h2 {
        font-size: 1.8em;
    }

    .carrito-vacio {
        font-size: 1.3em;
        margin-top: 30px;
    }

    .boton-link, button {
        font-size: 14px;
        padding: 8px 12px;
    }

    .boton-regresar {
        font-size: 14px;
        bottom: 15px;
        left: 15px;
    }

    .boton-container {
        flex-direction: column;
        gap: 10px;
    }

    /* Eliminar el ancho completo para que todos los botones mantengan el mismo tamaño */
    .boton-container a, .boton-container button {
        width: auto;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.5em;
    }

    .carrito-vacio {
        font-size: 1.2em;
    }

    table th, table td {
        padding: 10px;
    }

    .boton-regresar {
        font-size: 12px;
    }

    .boton-container {
        gap: 5px;
    }

    .boton-container a, .boton-container button {
        width: auto;
    }
}
